ki_pivotal 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,16 +37,19 @@ module KiPivotal
37
37
  end
38
38
 
39
39
  def self.select_story(project_id, prompt)
40
+ limit = 20
40
41
  stories = MultiJson.load(KiPivotal::Api.new.stories_in_project(project_id))
41
42
 
43
+ stories = stories.reject { |story| %w{accepted unscheduled}.member? story['current_state'] }[0,20]
44
+
42
45
  if stories.size > 1
43
46
  index = repeatedly_choose_from(stories.map { |p| p['name'] }, prompt)
44
47
  else
45
48
  index = 0
46
49
  end
47
50
 
48
- $stderr.puts "\n Chosen story is '#{stories[index]['name']}'"
49
- stories[index]['id']
51
+ $stderr.puts "\n Chosen story is '#{stories[index]['name']}' (#{stories[index]['id']})"
52
+ stories[index]['id']
50
53
  end
51
54
 
52
55
  def self.select_project(prompt)
@@ -58,7 +61,7 @@ module KiPivotal
58
61
  index = 0
59
62
  end
60
63
 
61
- $stderr.puts "\n Chosen project is '#{projects[index]['name']}'"
64
+ $stderr.puts "\n Chosen project is '#{projects[index]['name']}' (#{projects[index]['id']})"
62
65
  projects[index]['id']
63
66
  end
64
67
 
@@ -1,3 +1,3 @@
1
1
  module KiPivotal
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ki_pivotal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-20 00:00:00.000000000 Z
13
+ date: 2012-09-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gli
@@ -242,12 +242,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
242
  - - ! '>='
243
243
  - !ruby/object:Gem::Version
244
244
  version: '0'
245
+ segments:
246
+ - 0
247
+ hash: -3896748397085585523
245
248
  required_rubygems_version: !ruby/object:Gem::Requirement
246
249
  none: false
247
250
  requirements:
248
251
  - - ! '>='
249
252
  - !ruby/object:Gem::Version
250
253
  version: '0'
254
+ segments:
255
+ - 0
256
+ hash: -3896748397085585523
251
257
  requirements: []
252
258
  rubyforge_project:
253
259
  rubygems_version: 1.8.24