bb-flow 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3faa34540e4510abeb1c59b4952b9e469b3c6db
4
- data.tar.gz: 9fb3053a6282421986a4b437f481b6263bb3346e
3
+ metadata.gz: 9e6ed3dc204478ddadb9b8cb61564fb27ff2927a
4
+ data.tar.gz: 7d06acd12287feb59d99f9c430e648e61f1b706e
5
5
  SHA512:
6
- metadata.gz: b4d781b7b3296dfcca657237d789d95fccb87ddd899f75d346bb28ea87efe562d068ace17e19097d2d5eab707e2f200099c3711e65ed14a06454ab81604ede46
7
- data.tar.gz: a29747a78c33ff25bde7d52920e9422fba88b5d64ccac11fac2c58468307b513db4c3e34f369e16e9c956f9fadcf1c4b733d30d5d2b376d3bdefdf90ab1cb908
6
+ metadata.gz: 953025e975703105b3ea538225680296659cc1178c78fd574de2469c591047e60ad539cd13acf76ebac2c527bb3be54634ac20d92f6ac81e91cc9dd3a8b0796a
7
+ data.tar.gz: 16af40a1f9a11bf61ba45464a82167a5d0e5cd7114213090fa8692fe7f9067b3fed5fd526d6925c0df00de9da6ccf64a4bd481d4d5c9881891a1e8dab2e85c95
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ #### 0.3.1
2
+
3
+ * Commit: Fix the issue when the message was read from an incorrect place.
4
+ * PR: remove the `git-pr` binary.
5
+
1
6
  #### 0.3.0
2
7
 
3
8
  * PR: Open in your browser after creating.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bb-flow (0.3.0)
4
+ bb-flow (0.3.1)
5
5
  ansi-select (= 0.3.4)
6
6
  colorize (~> 0.7.7)
7
7
  git (~> 1.2.9.1)
data/lib/bb_flow.rb CHANGED
@@ -32,9 +32,9 @@ module BBFlow
32
32
  when :commit
33
33
  return puts Misc.execute('git commit') if Misc.execute('git diff-index HEAD --name-only --cached').empty?
34
34
 
35
- message = (Options.get(:message) || Misc.edit).strip
35
+ message = (Options.get(:commit_message) || Misc.edit).strip
36
36
  cards = Trello.cards
37
- cards = Printer.select_items(cards, 'Which cards does this commit address?') unless cards.blank?
37
+ cards = Printer.select_items(cards, 'Which cards does this commit address?', formatter: Trello.method(:format_card)) unless cards.blank?
38
38
  card_lines = cards.map do |card|
39
39
  "Trello Card: #{card.name}, #{card.short_url}"
40
40
  end.join("\n")
@@ -151,7 +151,7 @@ module BBFlow
151
151
  Printer.select_items(
152
152
  Trello.cards,
153
153
  'Which cards does it implement?',
154
- formatter: method(:format_trello_title),
154
+ formatter: Trello.method(:format_card),
155
155
  preselected: Trello.cards.map { |card| commit_messages.any? { |message| message.include?(card.short_url) } }
156
156
  )
157
157
  end
@@ -175,16 +175,6 @@ module BBFlow
175
175
 
176
176
  labels.select { |label| Misc.git.current_branch.include?(label) || Trello.labels.include?(label) || specialized_predicates[label].call }
177
177
  end
178
-
179
- # @param [Trello::Card] card
180
- #
181
- # @return [Array<String>]
182
- def format_trello_title(card)
183
- prefix, _, title = card.name.rpartition(/(?<=\])\s*/) # At last closing square bracket.
184
- _score, _, tags = prefix.rpartition(/(?<=\))\s*/) # After last parentheses.
185
-
186
- [tags, title, card.short_url]
187
- end
188
178
  end
189
179
  end
190
180
  end
@@ -20,6 +20,16 @@ module BBFlow
20
20
  trello::List.find(done_list_id)
21
21
  end
22
22
 
23
+ # @param [Trello::Card] card
24
+ #
25
+ # @return [Array<String>]
26
+ def format_card(card)
27
+ prefix, _, title = card.name.rpartition(/(?<=\])\s*/) # At last closing square bracket.
28
+ _score, _, tags = prefix.rpartition(/(?<=\))\s*/) # After last parentheses.
29
+
30
+ [tags, title, card.short_url]
31
+ end
32
+
23
33
  private
24
34
 
25
35
  # @return [Trello::Board]
@@ -9,7 +9,7 @@ module BBFlow
9
9
 
10
10
  # Current patch level.
11
11
  # @return [String]
12
- PATCH = 0
12
+ PATCH = 1
13
13
 
14
14
  # Full release version.
15
15
  # @return [String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bb-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - gregolsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi-select
@@ -155,7 +155,6 @@ email:
155
155
  - mihailov.in@gmail.com
156
156
  executables:
157
157
  - bb-flow
158
- - git-pr
159
158
  extensions: []
160
159
  extra_rdoc_files: []
161
160
  files:
@@ -171,7 +170,6 @@ files:
171
170
  - Rakefile
172
171
  - bb-flow.gemspec
173
172
  - bin/bb-flow
174
- - bin/git-pr
175
173
  - lib/bb-flow.rb
176
174
  - lib/bb_flow.rb
177
175
  - lib/bb_flow/github.rb
data/bin/git-pr DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative '../lib/bb-flow'
4
-
5
- BBFlow::Application.run(command: :pr)