Parent

Included Modules

Warbler::Traits::Merb

The Merb trait adds Merb::BootLoader gem dependencies to the project.

Public Class Methods

detect?() click to toggle source
# File lib/warbler/traits/merb.rb, line 14
def self.detect?
  File.exist?("config/init.rb")
end
requires?(trait) click to toggle source
# File lib/warbler/traits/merb.rb, line 18
def self.requires?(trait)
  trait == Traits::War
end

Public Instance Methods

before_configure() click to toggle source
# File lib/warbler/traits/merb.rb, line 22
def before_configure
  return false unless task = Warbler.project_application.lookup("merb_env")
  task.invoke rescue nil
  return false unless defined?(::Merb)
  config.webxml.booter = :merb
  if defined?(::Merb::BootLoader::Dependencies.dependencies)
    ::Merb::BootLoader::Dependencies.dependencies.each {|g| config.gems << g }
  else
    warn "unable to auto-detect Merb dependencies; upgrade to Merb 1.0 or greater"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.