git_tracker 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
1
  --colour
2
2
  -I spec/support
3
3
  -r rspec-spies
4
+ -r pry
data/CHANGELOG.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ### dev
2
- [full changelog](https://github.com/stevenharman/git_tracker/compare/v1.5.0...master)
2
+ [full changelog](https://github.com/stevenharman/git_tracker/compare/v1.5.1...master)
3
3
 
4
- ### 1.5.0 / 2013-02-02
5
- [full changelog](https://github.com/stevenharman/git_tracker/compare/v1.4.0...v1.5.0)
4
+ ### 1.5.1 / 2013-02-02
5
+ [full changelog](https://github.com/stevenharman/git_tracker/compare/v1.4.0...v1.5.1)
6
6
 
7
7
  Enhancements
8
8
 
data/README.md CHANGED
@@ -11,18 +11,18 @@ format][pt-format], to your commit message.
11
11
 
12
12
  ## Installation
13
13
 
14
- ### 1) Install the `git-tracker` executable
14
+ ### 1) Install the `git-tracker` binary
15
15
 
16
- You need to get the `git-tracker` executable on your system, and then you need
17
- to install the *git hook* into your local Git repository.
16
+ You need to get the `git-tracker` binary onto your system, and then you need to
17
+ install the *git hook* into your local Git repository.
18
18
 
19
- - via [Homebrew][homebrew] (preferred)
19
+ - via [Homebrew][homebrew] :beers: (preferred)
20
20
 
21
21
  ```bash
22
22
  $ brew install git-tracker
23
23
  ```
24
24
 
25
- - via [RubyGems][rubygems] (if you must)
25
+ - via [RubyGems][rubygems] :pensive: (if you must)
26
26
 
27
27
  ```bash
28
28
  $ gem install git_tracker
@@ -35,7 +35,7 @@ You need to add the hook into each repository where you want to use it.
35
35
  ```bash
36
36
  # from inside a local Git repository
37
37
  # for example: /path/to/repo/
38
- $ git-tracker install
38
+ $ git tracker install
39
39
  ```
40
40
 
41
41
  This will put the `prepare-commit-msg` hook in the `/path/to/repo/.git/hooks`
@@ -54,8 +54,8 @@ $ git checkout -b a_useful_and_helpful_name_8675309
54
54
  ```
55
55
 
56
56
  When you commit, Git will fire the hook which will find the story number in the
57
- branch name and prepare your commit message so that it include the story number
58
- in the special Pivotal Tracker syntax.
57
+ branch name and prepare your commit message so that it includes the story number
58
+ in the [special Pivotal Tracker syntax][pt-format].
59
59
 
60
60
  ```bash
61
61
  # on branch named `best_feature_ever-8675309`
@@ -100,8 +100,8 @@ Look at this rad code, yo!
100
100
  [#8675309]
101
101
  ```
102
102
 
103
- However, if you include the story number in the Pivotal Tracker format in your
104
- commit message, the hook will do nothing.
103
+ However, if you include the story number in the Pivotal Tracker format within
104
+ your commit message, the hook will do nothing.
105
105
 
106
106
  ```bash
107
107
  # on branch named `best_feature_ever-8675309`
@@ -116,11 +116,11 @@ Results in this commit message:
116
116
  ```
117
117
 
118
118
  ### Keywords
119
- You can use the custom keywords that Pivotal Tracker provide with the API.
119
+ You can use the custom keywords that Pivotal Tracker provides with the API.
120
120
 
121
- The keywords are `fixed`, `completed`, `finshed`, and `delivered` in square
122
- brackets. You may also use different cases forms of these verbs, such as `Fix`
123
- or `FIXES`.
121
+ The keywords are `fixed`, `completed`, `finished`, and `delivered` in square
122
+ brackets. You may also use different cases and forms of these verbs, such as
123
+ `Fix` or `FIXES`.
124
124
 
125
125
  If you use those keywords in your commit message, the keyword will be prepended
126
126
  to the story ID in the commit message.
@@ -142,7 +142,7 @@ Change the redis connection string [Fixes]
142
142
 
143
143
  ### Valid branch names
144
144
 
145
- *git_tracker* allows you to include the story number any where in the branch
145
+ *GitTracker* allows you to include the story number any where in the branch
146
146
  name, optionally prefixing it with a hash (`#`). Examples:
147
147
 
148
148
  - `best_feature_ever_#8675309`
data/git_tracker.gemspec CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.add_development_dependency "rspec", "~> 2.12"
17
17
  gem.add_development_dependency "rspec-spies", "~> 2.0"
18
18
  gem.add_development_dependency "activesupport", "~> 3.2"
19
+ gem.add_development_dependency "pry", "~> 0.9.11"
19
20
  gem.add_development_dependency "rake"
20
21
 
21
22
  gem.files = `git ls-files`.split("\n")
@@ -35,17 +35,23 @@ preamble
35
35
  io
36
36
  end
37
37
 
38
+ def ruby_executable
39
+ if File.executable? '/usr/bin/ruby' then '/usr/bin/ruby'
40
+ else
41
+ require 'rbconfig'
42
+ File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
43
+ end
44
+ end
45
+
46
+ private
47
+
38
48
  def inline_source(code, io)
39
49
  code.each_line do |line|
40
- io << line unless comment?(line) || require_own_file?(line)
50
+ io << line unless require_own_file?(line)
41
51
  end
42
52
  io.puts ''
43
53
  end
44
54
 
45
- def comment?(line)
46
- line =~ /^\s*#/
47
- end
48
-
49
55
  def require_own_file?(line)
50
56
  line =~ /^\s*require\s+["']git_tracker\//
51
57
  end
@@ -60,13 +66,5 @@ preamble
60
66
  end
61
67
  end
62
68
 
63
- def ruby_executable
64
- if File.executable? '/usr/bin/ruby' then '/usr/bin/ruby'
65
- else
66
- require 'rbconfig'
67
- File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
68
- end
69
- end
70
-
71
69
  end
72
70
  end
@@ -1,3 +1,3 @@
1
1
  module GitTracker
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
@@ -45,6 +45,14 @@ describe GitTracker::Standalone do
45
45
  expect(subject).to include('VERSION')
46
46
  end
47
47
 
48
+ it 'inlines the message HEREDOC' do
49
+ expect(standalone).to include('#{preamble.strip}')
50
+ end
51
+
52
+ it 'inlines the shebang for the hook' do
53
+ expect(standalone).to include('#!/usr/bin/env bash')
54
+ end
55
+
48
56
  it 'does not inline the standalone code' do
49
57
  expect(subject).to_not include('module Standalone')
50
58
  end
metadata CHANGED
@@ -1,80 +1,96 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
5
4
  prerelease:
5
+ version: 1.5.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Steven Harman
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-02 00:00:00.000000000 Z
12
+ date: 2013-02-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rspec
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
15
+ version_requirements: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '2.12'
20
+ none: false
21
+ name: rspec
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
24
+ requirement: !ruby/object:Gem::Requirement
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
28
  version: '2.12'
30
- - !ruby/object:Gem::Dependency
31
- name: rspec-spies
32
- requirement: !ruby/object:Gem::Requirement
33
29
  none: false
30
+ - !ruby/object:Gem::Dependency
31
+ version_requirements: !ruby/object:Gem::Requirement
34
32
  requirements:
35
33
  - - ~>
36
34
  - !ruby/object:Gem::Version
37
35
  version: '2.0'
36
+ none: false
37
+ name: rspec-spies
38
38
  type: :development
39
39
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
40
+ requirement: !ruby/object:Gem::Requirement
42
41
  requirements:
43
42
  - - ~>
44
43
  - !ruby/object:Gem::Version
45
44
  version: '2.0'
46
- - !ruby/object:Gem::Dependency
47
- name: activesupport
48
- requirement: !ruby/object:Gem::Requirement
49
45
  none: false
46
+ - !ruby/object:Gem::Dependency
47
+ version_requirements: !ruby/object:Gem::Requirement
50
48
  requirements:
51
49
  - - ~>
52
50
  - !ruby/object:Gem::Version
53
51
  version: '3.2'
52
+ none: false
53
+ name: activesupport
54
54
  type: :development
55
55
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
56
+ requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  version: '3.2'
61
+ none: false
62
62
  - !ruby/object:Gem::Dependency
63
- name: rake
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: 0.9.11
68
+ none: false
69
+ name: pry
70
+ type: :development
71
+ prerelease: false
64
72
  requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 0.9.11
65
77
  none: false
78
+ - !ruby/object:Gem::Dependency
79
+ version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
81
  - - ! '>='
68
82
  - !ruby/object:Gem::Version
69
83
  version: '0'
84
+ none: false
85
+ name: rake
70
86
  type: :development
71
87
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
88
+ requirement: !ruby/object:Gem::Requirement
74
89
  requirements:
75
90
  - - ! '>='
76
91
  - !ruby/object:Gem::Version
77
92
  version: '0'
93
+ none: false
78
94
  description: ! " Some simple tricks that make working with Pivotal Tracker even\n
79
95
  \ better... and easier... um, besier!\n"
80
96
  email:
@@ -122,20 +138,20 @@ rdoc_options: []
122
138
  require_paths:
123
139
  - lib
124
140
  required_ruby_version: !ruby/object:Gem::Requirement
125
- none: false
126
141
  requirements:
127
142
  - - ! '>='
128
143
  - !ruby/object:Gem::Version
129
144
  version: '0'
130
- required_rubygems_version: !ruby/object:Gem::Requirement
131
145
  none: false
146
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
147
  requirements:
133
148
  - - ! '>='
134
149
  - !ruby/object:Gem::Version
135
150
  version: '0'
151
+ none: false
136
152
  requirements: []
137
153
  rubyforge_project:
138
- rubygems_version: 1.8.24
154
+ rubygems_version: 1.8.23
139
155
  signing_key:
140
156
  specification_version: 3
141
157
  summary: Teaching Git about Pivotal Tracker.