rally_api 0.9.18 → 0.9.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -191,7 +191,7 @@ module RallyAPI
191
191
  end
192
192
 
193
193
  def read_collection(collection)
194
- results = @rally_rest.reread(collection)["Results"]
194
+ results = @rally_rest.read_collection(collection, {:pagesize => 200})["Results"]
195
195
  RallyCollection.new(results.collect { |object| RallyObject.new(@rally_rest, object) })
196
196
  end
197
197
 
@@ -187,6 +187,18 @@ module RallyAPI
187
187
  json_response[rally_type]
188
188
  end
189
189
 
190
+ def read_collection(collection_hash, params = {})
191
+ collection_count = collection_hash['Count']
192
+ start = 1
193
+ pagesize = params[:pagesize] || 200
194
+ full_collection = []
195
+ start.step(collection_count, pagesize).each do |page_start|
196
+ page = reread(collection_hash, {:pagesize => 200, :startindex => page_start})
197
+ full_collection.concat(page["Results"])
198
+ end
199
+ {"Results" => full_collection}
200
+ end
201
+
190
202
  def update(type, obj_id, fields, params = {})
191
203
  type = check_type(type)
192
204
  ref = check_id(type.to_s, obj_id)
@@ -4,5 +4,5 @@
4
4
  #of the applicable Subscription Agreement between your company and
5
5
  #Rally Software Development Corp.
6
6
  module RallyAPI
7
- VERSION = "0.9.18"
7
+ VERSION = "0.9.20"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rally_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.18
4
+ version: 0.9.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-26 00:00:00.000000000Z
12
+ date: 2013-07-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httpclient
16
- requirement: &70250729329280 !ruby/object:Gem::Requirement
16
+ requirement: &70131431547920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70250729329280
24
+ version_requirements: *70131431547920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov
27
- requirement: &70250729355980 !ruby/object:Gem::Requirement
27
+ requirement: &70131431547500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70250729355980
35
+ version_requirements: *70131431547500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70250729355520 !ruby/object:Gem::Requirement
38
+ requirement: &70131431547040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70250729355520
46
+ version_requirements: *70131431547040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70250729355100 !ruby/object:Gem::Requirement
49
+ requirement: &70131431546620 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70250729355100
57
+ version_requirements: *70131431546620
58
58
  description: API wrapper for Rally's JSON REST web services api
59
59
  email:
60
60
  - dsmith@rallydev.com