v2gpti 1.1.8.1 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +43 -0
- data/lib/git-pivotal-tracker-integration/command/base.rb +2 -4
- data/lib/git-pivotal-tracker-integration/command/deliver.rb +2 -2
- data/lib/git-pivotal-tracker-integration/command/finish.rb +1 -1
- data/lib/git-pivotal-tracker-integration/command/newfeature.rb +1 -1
- data/lib/git-pivotal-tracker-integration/command/release.rb +2 -2
- data/lib/git-pivotal-tracker-integration/util/story.rb +16 -3
- data/lib/git-pivotal-tracker-integration/util/togglV8.rb +2 -1
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0873a14574267b847efed75272f643f5f483bb5d
|
4
|
+
data.tar.gz: 939c5dc209d5e16656e3084d145be0aa947e6ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 244bcccd687fc7b6a882c961b49aac8b22ca80c0a87653bb9b3948910489d3301e614b12768087be96d5db60ce52d0d4a22965d3eed2e32b931f01c6135d76d9
|
7
|
+
data.tar.gz: 899624f5afeb138bd103f276b061e9d88982ea107fdda0718c86bbb60dc1b6dc242d6834dc35781f91f1cfc96a74b89bdb156f0bc3e9185ba282e520489b3fc6
|
data/README.md
CHANGED
@@ -194,3 +194,46 @@ Once these have been entered, the version string for the current project is upda
|
|
194
194
|
Version update is currently supported for the following kinds of projects. If you do not see a project type that you would like supported, please open an issue or submit a pull request.
|
195
195
|
|
196
196
|
* Gradle
|
197
|
+
|
198
|
+
### `git newfeature [ -i | -b ] [-bl | -tl ]`
|
199
|
+
This command creates a new feature story in pivotal tracker.
|
200
|
+
|
201
|
+
For more clarity read the below explanation
|
202
|
+
|
203
|
+
```plain
|
204
|
+
-i # icebox
|
205
|
+
-b # backlog
|
206
|
+
-bl # bottom of the list
|
207
|
+
-tl # top of the list
|
208
|
+
```
|
209
|
+
|
210
|
+
```plain
|
211
|
+
$ git newfeature -i -bl # Creates a new feature story in icebox bottom of the list
|
212
|
+
$ git newfeature -i -tl # Creates a new feature story in icebox top of the list
|
213
|
+
$ git newfeature -b -bl # Creates a new feature story in backlog bottom of the list
|
214
|
+
$ git newfeature -b -tl # Creates a new feature story in backlog top of the list
|
215
|
+
```
|
216
|
+
|
217
|
+
### `git newbug [ -i | -b ] [-bl | -tl ]`
|
218
|
+
This command creates a new bug story in pivotal tracker.
|
219
|
+
|
220
|
+
For more clarity read the below explanation
|
221
|
+
|
222
|
+
```plain
|
223
|
+
-i # icebox
|
224
|
+
-b # backlog
|
225
|
+
-bl # bottom of the list
|
226
|
+
-tl # top of the list
|
227
|
+
```
|
228
|
+
|
229
|
+
```plain
|
230
|
+
$ git newbug -i -bl # Creates a new bug story in icebox bottom of the list
|
231
|
+
$ git newbug -i -tl # Creates a new bug story in icebox top of the list
|
232
|
+
$ git newbug -b -bl # Creates a new bug story in backlog bottom of the list
|
233
|
+
$ git newbug -b -tl # Creates a new bug story in backlog top of the list
|
234
|
+
```
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
@@ -305,8 +305,7 @@ class GitPivotalTrackerIntegration::Command::Base
|
|
305
305
|
icebox_last_story = icebox_stories.last
|
306
306
|
(new_feature_story.create).move(:after, icebox_last_story)
|
307
307
|
else
|
308
|
-
|
309
|
-
(new_feature_story.create).move(:before, icebox_first_story)
|
308
|
+
new_feature_story.create
|
310
309
|
end
|
311
310
|
end
|
312
311
|
|
@@ -349,8 +348,7 @@ class GitPivotalTrackerIntegration::Command::Base
|
|
349
348
|
backlog_last_story = backlog_stories.last
|
350
349
|
(new_feature_story.create).move(:after, backlog_last_story)
|
351
350
|
else
|
352
|
-
|
353
|
-
(new_feature_story.create).move(:before, backlog_first_story)
|
351
|
+
new_feature_story.create
|
354
352
|
end
|
355
353
|
end
|
356
354
|
|
@@ -65,7 +65,7 @@ class GitPivotalTrackerIntegration::Command::Deliver < GitPivotalTrackerIntegrat
|
|
65
65
|
puts "build_number:#{build_number}"
|
66
66
|
puts "working_directory:#{working_directory}*"
|
67
67
|
|
68
|
-
if (OS.mac? &&
|
68
|
+
if (OS.mac? && @platform.downcase == "ios")
|
69
69
|
project_directory = ((GitPivotalTrackerIntegration::Util::Shell.exec 'find . -name "*.xcodeproj" 2>/dev/null').split /\/(?=[^\/]*$)/)[0]
|
70
70
|
|
71
71
|
# cd to the project_directory
|
@@ -232,4 +232,4 @@ class GitPivotalTrackerIntegration::Command::Deliver < GitPivotalTrackerIntegrat
|
|
232
232
|
end
|
233
233
|
end
|
234
234
|
|
235
|
-
end
|
235
|
+
end
|
@@ -66,7 +66,7 @@ class GitPivotalTrackerIntegration::Command::Finish < GitPivotalTrackerIntegrati
|
|
66
66
|
puts "build_number:#{build_number}"
|
67
67
|
puts "working_directory:#{working_directory}*"
|
68
68
|
|
69
|
-
if (OS.mac? &&
|
69
|
+
if (OS.mac? && @platform.downcase == "ios")
|
70
70
|
project_directory = ((GitPivotalTrackerIntegration::Util::Shell.exec 'find . -name "*.xcodeproj" 2>/dev/null').split /\/(?=[^\/]*$)/)[0]
|
71
71
|
return if project_directory.nil?
|
72
72
|
|
@@ -19,7 +19,7 @@ require 'git-pivotal-tracker-integration/util/git'
|
|
19
19
|
require 'git-pivotal-tracker-integration/util/story'
|
20
20
|
require 'pivotal-tracker'
|
21
21
|
|
22
|
-
# The class that encapsulates creating a Pivotal Tracker
|
22
|
+
# The class that encapsulates creating a Pivotal Tracker Feature Story
|
23
23
|
class GitPivotalTrackerIntegration::Command::Newfeature < GitPivotalTrackerIntegration::Command::Base
|
24
24
|
|
25
25
|
# Creates a Pivotal Tracker story by doing the following steps:
|
@@ -68,7 +68,7 @@ class GitPivotalTrackerIntegration::Command::Release < GitPivotalTrackerIntegrat
|
|
68
68
|
puts "version_number:#{version_number}"
|
69
69
|
puts "working_directory:#{working_directory}*"
|
70
70
|
|
71
|
-
if (OS.mac? &&
|
71
|
+
if (OS.mac? && @platform.downcase == "ios")
|
72
72
|
project_directory = ((GitPivotalTrackerIntegration::Util::Shell.exec 'find . -name "*.xcodeproj" 2>/dev/null').split /\/(?=[^\/]*$)/)[0]
|
73
73
|
|
74
74
|
# cd to the project_directory
|
@@ -227,7 +227,7 @@ class GitPivotalTrackerIntegration::Command::Release < GitPivotalTrackerIntegrat
|
|
227
227
|
def change_spec_version(version_number)
|
228
228
|
spec_file_path = "#{GitPivotalTrackerIntegration::Util::Git.repository_root}/#{@configuration.pconfig["spec"]["spec-path"]}"
|
229
229
|
spec_file_text = File.read(spec_file_path)
|
230
|
-
File.open(spec_file_path, "w") {|file| file.puts spec_file_text.gsub(/version(.*)=(.*)['|"]/, "version = '#{version_number}'")}
|
230
|
+
File.open(spec_file_path, "w") {|file| file.puts spec_file_text.gsub(/(?<!_)version(.*)=(.*)['|"]/, "version = '#{version_number}'")}
|
231
231
|
end
|
232
232
|
|
233
233
|
def create_release_tag(version_number)
|
@@ -177,10 +177,10 @@ class GitPivotalTrackerIntegration::Util::Story
|
|
177
177
|
if type == "release"
|
178
178
|
last_release = last_release_story(project, release_type)
|
179
179
|
last_release_number = last_release.name if !last_release.nil?
|
180
|
-
last_release_type_string = (release_type == "b")?"build":"version"
|
180
|
+
last_release_type_string = (release_type == "b") ? "build" : "version"
|
181
181
|
puts "There are no available release stories."
|
182
182
|
puts " The last #{last_release_type_string} release was #{last_release_number}." if !last_release.nil?
|
183
|
-
next_release_number = last_release_number
|
183
|
+
next_release_number = set_next_release_number(last_release, release_type, last_release_number) if !last_release.nil?
|
184
184
|
next_release_number = ask("To create a new #{last_release_type_string}, enter a name for the new release story:") if last_release.nil?
|
185
185
|
puts "New #{last_release_type_string} release number is: #{next_release_number}"
|
186
186
|
story = self.create_new_release(project, next_release_number)
|
@@ -201,10 +201,23 @@ class GitPivotalTrackerIntegration::Util::Story
|
|
201
201
|
|
202
202
|
candidates = project.stories.all criteria
|
203
203
|
candidates = candidates.select {|x| (x.name[0]==release_type) && !(x.labels.nil? || (!x.labels.include? x.name))}
|
204
|
-
candidates.sort! {|x,y| y.name <=> x.name }
|
204
|
+
candidates.sort! { |x,y| Gem::Version.new(y.name[1 .. -1]) <=> Gem::Version.new(x.name[1 .. -1]) }
|
205
205
|
|
206
206
|
candidates.first
|
207
207
|
end
|
208
|
+
|
209
|
+
def self.set_next_release_number(last_release, release_type, last_release_number)
|
210
|
+
if release_type == "b"
|
211
|
+
return last_release_number.next
|
212
|
+
end
|
213
|
+
if release_type == "v"
|
214
|
+
version_split = last_release_number.split(/\./)
|
215
|
+
last_incremented_number=version_split.last.next
|
216
|
+
version_split.pop
|
217
|
+
version_split.push(last_incremented_number)
|
218
|
+
return version_split.join(".")
|
219
|
+
end
|
220
|
+
end
|
208
221
|
|
209
222
|
def self.create_new_release (project, next_release_number)
|
210
223
|
new_story = PivotalTracker::Story.new
|
@@ -167,7 +167,7 @@ class Toggl
|
|
167
167
|
|
168
168
|
def get_project_task_with_name(project_id, task_name)
|
169
169
|
task = nil
|
170
|
-
project_tasks = get_project_tasks(project_id)
|
170
|
+
project_tasks = get_project_tasks(project_id) || []
|
171
171
|
project_tasks.each { |a_task|
|
172
172
|
a_task_name = "#{a_task["name"]}"
|
173
173
|
if (a_task_name.include?task_name)
|
@@ -389,6 +389,7 @@ class Toggl
|
|
389
389
|
puts "GET #{resource}" if @debug
|
390
390
|
full_res = self.conn.get(resource)
|
391
391
|
# ap full_res.env if @debug
|
392
|
+
return nil if full_res.env[:body] == 'null'
|
392
393
|
res = JSON.parse(full_res.env[:body])
|
393
394
|
res.is_a?(Array) || res['data'].nil? ? res : res['data']
|
394
395
|
rescue Faraday::ClientError => e
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: v2gpti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Wolski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: highline
|
@@ -241,15 +241,6 @@ files:
|
|
241
241
|
- LICENSE
|
242
242
|
- NOTICE
|
243
243
|
- README.md
|
244
|
-
- bin/git-deliver
|
245
|
-
- bin/git-finish
|
246
|
-
- bin/git-newbug
|
247
|
-
- bin/git-newfeature
|
248
|
-
- bin/git-qa
|
249
|
-
- bin/git-release
|
250
|
-
- bin/git-report
|
251
|
-
- bin/git-start
|
252
|
-
- bin/git-uat
|
253
244
|
- lib/git-pivotal-tracker-integration/command/base.rb
|
254
245
|
- lib/git-pivotal-tracker-integration/command/command.rb
|
255
246
|
- lib/git-pivotal-tracker-integration/command/configuration.rb
|
@@ -257,8 +248,6 @@ files:
|
|
257
248
|
- lib/git-pivotal-tracker-integration/command/finish.rb
|
258
249
|
- lib/git-pivotal-tracker-integration/command/newbug.rb
|
259
250
|
- lib/git-pivotal-tracker-integration/command/newfeature.rb
|
260
|
-
- lib/git-pivotal-tracker-integration/command/prepare-commit-msg-win.sh
|
261
|
-
- lib/git-pivotal-tracker-integration/command/prepare-commit-msg.sh
|
262
251
|
- lib/git-pivotal-tracker-integration/command/release.rb
|
263
252
|
- lib/git-pivotal-tracker-integration/command/report.rb
|
264
253
|
- lib/git-pivotal-tracker-integration/command/start.rb
|
@@ -270,6 +259,17 @@ files:
|
|
270
259
|
- lib/git-pivotal-tracker-integration/version-update/gradle.rb
|
271
260
|
- lib/git-pivotal-tracker-integration/version-update/version_update.rb
|
272
261
|
- lib/git_pivotal_tracker_integration.rb
|
262
|
+
- lib/git-pivotal-tracker-integration/command/prepare-commit-msg-win.sh
|
263
|
+
- lib/git-pivotal-tracker-integration/command/prepare-commit-msg.sh
|
264
|
+
- bin/git-deliver
|
265
|
+
- bin/git-finish
|
266
|
+
- bin/git-newbug
|
267
|
+
- bin/git-newfeature
|
268
|
+
- bin/git-qa
|
269
|
+
- bin/git-release
|
270
|
+
- bin/git-report
|
271
|
+
- bin/git-start
|
272
|
+
- bin/git-uat
|
273
273
|
- spec/git-pivotal-tracker-integration/command/base_spec.rb
|
274
274
|
- spec/git-pivotal-tracker-integration/command/configuration_spec.rb
|
275
275
|
- spec/git-pivotal-tracker-integration/command/finish_spec.rb
|
@@ -299,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
299
|
version: '0'
|
300
300
|
requirements: []
|
301
301
|
rubyforge_project:
|
302
|
-
rubygems_version: 2.
|
302
|
+
rubygems_version: 2.0.14
|
303
303
|
signing_key:
|
304
304
|
specification_version: 4
|
305
305
|
summary: Git commands for integration with Pivotal Tracker
|
@@ -313,4 +313,3 @@ test_files:
|
|
313
313
|
- spec/git-pivotal-tracker-integration/util/shell_spec.rb
|
314
314
|
- spec/git-pivotal-tracker-integration/util/story_spec.rb
|
315
315
|
- spec/git-pivotal-tracker-integration/version-update/gradle_spec.rb
|
316
|
-
has_rdoc:
|