commit2jira 0.2.3 → 0.3.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.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'commit2jira'
6
- s.version = "0.2.#{ENV['BUILD_NUMBER'] || 'dev'}"
6
+ s.version = "0.3.#{ENV['BUILD_NUMBER'] || 'dev'}"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["R. Tyler Croy"]
9
9
  s.email = ["rtyler.croy@lookout.com"]
@@ -7,7 +7,7 @@ module Commit2Jira
7
7
  return
8
8
  end
9
9
  if precise_match
10
- message = message.split("\n").select {|line| line.start_with?("JIRA:")}.join("\n")
10
+ message = message.split("\n").select {|line| line =~ /\Ajira:/i }.join("\n")
11
11
  end
12
12
 
13
13
  regex = /\b(#{projects.join('|')})-(\d+)\b/i
@@ -10,27 +10,29 @@ describe Commit2Jira do
10
10
 
11
11
  end
12
12
 
13
- it "should call the block for one JIRA with the right project" do
14
- expected_project = 'FOO'
15
- expected_number = 4779
16
- message =<<END
13
+ ['JIRA', 'Jira'].each do |prefix|
14
+ it "should call the block for one JIRA with prefix #{prefix} with the right project" do
15
+ expected_project = 'FOO'
16
+ expected_number = 4779
17
+ message =<<END
17
18
  This is a simple commit message
18
19
 
19
- JIRA: #{expected_project}-#{expected_number}
20
+ #{prefix}: #{expected_project}-#{expected_number}
20
21
  END
21
- found_project = nil
22
- found_number = nil
23
- called = false
24
- Commit2Jira.from_message(['foo'], message) do |project, number|
25
- found_project = project
26
- found_number = number
27
- called = true
28
- end
22
+ found_project = nil
23
+ found_number = nil
24
+ called = false
25
+ Commit2Jira.from_message(['foo'], message) do |project, number|
26
+ found_project = project
27
+ found_number = number
28
+ called = true
29
+ end
29
30
 
30
- called.should == true
31
+ called.should == true
31
32
 
32
- expected_project.should == found_project
33
- expected_number.should == found_number
33
+ expected_project.should == found_project
34
+ expected_number.should == found_number
35
+ end
34
36
  end
35
37
 
36
38
  it "should call the block for two JIRAs with the right projects" do
metadata CHANGED
@@ -1,33 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: commit2jira
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 3
10
- version: 0.2.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - R. Tyler Croy
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-11-15 00:00:00 Z
12
+ date: 2013-04-29 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
14
  description: Herpy derpy
22
- email:
15
+ email:
23
16
  - rtyler.croy@lookout.com
24
- executables:
17
+ executables:
25
18
  - commit2jira
26
19
  extensions: []
27
-
28
20
  extra_rdoc_files: []
29
-
30
- files:
21
+ files:
31
22
  - .gitignore
32
23
  - Gemfile
33
24
  - Gemfile.lock
@@ -43,38 +34,32 @@ files:
43
34
  - spec/commit2jira_spec.rb
44
35
  homepage: https://github.com/lookout/commit2jira
45
36
  licenses: []
46
-
47
37
  post_install_message:
48
38
  rdoc_options: []
49
-
50
- require_paths:
39
+ require_paths:
51
40
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
53
42
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ segments:
59
48
  - 0
60
- version: "0"
61
- required_rubygems_version: !ruby/object:Gem::Requirement
49
+ hash: 2217499708816412142
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
51
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
- version: "0"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
70
56
  requirements: []
71
-
72
57
  rubyforge_project:
73
- rubygems_version: 1.8.24
58
+ rubygems_version: 1.8.25
74
59
  signing_key:
75
60
  specification_version: 3
76
61
  summary: a gem for parsing jiras from commits
77
- test_files:
62
+ test_files:
78
63
  - features/command_line.feature
79
64
  - features/step_definitions/cli_steps.rb
80
65
  - features/support/env.rb