v2gpti 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f431701152b119a2bb49c8bab7c635fbce512e6
4
- data.tar.gz: a3e2227f7e14c032bec17f62912a8e6754b8e9a6
3
+ metadata.gz: 4bdffa3f751ba70b4294b507f65a7c3f6674568d
4
+ data.tar.gz: f8bc500b92c556a783be55b4e72e3495738f2d56
5
5
  SHA512:
6
- metadata.gz: 6ce5d2d9f19781478845ed4520afa6abb1a6c86d3b3ed24bf311fc5f6970d26eeb4e3e11c7052dbfc741bef08fb896df3de41942eac392d03b3926980d940498
7
- data.tar.gz: bf7a10d09e4eb3e1c83626c72a728d4b825165422792171b1e9b72baad6df0d780b7b4d3076e821a26d4758faeed6cc4d158a3a0a94b0c27839dfd57a661d72c
6
+ metadata.gz: 98c1e7fe0b651c23052b69eb842f5899622da3109275097a0cb2258e485c594b864c1f0371efb64f52495613b40f4e016eeb1c0a96ad073cf4a7e4b4968cf47b
7
+ data.tar.gz: d2f52f333ddca3fe06e2951142a06d8e57fed152b4a43bfdd4d53773fc92e542c24f996f6d1003cb2c6ba2388d845e0cf432561a3bcd6700de9f77db04963582
@@ -57,6 +57,9 @@ def commit_new_build
57
57
 
58
58
  puts "build_number:#{build_number}"
59
59
  project_directory = ((GitPivotalTrackerIntegration::Util::Shell.exec 'find . -name "*.xcodeproj" 2>/dev/null').split /\/(?=[^\/]*$)/)[0]
60
+ if project_directory.nil?
61
+ return
62
+ end
60
63
  working_directory = (GitPivotalTrackerIntegration::Util::Shell.exec "pwd").chop
61
64
  puts "working_directory:#{working_directory}*"
62
65
 
@@ -154,9 +154,12 @@ class GitPivotalTrackerIntegration::Util::Story
154
154
  }
155
155
  candidates = estimated_candidates
156
156
 
157
-
157
+ if candidates.length != 0
158
158
  story = choose do |menu|
159
- puts "\nUnestimated features can not be started.\n\n"
159
+ if type != "release"
160
+ puts "\nUnestimated features can not be started.\n\n"
161
+ end
162
+
160
163
  menu.prompt = 'Choose a story to start: '
161
164
 
162
165
  candidates.each do |story|
@@ -166,9 +169,40 @@ class GitPivotalTrackerIntegration::Util::Story
166
169
  end
167
170
 
168
171
  puts
172
+ else
173
+ if type == "release"
174
+ last_release_number = last_release(project, release_type)
175
+ last_release_type_string = (release_type == "b")?"build":"version"
176
+ puts "There are no available release stories. The last #{last_release_type_string} release was #{last_release_number}."
177
+ next_release_number = ask("To create a new #{last_release_type_string}, enter a name for the new release story:")
178
+ story = self.create_new_release(project, next_release_number)
179
+ else
180
+ puts "There are no available stories."
181
+ end
182
+ end
183
+
169
184
 
170
185
 
171
186
  story
172
187
  end
173
188
 
189
+ def self.last_release (project, release_type)
190
+ criteria = {
191
+ :story_type => "release"
192
+ }
193
+
194
+ candidates = project.stories.all criteria
195
+ candidates = candidates.select {|x| x.name[0]==release_type}
196
+
197
+ candidates[-1].name
198
+ end
199
+
200
+ def self.create_new_release (project, next_release_number)
201
+ new_story = PivotalTracker::Story.new
202
+ new_story.project_id = project.id
203
+ new_story.story_type = "release"
204
+ new_story.name = next_release_number
205
+
206
+ uploaded_story = new_story.create
207
+ end
174
208
  end
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.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hale
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-16 00:00:00.000000000 Z
12
+ date: 2014-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline