trollolo 0.0.14 → 0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +3 -0
- data/lib/burndown_chart.rb +11 -6
- data/lib/card.rb +1 -1
- data/lib/cli.rb +12 -18
- data/lib/column.rb +1 -1
- data/lib/version.rb +1 -1
- data/spec/unit/burndown_chart_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbbc51baa3b518ce1f41bf52c96bd713ad0d6803
|
4
|
+
data.tar.gz: d9c196184db4a2428228bc4ed4a3c03db721f468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81f6e72d327accdbfd42bd8d1d2c4716ef7423d99a2e022a3fa0f22f995f7ab22ab839b6b2d69c5f552921df317d13461a3e82b0188d8792edd4258cceb591f4
|
7
|
+
data.tar.gz: 219765edd591158ced4a01393dfb4ee8013f6226e349ac5e81077a27778fa138e72d9b7106544a910138c0e1a7f0f0a2b07a94b241c8ea2023eee5c420c591c1
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
## Master (unreleased)
|
4
4
|
|
5
5
|
|
6
|
+
## Version 0.1.0
|
7
|
+
|
8
|
+
* Fix `plot-to-board` option in the burndown command when it is used together
|
9
|
+
with `-o`.
|
10
|
+
* `burndown --plot-to-board` always sets the burndown chart as the cover.
|
11
|
+
Fix #114.
|
12
|
+
* Allow to create and update an Sprint with a custom number. Fix #78.
|
13
|
+
|
6
14
|
## Version 0.0.14
|
7
15
|
|
8
16
|
* Add a new `plot-to-board` option to the burndown command to send the plotted
|
data/README.md
CHANGED
@@ -26,6 +26,9 @@ You can install Trollolo as gem with `gem install trollolo`.
|
|
26
26
|
For the chart generation you will need a working matplotlib installation and
|
27
27
|
the python module to read YAML. On openSUSE you can get that with
|
28
28
|
|
29
|
+
zypper install python2-matplotlib python2-matplotlib-tk python2-PyYAML
|
30
|
+
or
|
31
|
+
|
29
32
|
zypper install python-matplotlib python-matplotlib-tk python-PyYAML
|
30
33
|
|
31
34
|
## Configuration
|
data/lib/burndown_chart.rb
CHANGED
@@ -180,8 +180,9 @@ class BurndownChart
|
|
180
180
|
last_sprint
|
181
181
|
end
|
182
182
|
|
183
|
-
|
184
|
-
|
183
|
+
# It loads the sprint for the given number or the last one if it is nil
|
184
|
+
def load_sprint(burndown_dir, number = nil)
|
185
|
+
self.sprint = number || last_sprint(burndown_dir)
|
185
186
|
burndown_data_path = File.join(burndown_dir, burndown_data_filename)
|
186
187
|
begin
|
187
188
|
read_data burndown_data_path
|
@@ -192,7 +193,7 @@ class BurndownChart
|
|
192
193
|
end
|
193
194
|
|
194
195
|
def update(options)
|
195
|
-
burndown_data_path =
|
196
|
+
burndown_data_path = load_sprint(options['output'] || Dir.pwd, options[:sprint_number])
|
196
197
|
|
197
198
|
burndown_data = BurndownData.new(@settings)
|
198
199
|
burndown_data.board_id = board_id
|
@@ -213,13 +214,17 @@ class BurndownChart
|
|
213
214
|
if options[:plot_to_board]
|
214
215
|
trello = TrelloWrapper.new(@settings)
|
215
216
|
board = trello.board(board_id)
|
216
|
-
|
217
|
+
name = options['output'] ? options['output'] : '.'
|
218
|
+
name += "/burndown-#{sprint.to_s.rjust(2, '0')}.png"
|
219
|
+
card_id = board.burndown_card_id
|
220
|
+
trello.add_attachment(card_id, name)
|
221
|
+
trello.make_cover(card_id, name)
|
217
222
|
end
|
218
223
|
end
|
219
224
|
|
220
225
|
def create_next_sprint(burndown_dir, options = {})
|
221
|
-
|
222
|
-
self.sprint = self.sprint + 1
|
226
|
+
load_sprint(burndown_dir)
|
227
|
+
self.sprint = options[:sprint_number] || (self.sprint + 1)
|
223
228
|
@data["meta"]["total_days"] = options[:total_days] if options[:total_days]
|
224
229
|
@data["meta"]["weekend_lines"] = options[:weekend_lines] unless options[:weekend_lines].blank?
|
225
230
|
@data["days"] = []
|
data/lib/card.rb
CHANGED
data/lib/cli.rb
CHANGED
@@ -50,6 +50,7 @@ evaluates to the access of
|
|
50
50
|
|
51
51
|
https://api.trello.com/1/lists/53186e8391ef8671265eba9f/cards?filter=open&key=xxx&token=yyy
|
52
52
|
EOT
|
53
|
+
|
53
54
|
def get_raw(url_fragment)
|
54
55
|
process_global_options options
|
55
56
|
require_trello_credentials
|
@@ -166,6 +167,7 @@ EOT
|
|
166
167
|
desc "burndown", "Update burndown chart"
|
167
168
|
option :output, :aliases => :o, :desc => "Output directory", :required => false
|
168
169
|
option :new_sprint, :aliases => :n, :desc => "Create new sprint"
|
170
|
+
option :sprint_number, type: :numeric, :desc => "Provide the number of the sprint"
|
169
171
|
option :total_days, type: :numeric, desc: "Provide how many days the sprint longs. 10 days by default"
|
170
172
|
option :weekend_lines, type: :array, desc: "Set the weekend_lines. [3.5, 8.5] by default"
|
171
173
|
option :plot, :type => :boolean, :desc => "also plot the new data"
|
@@ -180,7 +182,7 @@ EOT
|
|
180
182
|
chart = BurndownChart.new @@settings
|
181
183
|
begin
|
182
184
|
if options[:new_sprint]
|
183
|
-
chart.create_next_sprint(options[:output] || Dir.pwd,
|
185
|
+
chart.create_next_sprint(options[:output] || Dir.pwd, options)
|
184
186
|
end
|
185
187
|
chart.update(options)
|
186
188
|
puts "Updated data for sprint #{chart.sprint}"
|
@@ -205,8 +207,7 @@ EOT
|
|
205
207
|
process_global_options options
|
206
208
|
require_trello_credentials
|
207
209
|
|
208
|
-
|
209
|
-
b.backup(board_id(options["board-id"]))
|
210
|
+
Backup.new(@@settings).backup(board_id(options["board-id"]))
|
210
211
|
end
|
211
212
|
|
212
213
|
desc "list-backups", "List all backups"
|
@@ -221,8 +222,7 @@ EOT
|
|
221
222
|
option "board-id", :desc => "Id of Trello board", :required => true
|
222
223
|
option "show-descriptions", :desc => "Show descriptions of cards", :required => false, :type => :boolean
|
223
224
|
def show_backup
|
224
|
-
|
225
|
-
b.show(board_id(options["board-id"]), options)
|
225
|
+
Backup.new(@@settings).show(board_id(options["board-id"]), options)
|
226
226
|
end
|
227
227
|
|
228
228
|
desc "organization", "Show organization info"
|
@@ -231,12 +231,10 @@ EOT
|
|
231
231
|
process_global_options options
|
232
232
|
require_trello_credentials
|
233
233
|
|
234
|
-
|
235
|
-
|
236
|
-
o = trello.organization(options["org-name"])
|
234
|
+
organization = TrelloWrapper.new(@@settings).organization(options["org-name"])
|
237
235
|
|
238
|
-
puts "Display Name: #{
|
239
|
-
puts "Home page: #{
|
236
|
+
puts "Display Name: #{organization.display_name}"
|
237
|
+
puts "Home page: #{organization.url}"
|
240
238
|
end
|
241
239
|
|
242
240
|
desc "get-description", "Reads description"
|
@@ -256,8 +254,7 @@ EOT
|
|
256
254
|
process_global_options options
|
257
255
|
require_trello_credentials
|
258
256
|
|
259
|
-
|
260
|
-
trello.set_description(options["card-id"], STDIN.read)
|
257
|
+
TrelloWrapper.new(@@settings).set_description(options["card-id"], STDIN.read)
|
261
258
|
end
|
262
259
|
|
263
260
|
desc "organization-members", "Show organization members"
|
@@ -268,8 +265,7 @@ EOT
|
|
268
265
|
|
269
266
|
trello = TrelloWrapper.new(@@settings)
|
270
267
|
|
271
|
-
members = trello.organization(options["org-name"]).members
|
272
|
-
members.sort! { |a, b| a.username <=> b.username }
|
268
|
+
members = trello.organization(options["org-name"]).members.sort_by(&:username)
|
273
269
|
|
274
270
|
members.each do |member|
|
275
271
|
puts "#{member.username} (#{member.full_name})"
|
@@ -282,8 +278,7 @@ EOT
|
|
282
278
|
process_global_options(options)
|
283
279
|
require_trello_credentials
|
284
280
|
|
285
|
-
|
286
|
-
trello.add_attachment(options["card-id"], filename)
|
281
|
+
TrelloWrapper.new(@@settings).add_attachment(options["card-id"], filename)
|
287
282
|
end
|
288
283
|
|
289
284
|
desc "make-cover <filename>", "Make existing picture the cover"
|
@@ -292,8 +287,7 @@ EOT
|
|
292
287
|
process_global_options(options)
|
293
288
|
require_trello_credentials
|
294
289
|
|
295
|
-
|
296
|
-
trello.make_cover(options["card-id"], filename)
|
290
|
+
TrelloWrapper.new(@@settings).make_cover(options["card-id"], filename)
|
297
291
|
end
|
298
292
|
|
299
293
|
desc "list-member-boards", "List name and id of all boards"
|
data/lib/column.rb
CHANGED
data/lib/version.rb
CHANGED
@@ -367,11 +367,11 @@ EOT
|
|
367
367
|
end
|
368
368
|
end
|
369
369
|
|
370
|
-
describe "
|
370
|
+
describe "load_sprint" do
|
371
371
|
let(:path) { given_directory_from_data("burndown_dir") }
|
372
372
|
|
373
373
|
it "loads the burndown from the 2nd sprint into data" do
|
374
|
-
@chart.
|
374
|
+
@chart.load_sprint(path)
|
375
375
|
expect(@chart.data).to eq(
|
376
376
|
{ "meta" =>
|
377
377
|
{ "board_id" => "53186e8391ef8671265eba9d",
|
@@ -402,7 +402,7 @@ EOT
|
|
402
402
|
end
|
403
403
|
|
404
404
|
it "returns the path of the last sprint" do
|
405
|
-
expect(@chart.
|
405
|
+
expect(@chart.load_sprint(path)).to eq(File.join(path, "burndown-data-02.yaml"))
|
406
406
|
end
|
407
407
|
end
|
408
408
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trollolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cornelius Schumacher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|