gmail_contacts 1.5 → 1.6

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,8 @@
1
+ === 1.6 / 2009-08-27
2
+
3
+ * 1 minor enhancement
4
+ * ::stub has a new
5
+
1
6
  === 1.5 / 2009-08-20
2
7
 
3
8
  * 1 minor enhancement
@@ -10,7 +10,7 @@ require 'nokogiri'
10
10
 
11
11
  class GmailContacts
12
12
 
13
- VERSION = '1.5'
13
+ VERSION = '1.6'
14
14
 
15
15
  Contact = Struct.new :title, :emails, :ims, :phone_numbers, :addresses,
16
16
  :photo_url
@@ -19,7 +19,10 @@ require 'gmail_contacts'
19
19
  # end
20
20
  #
21
21
  # If you set the authsub token to 'recycled_authsub_token', the test stub will
22
- # raise a GData::Client::AuthorizationError.
22
+ # raise a GData::Client::AuthorizationError when you call #get_token.
23
+ #
24
+ # If you set the authsub token to 'wrong_user_authsub_token', the test stub
25
+ # will raise a GData::Client::AuthorizationError when you call #fetch.
23
26
 
24
27
  class GmailContacts::TestStub
25
28
 
@@ -153,6 +156,19 @@ class GmailContacts
153
156
  @contact_api.stub_data << GmailContacts::TestStub::CONTACTS
154
157
  @contact_api.stub_data << GmailContacts::TestStub::CONTACTS2
155
158
  end
159
+
160
+ alias old_fetch fetch
161
+
162
+ def fetch(*args)
163
+ if @authsub_token == 'wrong_user_authsub_token' then
164
+ res = GData::HTTP::Response.new
165
+ res.status_code = 403
166
+ res.body = 'wrong user'
167
+ raise GData::Client::AuthorizationError, res
168
+ end
169
+
170
+ old_fetch(*args)
171
+ end
156
172
  end
157
173
 
158
174
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmail_contacts
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.5"
4
+ version: "1.6"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -30,7 +30,7 @@ cert_chain:
30
30
  x52qPcexcYZR7w==
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-08-20 00:00:00 -07:00
33
+ date: 2009-08-27 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file