buildmeister 1.1.4 → 1.2.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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/buildmeister/base.rb +38 -0
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.4
1
+ 1.2.0
@@ -33,6 +33,10 @@ module Buildmeister
33
33
  @options[:project] = p
34
34
  end
35
35
 
36
+ opts.on('-b', '--bin-name BIN', 'Summary Bin Name') do |p|
37
+ @options[:bin_name] = p
38
+ end
39
+
36
40
  opts.on_tail("-h", "--help", "Show this message") do
37
41
  puts opts
38
42
  exit
@@ -161,6 +165,40 @@ module Buildmeister
161
165
  puts "All tickets from bin #{@options[:move_from]} have been moved to #{@options[:to_state]}"
162
166
  end
163
167
 
168
+ def summary
169
+ body = ''
170
+
171
+ projects.each do |project|
172
+ bin = project.bins.detect {|b| b.name =~ /^#{@options[:bin_name]}$/i}
173
+
174
+ unless bin
175
+ puts "No ticket bin found matching \"#{@options[:bin_name]}\""
176
+ return
177
+ end
178
+
179
+ tickets = bin.tickets.sort_by(&:id)
180
+
181
+ body << "=== #{project.name} ===\n\n" if tickets.length > 0
182
+
183
+ tickets.each do |ticket|
184
+ body << title = "##{ticket.number} - #{ticket.title}\n"
185
+ body << "-" * title.length + "\n\n"
186
+
187
+ if ticket.original_body.to_s.strip.empty?
188
+ body << "(no description)" + "\n" * 4
189
+ else
190
+ body << "#{ticket.original_body}" + "\n" * 4
191
+ end
192
+
193
+ end
194
+ end
195
+
196
+ puts body
197
+
198
+ `echo "#{body.gsub('"', '\"')}" | pbcopy`
199
+ puts "Summary copied to the clipboard"
200
+ end
201
+
164
202
  def refresh!
165
203
  projects.each(&:refresh!)
166
204
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 1
8
- - 4
9
- version: 1.1.4
7
+ - 2
8
+ - 0
9
+ version: 1.2.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-06-01 00:00:00 -07:00
17
+ date: 2010-06-03 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency