google_apps 0.4.8 → 0.4.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/google_apps/transport.rb +11 -6
  2. metadata +33 -25
@@ -131,18 +131,17 @@ module GoogleApps
131
131
  #
132
132
  # get_users returns the final response from google.
133
133
  def get_users(options = {})
134
- # TODO: Limit isn't working right. It stops the retrieval but not as soon as it should.
135
- @feeds, page = [], 0
134
+ @feeds, pages = [], 0
136
135
 
137
136
  options[:limit] ? limit = options[:limit] : limit = 1000000
138
137
  options[:start] ? get(@user + "?startUsername=#{options[:start]}") : get(@user)
139
138
 
140
139
  add_feed
140
+ pages += 1
141
141
 
142
- while (next_page = get_next(@feeds.last.xml)) and (page * PAGE_SIZE[:user] < limit)
143
- get @feeds.last.next_page
144
- add_feed
145
- page += 1
142
+ while (@feeds.last.next_page) and (pages * PAGE_SIZE[:user] < limit)
143
+ get_next_page
144
+ pages += 1
146
145
  end
147
146
 
148
147
  @response
@@ -293,6 +292,12 @@ module GoogleApps
293
292
  end
294
293
 
295
294
 
295
+ def get_next_page
296
+ get @feeds.last.next_page
297
+ add_feed
298
+ end
299
+
300
+
296
301
  # add_feed adds a feed to the @feeds array.
297
302
  def add_feed
298
303
  @feeds << GoogleApps::Atom.feed(@response.body)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_apps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.8.1
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: 2012-07-08 00:00:00.000000000 Z
12
+ date: 2012-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: libxml-ruby
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70095956650300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,32 +21,41 @@ dependencies:
21
21
  version: 2.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 2.2.2
24
+ version_requirements: *70095956650300
30
25
  description: Library for interfacing with Google Apps' Domain and Application APIs
31
26
  email:
32
27
  executables: []
33
28
  extensions: []
34
29
  extra_rdoc_files: []
35
30
  files:
36
- - lib/google_apps/atom/atom.rb
37
- - lib/google_apps/atom/document.rb
38
- - lib/google_apps/atom/export.rb
39
- - lib/google_apps/atom/feed.rb
40
- - lib/google_apps/atom/group.rb
41
- - lib/google_apps/atom/group_member.rb
42
- - lib/google_apps/atom/message.rb
43
- - lib/google_apps/atom/message_attributes.rb
44
- - lib/google_apps/atom/nickname.rb
45
- - lib/google_apps/atom/node.rb
46
- - lib/google_apps/atom/public_key.rb
47
- - lib/google_apps/atom/user.rb
48
- - lib/google_apps/transport.rb
49
- - lib/google_apps.rb
31
+ - !binary |-
32
+ bGliL2dvb2dsZV9hcHBzL2F0b20vYXRvbS5yYg==
33
+ - !binary |-
34
+ bGliL2dvb2dsZV9hcHBzL2F0b20vZG9jdW1lbnQucmI=
35
+ - !binary |-
36
+ bGliL2dvb2dsZV9hcHBzL2F0b20vZXhwb3J0LnJi
37
+ - !binary |-
38
+ bGliL2dvb2dsZV9hcHBzL2F0b20vZmVlZC5yYg==
39
+ - !binary |-
40
+ bGliL2dvb2dsZV9hcHBzL2F0b20vZ3JvdXAucmI=
41
+ - !binary |-
42
+ bGliL2dvb2dsZV9hcHBzL2F0b20vZ3JvdXBfbWVtYmVyLnJi
43
+ - !binary |-
44
+ bGliL2dvb2dsZV9hcHBzL2F0b20vbWVzc2FnZS5yYg==
45
+ - !binary |-
46
+ bGliL2dvb2dsZV9hcHBzL2F0b20vbWVzc2FnZV9hdHRyaWJ1dGVzLnJi
47
+ - !binary |-
48
+ bGliL2dvb2dsZV9hcHBzL2F0b20vbmlja25hbWUucmI=
49
+ - !binary |-
50
+ bGliL2dvb2dsZV9hcHBzL2F0b20vbm9kZS5yYg==
51
+ - !binary |-
52
+ bGliL2dvb2dsZV9hcHBzL2F0b20vcHVibGljX2tleS5yYg==
53
+ - !binary |-
54
+ bGliL2dvb2dsZV9hcHBzL2F0b20vdXNlci5yYg==
55
+ - !binary |-
56
+ bGliL2dvb2dsZV9hcHBzL3RyYW5zcG9ydC5yYg==
57
+ - !binary |-
58
+ bGliL2dvb2dsZV9hcHBzLnJi
50
59
  homepage: https://github.com/LeakyBucket/google_apps
51
60
  licenses: []
52
61
  post_install_message:
@@ -67,9 +76,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
76
  version: '0'
68
77
  requirements: []
69
78
  rubyforge_project:
70
- rubygems_version: 1.8.23
79
+ rubygems_version: 1.8.10
71
80
  signing_key:
72
81
  specification_version: 3
73
82
  summary: Google Apps APIs
74
83
  test_files: []
75
- has_rdoc: