buildmeister 1.0.7 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.7
1
+ 1.1.0
@@ -2,13 +2,14 @@
2
2
 
3
3
  module Buildmeister
4
4
  class Bin
5
- attr_accessor :bin, :mode, :value, :last_value
5
+ attr_accessor :bin, :mode, :value, :last_value, :annotations
6
6
 
7
7
  delegate :name, :tickets, :to => :bin
8
8
 
9
- def initialize(lighthouse_bin, mode = :verbose)
9
+ def initialize(lighthouse_bin, mode = :verbose, options = {})
10
10
  self.bin = lighthouse_bin
11
11
  self.mode = mode
12
+ self.annotations = options[:annotations] || {}
12
13
 
13
14
  refresh!
14
15
  end
@@ -18,7 +19,13 @@ module Buildmeister
18
19
 
19
20
  case mode
20
21
  when :verbose
21
- self.value = bin.tickets.map(&:id).join(', ')
22
+ self.value = bin.tickets.map do |tkt|
23
+ str = "#{tkt.id}"
24
+ annotations.each do |tag_name, identifier|
25
+ str << identifier if tkt.tags.include?(tag_name)
26
+ end
27
+ str
28
+ end.join(', ')
22
29
  when :quiet
23
30
  self.value = bin.tickets_count
24
31
  end
@@ -18,7 +18,7 @@ module Buildmeister
18
18
  bin = project_bins.find { |b| b.name == bin_name }
19
19
  raise "No bin named #{bin_name}" unless bin
20
20
 
21
- bins << Buildmeister::Bin.new(bin, options[:mode])
21
+ bins << Buildmeister::Bin.new(bin, options[:mode], :annotations => config['annotations'])
22
22
  end
23
23
  end
24
24
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
+ - 1
7
8
  - 0
8
- - 7
9
- version: 1.0.7
9
+ version: 1.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Leigh Caplan
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-03 00:00:00 -08:00
17
+ date: 2010-05-21 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency