Class: Mutx::Support::Bundle

Inherits:
Object
  • Object
show all
Defined in:
lib/mutx/support/bundle.rb

Instance Method Summary collapse

Constructor Details

#initializeBundle

Returns a new instance of Bundle.



6
7
# File 'lib/mutx/support/bundle.rb', line 6

def initialize
end

Instance Method Details

#bundle_update(result) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/mutx/support/bundle.rb', line 9

def bundle_update(result)
  if ( (result.is_ruby_platform?.to_s.eql? "ruby") && (Mutx::Platforms::Ruby.using_bundler?) )
    bundle_output = Mutx::Support::Console.execute "bundle update"
    puts "[#{result.id}] bundle: #{bundle_output}"
    bundle_output.slice! "fatal: Not a git repository (or any of the parent directories): .git"

    result.append_output! bundle_output if bundle_output.include? "Installing"
    if bundle_output.include? "Could not find"
      puts "[#{result.id}] Finished because of Could not find gem"
      result.finish!
      raise "An error ocurred installing gem while executing bundler"
    else
      result.append_output! "All GEMS are installed and running!\nEXECUTION OUTPUT:\n\n--"                
    end
  end
  return result
end