Sha256: 6226c2510920b7dc4502fd5ba7a035c4bf73164b7677bd2e0ab625fd903cad14

Contents?: true

Size: 517 Bytes

Versions: 51

Compression:

Stored size: 517 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

51 entries across 51 versions & 1 rubygems

Version Path
geordi-2.12.3 lib/geordi/commands/rake.rb
geordi-2.12.2 lib/geordi/commands/rake.rb
geordi-2.12.1 lib/geordi/commands/rake.rb
geordi-2.12.0 lib/geordi/commands/rake.rb
geordi-2.11.0 lib/geordi/commands/rake.rb
geordi-2.10.1 lib/geordi/commands/rake.rb
geordi-2.10.0 lib/geordi/commands/rake.rb
geordi-2.9.0 lib/geordi/commands/rake.rb
geordi-2.8.0 lib/geordi/commands/rake.rb
geordi-2.7.0 lib/geordi/commands/rake.rb
geordi-2.6.0 lib/geordi/commands/rake.rb
geordi-2.5.0 lib/geordi/commands/rake.rb
geordi-2.4.0 lib/geordi/commands/rake.rb
geordi-2.3.0 lib/geordi/commands/rake.rb
geordi-2.2.0 lib/geordi/commands/rake.rb
geordi-2.1.0 lib/geordi/commands/rake.rb
geordi-2.0.0 lib/geordi/commands/rake.rb
geordi-1.10.0 lib/geordi/commands/rake.rb
geordi-1.9.1 lib/geordi/commands/rake.rb
geordi-1.9.0 lib/geordi/commands/rake.rb