git-storyid 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +0 -3
- data/README.md +8 -0
- data/VERSION +1 -1
- data/git-storyid.gemspec +4 -4
- data/lib/git_storyid.rb +18 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a9a29277089575a0e5895d972606d9557b2d858
|
4
|
+
data.tar.gz: 63d5358ab8337ae52af55d557828d12759824aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad3882859335767c3b38bd5d3c6e57f672b08678ea995cd4af552b4c71defb783b7deade122a4696a280f3dc63a73892ee36e933cfa197adaad737fb346c872d
|
7
|
+
data.tar.gz: 1d7e393f9840d833d7aa3027aee8a1947d45e57b8dea53f2f2f3c88c58937d66722ef155a1680025a25fd44afd1f9a11e1c8bff2a6e385bb9303a12790a55159
|
data/Gemfile.lock
CHANGED
@@ -31,13 +31,10 @@ GEM
|
|
31
31
|
nokogiri (1.5.5)
|
32
32
|
pivotal-tracker (0.5.4)
|
33
33
|
builder
|
34
|
-
builder
|
35
|
-
happymapper (>= 0.3.2)
|
36
34
|
happymapper (>= 0.3.2)
|
37
35
|
nokogiri (>= 1.4.3)
|
38
36
|
nokogiri (~> 1.4)
|
39
37
|
rest-client (~> 1.6.0)
|
40
|
-
rest-client (~> 1.6.0)
|
41
38
|
rake (10.3.2)
|
42
39
|
rdoc (4.1.1)
|
43
40
|
json (~> 1.4)
|
data/README.md
CHANGED
@@ -47,3 +47,11 @@ Feature: Tag campaign insertion points and
|
|
47
47
|
campaigns with an identifier,
|
48
48
|
so only campaigns with matching identifier will get shown
|
49
49
|
```
|
50
|
+
|
51
|
+
## Supported options
|
52
|
+
|
53
|
+
```
|
54
|
+
-m, --message [MESSAGE] Add addional MESSAGE to comit
|
55
|
+
-f, --finish Specify that this commit finishes a story or fixes a bug
|
56
|
+
-d, --deliver Specify that this commit delivers a story or a bug
|
57
|
+
```
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/git-storyid.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: git-storyid 0.3.
|
5
|
+
# stub: git-storyid 0.3.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "git-storyid"
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.5"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Bogdan Gusiev"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2016-01-13"
|
15
15
|
s.description = "Helps include pivotal story id and description in commit"
|
16
16
|
s.email = "agresso@gmail.com"
|
17
17
|
s.executables = ["git-storyid"]
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
]
|
38
38
|
s.homepage = "http://github.com/bogdan/git-storyid"
|
39
39
|
s.licenses = ["MIT"]
|
40
|
-
s.rubygems_version = "2.4.
|
40
|
+
s.rubygems_version = "2.4.7"
|
41
41
|
s.summary = "Attach commits to pivotal stories"
|
42
42
|
|
43
43
|
if s.respond_to? :specification_version then
|
data/lib/git_storyid.rb
CHANGED
@@ -17,10 +17,10 @@ class GitStoryid
|
|
17
17
|
opts.on("-m", "--message [MESSAGE]", "Add addional MESSAGE to comit") do |custom_message|
|
18
18
|
@custom_message = custom_message
|
19
19
|
end
|
20
|
-
opts.on("-f", "--finish", "Specify that this commit finishes a story or fixes a bug") do
|
20
|
+
opts.on("-f", "--finish", "Specify that this commit finishes a story or fixes a bug") do
|
21
21
|
@finish_stories = true
|
22
22
|
end
|
23
|
-
opts.on("-d", "--deliver", "Specify that this commit delivers a story or a bug") do
|
23
|
+
opts.on("-d", "--deliver", "Specify that this commit delivers a story or a bug") do
|
24
24
|
@deliver_stories = true
|
25
25
|
end
|
26
26
|
end
|
@@ -28,13 +28,13 @@ class GitStoryid
|
|
28
28
|
|
29
29
|
unless arguments.empty?
|
30
30
|
@stories = arguments.map do |argument|
|
31
|
-
Configuration.project.stories.find(argument)
|
31
|
+
Configuration.project.stories.find(argument)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
def all_stories
|
37
|
-
@all_stories ||= Configuration.project.stories.all(
|
37
|
+
@all_stories ||= Configuration.project.stories.all(
|
38
38
|
:owner => Configuration.me,
|
39
39
|
:state => %w(started finished delivered),
|
40
40
|
:limit => 30
|
@@ -54,6 +54,9 @@ class GitStoryid
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
57
|
+
rescue RefetchStories
|
58
|
+
@all_stories = nil
|
59
|
+
readline_stories_if_not_present
|
57
60
|
end
|
58
61
|
|
59
62
|
def output(message)
|
@@ -76,7 +79,11 @@ class GitStoryid
|
|
76
79
|
end
|
77
80
|
|
78
81
|
def readline_story_ids
|
79
|
-
|
82
|
+
input = readline
|
83
|
+
if input =~ /\A\s*re?f?r?e?s?h?\s*\z/
|
84
|
+
raise RefetchStories
|
85
|
+
end
|
86
|
+
ids = input.split(/\s*,\s*/).reject do |string|
|
80
87
|
string.empty?
|
81
88
|
end
|
82
89
|
quit("Cancelling.") if ids.empty?
|
@@ -84,7 +91,7 @@ class GitStoryid
|
|
84
91
|
end
|
85
92
|
|
86
93
|
def readline
|
87
|
-
Readline.readline("Indexes
|
94
|
+
Readline.readline("Indexes: ", true)
|
88
95
|
end
|
89
96
|
|
90
97
|
def quit(message)
|
@@ -170,7 +177,7 @@ class GitStoryid
|
|
170
177
|
}.each do |key, label|
|
171
178
|
if @config[key].nil?
|
172
179
|
changed = true
|
173
|
-
value = Readline.readline("#{label}: ", true)
|
180
|
+
value = Readline.readline("#{label}: ", true)
|
174
181
|
@project_config[key] = format_config_value(value)
|
175
182
|
end
|
176
183
|
end
|
@@ -199,7 +206,7 @@ class GitStoryid
|
|
199
206
|
file = File.join path,'.pivotalrc'
|
200
207
|
if File.exists?(file)
|
201
208
|
YAML.load(File.read(file)) || {}
|
202
|
-
else
|
209
|
+
else
|
203
210
|
{}
|
204
211
|
end
|
205
212
|
end
|
@@ -241,4 +248,7 @@ class GitStoryid
|
|
241
248
|
|
242
249
|
class Error < StandardError
|
243
250
|
end
|
251
|
+
|
252
|
+
class RefetchStories < StandardError
|
253
|
+
end
|
244
254
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-storyid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pivotal-tracker
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.4.
|
154
|
+
rubygems_version: 2.4.7
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Attach commits to pivotal stories
|