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"

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'")

lib

lib(filename, data=nil, &block) Instance Public methods Create a new file in the lib/ directory. Code can be specified in a block or a data string can be given. lib("crypto.rb") do "crypted_special_value = '#{rand}--#{Time.now}--#{rand(1337)}--'" end lib("foreign.rb", "# Foreign code is fun")

rake

rake(command, options={}) Instance Public methods Runs the supplied rake task rake("db:migrate") rake("db:migrate", env: "production") rake("gems:install", sudo: true)

rakefile

rakefile(filename, data=nil, &block) Instance Public methods Create a new Rakefile with the provided code (either in a block or a string). rakefile("bootstrap.rake") do project = ask("What is the UNIX name of your project?") <<-TASK namespace :#{project} do task :bootstrap do puts "I like boots!" end end TASK end rakefile('seed.rake', 'puts "Planting seeds"')

readme

readme(path) Instance Public methods Reads the given file at the source root and prints it in the console. readme "README"

route

route(routing_code) Instance Public methods Make an entry in Rails routing file config/routes.rb route "root 'welcome#index'"

vendor

vendor(filename, data=nil, &block) Instance Public methods Create a new file in the vendor/ directory. Code can be specified in a block or a data string can be given. vendor("sekrit.rb") do sekrit_salt = "#{Time.now}--#{3.years.ago}--#{rand}--" "salt = '#{sekrit_salt}'" end vendor("foreign.rb", "# Foreign code is fun")

extify

extify(name) Instance Protected methods Add an extension to the given name based on the platform.

log

log(*args) Instance Protected methods Define log for backwards compatibility. If just one argument is sent, invoke say, otherwise invoke say_status. Differently from say and similarly to say_status, this method respects the quiet? option given.