Class: Bickle::Runner

Inherits:
Thor
  • Object
show all
Defined in:
lib/bickle/runner.rb

Instance Method Summary collapse

Instance Method Details

#build(id) ⇒ Object



62
63
64
65
# File 'lib/bickle/runner.rb', line 62

def build(id)
  say "Not implemented yet."
  exit 0
end

#builds(repository_name) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/bickle/runner.rb', line 29

def builds(repository_name)
  repository = Repository.new(repository_name)

  builds = BuildRepository.new(repository).
    fetch(options["number-of-builds"])

  builds = builds.map do |build| 
    LengthDecorator.new(build, options["columns-width"]) 
  end 

  builds = builds.map do |build| 
    HumanizeDecorator.new(build) 
  end unless options["no-humanize"]

  builds = builds.map do |build| 
    ColorDecorator.new(build, shell) 
  end unless options["no-color"]

  table = ThorBuildsTable.new(options["columns"], builds, shell)
  table.render
end