git_tracking 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_tracking (0.1.0)
4
+ git_tracking (0.1.2)
5
5
  highline
6
6
  pivotal-tracker
7
7
 
@@ -43,12 +43,13 @@ class GitTracking
43
43
  end
44
44
 
45
45
  def prepare_commit_msg
46
- author
47
- commit_message
48
- File.open(ARGV[0], "w") do |f|
49
- f.puts story_info
50
- f.puts
51
- f.puts " - #{commit_message}"
46
+ unless commit_message.include?("--no-gt")
47
+ author
48
+ File.open(ARGV[0], "w") do |f|
49
+ f.puts story_info
50
+ f.puts
51
+ f.puts " - #{commit_message}"
52
+ end
52
53
  end
53
54
  end
54
55
 
@@ -1,3 +1,3 @@
1
1
  class GitTracking
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -11,6 +11,10 @@ describe GitTracking do
11
11
  File.delete("foo.txt") if File.exists?("foo.txt")
12
12
  end
13
13
 
14
+ after(:each) do
15
+ GitTracking.class_eval { @commit_message = nil }
16
+ end
17
+
14
18
  it ".pre_commit should call detect_debuggers and detect_incomplete_merges" do
15
19
  GitTracking.should_receive(:detect_debuggers)
16
20
  GitTracking.should_receive(:detect_incomplete_merges)
@@ -36,7 +40,21 @@ STRING
36
40
  ARGV = old_argv
37
41
  end
38
42
 
43
+ it "should skip everything if '--no-gt' option is detected" do
44
+ old_argv = ARGV
45
+ File.open("foo.txt", "w") do |f|
46
+ f.print "My awesome commit msg! --no-gt"
47
+ end
48
+ ARGV = ["foo.txt"]
49
+ GitTracking.should_not_receive :story_info
50
+ GitTracking.should_not_receive :author
51
+ GitTracking.prepare_commit_msg
52
+ end
53
+
39
54
  it "should call story_info and author" do
55
+ File.open("foo.txt", "w") do |f|
56
+ f.print "My awesome commit msg!"
57
+ end
40
58
  ARGV = ["foo.txt"]
41
59
  GitTracking.should_receive(:story_info).and_return "[#12345] Best feature evar"
42
60
  GitTracking.should_receive(:author)
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_tracking
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 29
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 2
9
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Steve Hull
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-11-17 00:00:00 -08:00
19
+ date: 2011-03-17 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -26,6 +27,7 @@ dependencies:
26
27
  requirements:
27
28
  - - ">="
28
29
  - !ruby/object:Gem::Version
30
+ hash: 3
29
31
  segments:
30
32
  - 0
31
33
  version: "0"
@@ -39,6 +41,7 @@ dependencies:
39
41
  requirements:
40
42
  - - ">="
41
43
  - !ruby/object:Gem::Version
44
+ hash: 3
42
45
  segments:
43
46
  - 0
44
47
  version: "0"
@@ -88,6 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
91
  requirements:
89
92
  - - ">="
90
93
  - !ruby/object:Gem::Version
94
+ hash: 3
91
95
  segments:
92
96
  - 0
93
97
  version: "0"
@@ -96,6 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
100
  requirements:
97
101
  - - ">="
98
102
  - !ruby/object:Gem::Version
103
+ hash: 3
99
104
  segments:
100
105
  - 0
101
106
  version: "0"