Module: Bob

Defined in:
lib/bob.rb,
lib/bob/scm.rb,
lib/bob/builder.rb,
lib/bob/scm/git.rb,
lib/bob/scm/abstract.rb,
lib/bob/background_engines.rb,
lib/bob/background_engines/foreground.rb

Defined Under Namespace

Modules: BackgroundEngines, SCM Classes: Builder

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.directoryObject

Directory where the code for the different buildables will be checked out. Make sure the user running Bob is allowed to write to this directory.



22
23
24
# File 'lib/bob.rb', line 22

def self.directory
  @directory || "/tmp"
end

.engineObject

What will you use to build in background. Must respond to call and take a block which will be run “in background”. The default is to run in foreground.



28
29
30
# File 'lib/bob.rb', line 28

def self.engine
  @engine || BackgroundEngines::Foreground
end

.loggerObject

What to log with (must implement ruby’s Logger interface). Logs to STDOUT by default.



34
35
36
# File 'lib/bob.rb', line 34

def self.logger
  @logger || Logger.new(STDOUT)
end

Class Method Details

.build(buildable, commit_ids) ⇒ Object

Builds the specified buildable. This object must understand the API described in the README.



14
15
16
17
18
# File 'lib/bob.rb', line 14

def self.build(buildable, commit_ids)
  Array(commit_ids).each do |commit_id|
    Builder.new(buildable, commit_id).build
  end
end