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_updateObject

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# bundle_update


27
28
29
30
# File 'lib/mutx/support/bundle.rb', line 27

def bundle_update
  Mutx::Support::Console.execute "bundle update"
  Mutx::Support::Log.debug "BUNDLE UPDATE MADE VIA WEBHOOK" if Mutx::Support::Log
end