Sha256: 0af5b2dd092ee5f8f2ff35039ddfa1cb5f7c9379317bf125aae215a082b130bb

Contents?: true

Size: 646 Bytes

Versions: 6

Compression:

Stored size: 646 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)
  invoke_geordi 'bundle_install'

  %w[development test cucumber].each do |env| # update long_desc when changing this
    if File.exist? "config/environments/#{env}.rb"
      command = []
      command << Util.binstub_or_fallback('rake')
      command += args
      command << "RAILS_ENV=#{env}"

      Util.run!(command, show_cmd: true)
    end
  end

  Hint.did_you_know [
    :capistrano,
  ]
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geordi-11.2.0 lib/geordi/commands/rake.rb
geordi-11.1.0 lib/geordi/commands/rake.rb
geordi-11.0.0 lib/geordi/commands/rake.rb
geordi-10.1.0 lib/geordi/commands/rake.rb
geordi-10.0.1 lib/geordi/commands/rake.rb
geordi-10.0.0 lib/geordi/commands/rake.rb