Module: Bootlace::Rake

Includes:
Logger
Included in:
Base
Defined in:
lib/bootlace/rake.rb

Instance Method Summary collapse

Methods included from Logger

#logger

Instance Method Details

#rake(task, o = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bootlace/rake.rb', line 7

def rake(task, o = {})
  options = {
    environment: {}
  }.merge(o)

  options[:environment].each do |key,val|
    ENV[key.to_s] = val.to_s
  end

  logger.info("Executing rake task '#{task}'")
  system "#{detect_bundle} rake -s #{task}".strip
end