Sha256: 68637c6ff2165aadeb03fdf21a1c8507210676ab0a8f307743ee9613f06bf94f

Contents?: true

Size: 515 Bytes

Versions: 1

Compression:

Stored size: 515 Bytes

Contents

desc 'rake TASK', 'Run a rake task in several Rails environments'
long_desc <<-LONGDESC
Example: `geordi rake db:migrate`

TASK is run in the following Rails environments (if present):

- development
- test
- cucumber
LONGDESC

def rake(*args)
  for env in %w(development test cucumber) # update long_desc when changing this
    if File.exists? "config/environments/#{env}.rb"
      call = %w[bundle exec rake] + args + ["RAILS_ENV=#{env}"]
      note_cmd call.join(' ')

      Util.system! *call
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geordi-1.0.0 lib/geordi/commands/rake.rb