gmail_contacts 1.5 → 1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +0 -0
- data/History.txt +5 -0
- data/lib/gmail_contacts.rb +1 -1
- data/lib/gmail_contacts/test_stub.rb +17 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/gmail_contacts.rb
CHANGED
@@ -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.
|
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-
|
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
|