initializer

initializer(filename, data=nil, &block) Instance Public methods Create a new initializer with the provided code (either in a block or a string). initializer("globals.rb") do data = "" ['MY_WORK', 'ADMINS', 'BEST_COMPANY_EVAR'].each do |const| data << "#{const} = :entp\n" end data end initializer("api.rb", "API_KEY = '123456'")

git

git(commands={}) Instance Public methods Run a command in git. git :init git add: "this.file that.rb" git add: "onefile.rb", rm: "badfile.cxx"

generate

generate(what, *args) Instance Public methods Generate something using a generator from Rails or a plugin. The second parameter is the argument string that is passed to the generator or an Array that is joined. generate(:authenticated, "user session")

gem_group

gem_group(*names, &block) Instance Public methods Wraps gem entries inside a group. gem_group :development, :test do gem "rspec-rails" end

gem

gem(*args) Instance Public methods Adds an entry into Gemfile for the supplied gem. gem "rspec", group: :test gem "technoweenie-restful-authentication", lib: "restful-authentication", source: "http://gems.github.com/" gem "rails", "3.0", git: "git://github.com/rails/rails"

environment

environment(data=nil, options={}, &block) Instance Public methods Adds a line inside the Application class for config/application.rb. If options :env is specified, the line is appended to the corresponding file in config/environments. environment do "config.autoload_paths += %W(#{config.root}/extras)" end environment(nil, env: "development") do "config.autoload_paths += %W(#{config.root}/extras)" end application

capify!

capify!() Instance Public methods Just run the capify command in root capify!

application

application(data=nil, options={}, &block) Instance Public methods Alias for: environment

add_source

add_source(source, options={}) Instance Public methods Add the given source to Gemfile add_source "http://gems.github.com/"

say_status

say_status(status, color, message = relative_destination) Instance Protected methods