v2gpti 1.2.1 → 1.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d541d1ae6510104903cfe8f73207036087c52106
4
- data.tar.gz: 436a7ee1b58ca1045b73941c55287fc2ec1f000f
3
+ metadata.gz: a59e8df79c07240cc985943a8f86063f6fd4754a
4
+ data.tar.gz: e78bda21eeb234d5b69bbf29da0c59e9fb691e4f
5
5
  SHA512:
6
- metadata.gz: 3d07ff4779519df5bf93b1dd7a0f61c181aabd025ca70c919e2f2411ed00f5e25d0be9a3a9efdff744c5c8c6254aba7b8d6e97bbd52c2435b3c49b5aeae29a57
7
- data.tar.gz: 389862a47a9ec38f2a2c58b85a07cac1547b860168872f6fbf2b5ab65719ae1b294038d7c80b561b4cf909b0e02ca4da2e30ddf7a1e92f6ae0c1e09a19976450
6
+ metadata.gz: e1ffe4b42c1c2a006c79de8a2d065204b5a508ac5322f28aa01b7535278358f7a8e187a49c349add6d55f82294ae648109ee1cd10377962b2fb9888f14150717
7
+ data.tar.gz: c75dfc4a68dfde1185ad9ca7bb71d8bdcd5d1dfb1d3e53a2d6e41f65c3d190c0e54569807efedfe3ae77932cecaaccac2ea1cd2b8a29466cb69966e38bd826b2
@@ -19,6 +19,9 @@ module GitPivotalTrackerIntegration
19
19
  # The class that encapsulates releasing a Pivotal Tracker Story
20
20
  class Release < Base
21
21
 
22
+ CANDIDATE_STATES = %w(delivered unstarted).freeze
23
+ CANDIDATE_TYPES = %w(bug chore feature release)
24
+
22
25
  # Releases a Pivotal Tracker story by doing the following steps:
23
26
  # * Update the version to the release version
24
27
  # * Create a tag for the release version
@@ -125,9 +128,6 @@ module GitPivotalTrackerIntegration
125
128
 
126
129
  private
127
130
 
128
- CANDIDATE_STATES = %w(delivered unstarted).freeze
129
- CANDIDATE_TYPES = %w(bug chore feature release)
130
-
131
131
  def add_version_tag_to_stories(stories, release_story)
132
132
  all_stories = stories.dup
133
133
  all_stories << release_story
@@ -172,8 +172,8 @@ module GitPivotalTrackerIntegration
172
172
  def pull_out_rejected_stories(release_story)
173
173
  rejected_stories = @project.stories(filter: "current_state:rejected type:bug,chore,feature")
174
174
  rejected_stories.each do |rejected_story|
175
- rejected_stories.after_id = release_story.id
176
- rejected_stories.save
175
+ rejected_story.after_id = release_story.id
176
+ rejected_story.save
177
177
  end
178
178
  end
179
179
 
@@ -43,7 +43,7 @@ module GitPivotalTrackerIntegration
43
43
 
44
44
  abort "There are no available stories." if story.nil?
45
45
 
46
- if story.story_type == "feature" && story.estimate.to_i <= 0
46
+ if story.story_type == "feature" && story.estimate.to_i < 0
47
47
  story.estimate = estimate_story
48
48
  story.save
49
49
  end
@@ -93,8 +93,8 @@ module GitPivotalTrackerIntegration
93
93
  def start_on_tracker(story)
94
94
  print 'Starting story on Pivotal Tracker... '
95
95
  story.attributes = {
96
- :current_state => 'started',
97
- :owned_by => Util::Git.get_config('user.name')
96
+ :current_state => 'started',
97
+ :owner_ids => [@client.me.id],
98
98
  }
99
99
  story.save
100
100
  puts 'OK'
@@ -68,7 +68,7 @@ module GitPivotalTrackerIntegration
68
68
  # story type from (feature, bug, chore)
69
69
  # state from (rejected unstarted unscheduled)
70
70
  # if story type is "feature", then retrieve only estimated ones.
71
- criteria = "current_state:#{CANDIDATE_STATES.join(',')}"
71
+ criteria = " state:unstarted,rejected,unscheduled"
72
72
 
73
73
  if %w(feature bug chore).include?(filter)
74
74
  criteria << " type:#{filter}"
@@ -145,7 +145,7 @@ module GitPivotalTrackerIntegration
145
145
  release_type = (type == "b") ? "build" : "version"
146
146
 
147
147
  criteria = "type:release"
148
- criteria << " current_state:#{CANDIDATE_STATES.join(',')}"
148
+ criteria << " state:unstarted,rejected,unscheduled"
149
149
  criteria << " name:/#{type}*/" #story name starts with b or v
150
150
 
151
151
  candidates = project.stories(filter: criteria, limit: limit)
@@ -180,7 +180,7 @@ module GitPivotalTrackerIntegration
180
180
  candidates = project.stories filter: "type:release name:/#{type}*/"
181
181
  candidates = candidates.select do |story|
182
182
  labels = story.labels.map(&:name)
183
- !labels.include?(story.name)
183
+ labels.include?(story.name)
184
184
  end
185
185
  candidates.sort! { |x,y| Gem::Version.new(y.name[1 .. -1]) <=> Gem::Version.new(x.name[1 .. -1]) }
186
186
 
@@ -188,15 +188,16 @@ module GitPivotalTrackerIntegration
188
188
  end
189
189
 
190
190
  def self.set_next_release_number(last_release, release_type)
191
- if release_type == "b"
192
- return last_release.name.next # just increment the last number
193
- end
194
- if release_type == "v"
195
- version_split = last_release.name.split(/\./)
196
- last_incremented_number=version_split.last.next
191
+ case release_type
192
+ when "build"
193
+ # just increment the last number
194
+ last_release.name.next
195
+ when "version"
196
+ version_split = last_release.name.split(/\./)
197
+ last_incremented_number = version_split.last.next
197
198
  version_split.pop
198
199
  version_split.push(last_incremented_number)
199
- return version_split.join(".")
200
+ version_split.join(".")
200
201
  end
201
202
  end
202
203
 
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.2.1
4
+ version: 1.2.2
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: 2015-04-29 00:00:00.000000000 Z
13
+ date: 2015-05-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: highline
@@ -338,15 +338,15 @@ description: Provides a set of additional Git commands to help developers when w
338
338
  with Pivotal Tracker
339
339
  email: jeff@xxxxxxxxx.com
340
340
  executables:
341
- - git-newbug
342
341
  - git-deliver
343
- - git-uat
342
+ - git-finish
343
+ - git-newbug
344
+ - git-newfeature
344
345
  - git-qa
345
- - git-report
346
346
  - git-release
347
- - git-finish
347
+ - git-report
348
348
  - git-start
349
- - git-newfeature
349
+ - git-uat
350
350
  extensions: []
351
351
  extra_rdoc_files: []
352
352
  files:
@@ -354,79 +354,79 @@ files:
354
354
  - NOTICE
355
355
  - README.md
356
356
  - config_template
357
- - lib/git-pivotal-tracker-integration.rb
358
- - lib/git-pivotal-tracker-integration/version-update/gradle.rb
359
- - lib/git-pivotal-tracker-integration/util/story.rb
360
- - lib/git-pivotal-tracker-integration/util/togglV8.rb
361
- - lib/git-pivotal-tracker-integration/util/git.rb
362
- - lib/git-pivotal-tracker-integration/util/shell.rb
363
- - lib/git-pivotal-tracker-integration/command/newfeature.rb
364
357
  - lib/git-pivotal-tracker-integration/command/base.rb
365
- - lib/git-pivotal-tracker-integration/command/finish.rb
366
- - lib/git-pivotal-tracker-integration/command/start.rb
358
+ - lib/git-pivotal-tracker-integration/command/configuration.rb
367
359
  - lib/git-pivotal-tracker-integration/command/deliver.rb
360
+ - lib/git-pivotal-tracker-integration/command/finish.rb
368
361
  - lib/git-pivotal-tracker-integration/command/newbug.rb
369
- - lib/git-pivotal-tracker-integration/command/configuration.rb
362
+ - lib/git-pivotal-tracker-integration/command/newfeature.rb
370
363
  - lib/git-pivotal-tracker-integration/command/release.rb
371
364
  - lib/git-pivotal-tracker-integration/command/report.rb
365
+ - lib/git-pivotal-tracker-integration/command/start.rb
366
+ - lib/git-pivotal-tracker-integration/util/git.rb
367
+ - lib/git-pivotal-tracker-integration/util/shell.rb
368
+ - lib/git-pivotal-tracker-integration/util/story.rb
369
+ - lib/git-pivotal-tracker-integration/util/togglV8.rb
370
+ - lib/git-pivotal-tracker-integration/version-update/gradle.rb
371
+ - lib/git-pivotal-tracker-integration.rb
372
372
  - lib/git-pivotal-tracker-integration/command/prepare-commit-msg-win.sh
373
373
  - lib/git-pivotal-tracker-integration/command/prepare-commit-msg.sh
374
- - bin/git-newbug
375
374
  - bin/git-deliver
376
- - bin/git-uat
375
+ - bin/git-finish
376
+ - bin/git-newbug
377
+ - bin/git-newfeature
377
378
  - bin/git-qa
378
- - bin/git-report
379
379
  - bin/git-release
380
- - bin/git-finish
380
+ - bin/git-report
381
381
  - bin/git-start
382
- - bin/git-newfeature
383
- - tracker_api/lib/tracker_api.rb
384
- - tracker_api/lib/tracker_api/resources/me.rb
385
- - tracker_api/lib/tracker_api/resources/task.rb
386
- - tracker_api/lib/tracker_api/resources/project_membership.rb
387
- - tracker_api/lib/tracker_api/resources/story.rb
382
+ - bin/git-uat
383
+ - tracker_api/lib/tracker_api/client.rb
384
+ - tracker_api/lib/tracker_api/endpoints/activity.rb
385
+ - tracker_api/lib/tracker_api/endpoints/comments.rb
386
+ - tracker_api/lib/tracker_api/endpoints/epic.rb
387
+ - tracker_api/lib/tracker_api/endpoints/epics.rb
388
+ - tracker_api/lib/tracker_api/endpoints/file_attachment.rb
389
+ - tracker_api/lib/tracker_api/endpoints/iterations.rb
390
+ - tracker_api/lib/tracker_api/endpoints/me.rb
391
+ - tracker_api/lib/tracker_api/endpoints/memberships.rb
392
+ - tracker_api/lib/tracker_api/endpoints/notifications.rb
393
+ - tracker_api/lib/tracker_api/endpoints/project.rb
394
+ - tracker_api/lib/tracker_api/endpoints/projects.rb
395
+ - tracker_api/lib/tracker_api/endpoints/stories.rb
396
+ - tracker_api/lib/tracker_api/endpoints/story.rb
397
+ - tracker_api/lib/tracker_api/endpoints/tasks.rb
398
+ - tracker_api/lib/tracker_api/error.rb
399
+ - tracker_api/lib/tracker_api/logger.rb
400
+ - tracker_api/lib/tracker_api/resources/account.rb
401
+ - tracker_api/lib/tracker_api/resources/activity.rb
388
402
  - tracker_api/lib/tracker_api/resources/base.rb
389
403
  - tracker_api/lib/tracker_api/resources/change.rb
390
- - tracker_api/lib/tracker_api/resources/notification.rb
391
- - tracker_api/lib/tracker_api/resources/project.rb
404
+ - tracker_api/lib/tracker_api/resources/comment.rb
405
+ - tracker_api/lib/tracker_api/resources/epic.rb
392
406
  - tracker_api/lib/tracker_api/resources/file_attachment.rb
393
407
  - tracker_api/lib/tracker_api/resources/iteration.rb
394
- - tracker_api/lib/tracker_api/resources/epic.rb
395
- - tracker_api/lib/tracker_api/resources/primary_resource.rb
396
- - tracker_api/lib/tracker_api/resources/account.rb
397
- - tracker_api/lib/tracker_api/resources/time_zone.rb
398
- - tracker_api/lib/tracker_api/resources/comment.rb
399
- - tracker_api/lib/tracker_api/resources/membership_summary.rb
400
408
  - tracker_api/lib/tracker_api/resources/label.rb
409
+ - tracker_api/lib/tracker_api/resources/me.rb
410
+ - tracker_api/lib/tracker_api/resources/membership_summary.rb
411
+ - tracker_api/lib/tracker_api/resources/notification.rb
401
412
  - tracker_api/lib/tracker_api/resources/person.rb
402
- - tracker_api/lib/tracker_api/resources/activity.rb
403
- - tracker_api/lib/tracker_api/error.rb
404
- - tracker_api/lib/tracker_api/logger.rb
405
- - tracker_api/lib/tracker_api/client.rb
406
- - tracker_api/lib/tracker_api/endpoints/projects.rb
407
- - tracker_api/lib/tracker_api/endpoints/me.rb
408
- - tracker_api/lib/tracker_api/endpoints/story.rb
409
- - tracker_api/lib/tracker_api/endpoints/iterations.rb
410
- - tracker_api/lib/tracker_api/endpoints/project.rb
411
- - tracker_api/lib/tracker_api/endpoints/memberships.rb
412
- - tracker_api/lib/tracker_api/endpoints/file_attachment.rb
413
- - tracker_api/lib/tracker_api/endpoints/tasks.rb
414
- - tracker_api/lib/tracker_api/endpoints/epic.rb
415
- - tracker_api/lib/tracker_api/endpoints/epics.rb
416
- - tracker_api/lib/tracker_api/endpoints/stories.rb
417
- - tracker_api/lib/tracker_api/endpoints/notifications.rb
418
- - tracker_api/lib/tracker_api/endpoints/comments.rb
419
- - tracker_api/lib/tracker_api/endpoints/activity.rb
413
+ - tracker_api/lib/tracker_api/resources/primary_resource.rb
414
+ - tracker_api/lib/tracker_api/resources/project.rb
415
+ - tracker_api/lib/tracker_api/resources/project_membership.rb
416
+ - tracker_api/lib/tracker_api/resources/story.rb
417
+ - tracker_api/lib/tracker_api/resources/task.rb
418
+ - tracker_api/lib/tracker_api/resources/time_zone.rb
420
419
  - tracker_api/lib/tracker_api/version.rb
421
- - spec/git-pivotal-tracker-integration/version-update/gradle_spec.rb
422
- - spec/git-pivotal-tracker-integration/util/shell_spec.rb
423
- - spec/git-pivotal-tracker-integration/util/git_spec.rb
424
- - spec/git-pivotal-tracker-integration/util/story_spec.rb
420
+ - tracker_api/lib/tracker_api.rb
421
+ - spec/git-pivotal-tracker-integration/command/base_spec.rb
425
422
  - spec/git-pivotal-tracker-integration/command/configuration_spec.rb
426
- - spec/git-pivotal-tracker-integration/command/release_spec.rb
427
423
  - spec/git-pivotal-tracker-integration/command/finish_spec.rb
428
- - spec/git-pivotal-tracker-integration/command/base_spec.rb
424
+ - spec/git-pivotal-tracker-integration/command/release_spec.rb
429
425
  - spec/git-pivotal-tracker-integration/command/start_spec.rb
426
+ - spec/git-pivotal-tracker-integration/util/git_spec.rb
427
+ - spec/git-pivotal-tracker-integration/util/shell_spec.rb
428
+ - spec/git-pivotal-tracker-integration/util/story_spec.rb
429
+ - spec/git-pivotal-tracker-integration/version-update/gradle_spec.rb
430
430
  homepage: https://github.com/v2dev/V2GPTI
431
431
  licenses:
432
432
  - Apache-2.0
@@ -452,13 +452,13 @@ signing_key:
452
452
  specification_version: 4
453
453
  summary: Git commands for integration with Pivotal Tracker
454
454
  test_files:
455
- - spec/git-pivotal-tracker-integration/version-update/gradle_spec.rb
456
- - spec/git-pivotal-tracker-integration/util/shell_spec.rb
457
- - spec/git-pivotal-tracker-integration/util/git_spec.rb
458
- - spec/git-pivotal-tracker-integration/util/story_spec.rb
455
+ - spec/git-pivotal-tracker-integration/command/base_spec.rb
459
456
  - spec/git-pivotal-tracker-integration/command/configuration_spec.rb
460
- - spec/git-pivotal-tracker-integration/command/release_spec.rb
461
457
  - spec/git-pivotal-tracker-integration/command/finish_spec.rb
462
- - spec/git-pivotal-tracker-integration/command/base_spec.rb
458
+ - spec/git-pivotal-tracker-integration/command/release_spec.rb
463
459
  - spec/git-pivotal-tracker-integration/command/start_spec.rb
460
+ - spec/git-pivotal-tracker-integration/util/git_spec.rb
461
+ - spec/git-pivotal-tracker-integration/util/shell_spec.rb
462
+ - spec/git-pivotal-tracker-integration/util/story_spec.rb
463
+ - spec/git-pivotal-tracker-integration/version-update/gradle_spec.rb
464
464
  has_rdoc: