abak-flow 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/abak-flow.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |gem|
25
25
  gem.add_runtime_dependency "git", "~> 1.2.5"
26
26
  gem.add_runtime_dependency "commander", ">= 4.1.3"
27
27
  gem.add_runtime_dependency "ruler", ">= 1.4.2"
28
- gem.add_runtime_dependency "i18n", ">= 0.6.1"
28
+ gem.add_runtime_dependency "i18n", "~> 0.6.9"
29
29
  gem.add_runtime_dependency "ansi", ">= 1.4.3"
30
30
 
31
31
  gem.add_development_dependency "cane"
@@ -67,7 +67,7 @@ module Abak::Flow
67
67
  return I18n.t("commands.publish.nothing") if
68
68
  tasks_from_commit_message.empty? && !tracker_task?
69
69
 
70
- [tasks_from_commit_message, task].flatten
70
+ [tasks_from_commit_message, task].flatten.uniq
71
71
  .map { |x| "http://jira.railsc.ru/browse/#{x}" } * "\n"
72
72
  end
73
73
 
@@ -122,7 +122,6 @@ module Abak::Flow
122
122
  @parsed_tasks ||=
123
123
  @branch.gcommit.message
124
124
  .scan(/(?:#{MAGICK_WORDS * "|"})\s+(#{TASK_FORMAT})/i)
125
- .reject { |x| x == task.to_s }
126
125
  end
127
126
 
128
127
  def parse_branch_name
@@ -1,5 +1,5 @@
1
1
  module Abak
2
2
  module Flow
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
@@ -207,7 +207,7 @@ describe Abak::Flow::Branch do
207
207
  end
208
208
 
209
209
  context "when commit message has magick word" do
210
- context "when branch is task" do
210
+ context "when branch is task different from commit message" do
211
211
  let(:gcommit) { double("Git commit", message: "Fix PC4-200") }
212
212
 
213
213
  before { git_feature.stub(:gcommit).and_return gcommit }
@@ -216,6 +216,14 @@ describe Abak::Flow::Branch do
216
216
  it { expect(feature.extract_body).to include "http://jira.railsc.ru/browse/PC4-200" }
217
217
  end
218
218
 
219
+ context "when branch is task equals to commit message" do
220
+ let(:gcommit) { double("Git commit", message: "Fix JP-515") }
221
+
222
+ before { git_feature.stub(:gcommit).and_return gcommit }
223
+
224
+ it { expect(feature.extract_body).to eq "http://jira.railsc.ru/browse/JP-515" }
225
+ end
226
+
219
227
  context "when branch is not task" do
220
228
  let(:gcommit) { double("Git commit", message: "Fix PC4-200, PC5-111\n\nCloses PC2-1122") }
221
229
 
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: abak-flow
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.4
5
+ version: 1.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Strech (aka Sergey Fedorov)
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-12 00:00:00.000000000 Z
12
+ date: 2014-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: octokit
@@ -96,15 +96,15 @@ dependencies:
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
- - - ! '>='
99
+ - - ~>
100
100
  - !ruby/object:Gem::Version
101
- version: 0.6.1
101
+ version: 0.6.9
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
105
- - - ! '>='
105
+ - - ~>
106
106
  - !ruby/object:Gem::Version
107
- version: 0.6.1
107
+ version: 0.6.9
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  - !ruby/object:Gem::Dependency