trello-changelog 1.0.0 → 1.0.1
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/bin/trello-changelog +1 -1
- data/lib/trello-changelog.rb +0 -2
- data/lib/trello-changelog/printers.rb +23 -16
- 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: dcf21cfc9aa10d0da0b5727a1050f24cde0d4560
|
4
|
+
data.tar.gz: f1118d878ba03c2ff7b5897b12894ab66401557b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95de4e22874c3ca62c3da0fb7bbddd038934989991c8128380547d09e6f8bc0cd86e8e00241c62ddd720c5997464ee6549a9f0f4f2ff44477197d861000aab9
|
7
|
+
data.tar.gz: 621986ec58ec2362fa6b1fed0dd5d486b56838491a7e67babc19769d88ff80cf13acb17395bdec6535e40071d917be18165e60b500b8e47c8a66480b55e3e12a
|
data/bin/trello-changelog
CHANGED
data/lib/trello-changelog.rb
CHANGED
@@ -2,42 +2,49 @@ require 'trello-changelog/tickets'
|
|
2
2
|
|
3
3
|
class TrelloChangelog
|
4
4
|
def print
|
5
|
-
|
6
|
-
print_labels
|
7
|
-
print_unlabeled
|
5
|
+
puts build_output
|
8
6
|
end
|
9
7
|
|
10
|
-
def
|
11
|
-
|
8
|
+
def build_output
|
9
|
+
@output = ""
|
10
|
+
build_summary
|
11
|
+
build_labels
|
12
|
+
build_unlabeled
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
@output
|
15
|
+
end
|
16
|
+
|
17
|
+
def build_summary
|
18
|
+
@output << "# Start date: #{start_date}\n\n"
|
19
|
+
|
20
|
+
@output << "Created Trello items since #{start_date}: #{new_tickets_count}\n\n"
|
21
|
+
@output << "Finished Trello items since #{start_date}: #{done_tickets_count}\n\n"
|
22
|
+
@output << "Archived Trello items since #{start_date}: #{archived_tickets_count}\n\n"
|
16
23
|
|
17
|
-
|
24
|
+
@output << "Summary: #{new_tickets_count} tickets in, #{done_tickets_count + archived_tickets_count} tickets out\n\n"
|
18
25
|
end
|
19
26
|
|
20
|
-
def
|
27
|
+
def build_labels
|
21
28
|
for label_name in @config[:labels] do
|
22
29
|
tickets_label_name = done_tickets.select { |ticket| ticket.labels.select { |label| label.name == label_name}.count > 0 }
|
23
|
-
|
30
|
+
@output << "\n## #{label_name}:\n\n"
|
24
31
|
tickets_label_name.each do |ticket|
|
25
|
-
|
32
|
+
@output << " * [#{ticket.name}](#{ticket.url})\n"
|
26
33
|
end
|
27
|
-
|
34
|
+
@output << 'n.a.' if tickets_label_name.count == 0
|
28
35
|
end
|
29
36
|
end
|
30
37
|
|
31
|
-
def
|
38
|
+
def build_unlabeled
|
32
39
|
@unlabeled_done_tickets = done_tickets
|
33
40
|
|
34
41
|
@config[:labels].each do |label|
|
35
42
|
@unlabeled_done_tickets.select! { |ticket| !ticket.card_labels.find{ |card_label| card_label['name'] == label} }
|
36
43
|
end
|
37
44
|
|
38
|
-
|
45
|
+
@output << "\n## Other\n\n"
|
39
46
|
@unlabeled_done_tickets.each do |ticket|
|
40
|
-
|
47
|
+
@output << " * [#{ticket.name}](#{ticket.url})\n"
|
41
48
|
end
|
42
49
|
end
|
43
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trello-changelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giel De Bleser
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '0'
|
22
|
-
type: :
|
22
|
+
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|