google_contacts_api 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.8.7"
4
+ - "1.9.2"
5
+ - "1.9.3"
6
+ - jruby-18mode # JRuby in 1.8 mode
7
+ - jruby-19mode # JRuby in 1.9 mode
8
+ - rbx-18mode
9
+ - rbx-19mode
data/Gemfile CHANGED
@@ -8,11 +8,15 @@ gem "hashie"
8
8
 
9
9
  # Add dependencies to develop your gem here.
10
10
  # Include everything needed to run rake, tests, features, etc.
11
- group :development do
11
+ group :test, :development do
12
12
  gem "shoulda"
13
- gem "bundler"
14
- gem "jeweler"
15
13
  gem "simplecov"
16
14
  gem "rspec"
17
15
  gem "rdoc"
18
16
  end
17
+
18
+ group :development do
19
+ gem "bundler"
20
+ gem "jeweler"
21
+ gem "travis-lint"
22
+ end
data/README.markdown CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  An unofficial Google Contacts API for ruby. Might not be stable (but probably is).
4
4
 
5
+ ## Do the tests pass?
6
+
7
+ [![Build Status](https://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME].png)](https://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME])
8
+
5
9
  ## Usage
6
10
 
7
11
  You need to provide an OAuth client, with access token, from an OAuth access library to this library. I've tested it with OAuth::AccessToken from the [oauth-ruby](https://github.com/oauth/oauth-ruby) gem and an OAuth2::AccessToken from the [oauth2](https://github.com/intridea/oauth2) gem. I'm guessing there would be a few small changes in implementation details of the GoogleContactsApi::Api class if you use another library, mostly to change how the base get/post/put/delete methods work.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "google_contacts_api"
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alvin Liang"]
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
+ ".travis.yml",
21
22
  "Gemfile",
22
23
  "LICENSE.txt",
23
24
  "README.markdown",
@@ -55,22 +56,24 @@ Gem::Specification.new do |s|
55
56
  s.add_runtime_dependency(%q<json>, [">= 0"])
56
57
  s.add_runtime_dependency(%q<hashie>, [">= 0"])
57
58
  s.add_development_dependency(%q<shoulda>, [">= 0"])
58
- s.add_development_dependency(%q<bundler>, [">= 0"])
59
- s.add_development_dependency(%q<jeweler>, [">= 0"])
60
59
  s.add_development_dependency(%q<simplecov>, [">= 0"])
61
60
  s.add_development_dependency(%q<rspec>, [">= 0"])
62
61
  s.add_development_dependency(%q<rdoc>, [">= 0"])
62
+ s.add_development_dependency(%q<bundler>, [">= 0"])
63
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
64
+ s.add_development_dependency(%q<travis-lint>, [">= 0"])
63
65
  else
64
66
  s.add_dependency(%q<activesupport>, [">= 0"])
65
67
  s.add_dependency(%q<i18n>, [">= 0"])
66
68
  s.add_dependency(%q<json>, [">= 0"])
67
69
  s.add_dependency(%q<hashie>, [">= 0"])
68
70
  s.add_dependency(%q<shoulda>, [">= 0"])
69
- s.add_dependency(%q<bundler>, [">= 0"])
70
- s.add_dependency(%q<jeweler>, [">= 0"])
71
71
  s.add_dependency(%q<simplecov>, [">= 0"])
72
72
  s.add_dependency(%q<rspec>, [">= 0"])
73
73
  s.add_dependency(%q<rdoc>, [">= 0"])
74
+ s.add_dependency(%q<bundler>, [">= 0"])
75
+ s.add_dependency(%q<jeweler>, [">= 0"])
76
+ s.add_dependency(%q<travis-lint>, [">= 0"])
74
77
  end
75
78
  else
76
79
  s.add_dependency(%q<activesupport>, [">= 0"])
@@ -78,11 +81,12 @@ Gem::Specification.new do |s|
78
81
  s.add_dependency(%q<json>, [">= 0"])
79
82
  s.add_dependency(%q<hashie>, [">= 0"])
80
83
  s.add_dependency(%q<shoulda>, [">= 0"])
81
- s.add_dependency(%q<bundler>, [">= 0"])
82
- s.add_dependency(%q<jeweler>, [">= 0"])
83
84
  s.add_dependency(%q<simplecov>, [">= 0"])
84
85
  s.add_dependency(%q<rspec>, [">= 0"])
85
86
  s.add_dependency(%q<rdoc>, [">= 0"])
87
+ s.add_dependency(%q<bundler>, [">= 0"])
88
+ s.add_dependency(%q<jeweler>, [">= 0"])
89
+ s.add_dependency(%q<travis-lint>, [">= 0"])
86
90
  end
87
91
  end
88
92
 
@@ -43,14 +43,17 @@ describe "GoogleContactsApi" do
43
43
  end
44
44
 
45
45
  describe "parsing response code" do
46
+ before(:all) do
47
+ @Oauth = Struct.new(:code)
48
+ @Oauth2 = Struct.new(:status)
49
+ end
46
50
  it "should parse something that looks like an oauth gem response" do
47
- Response = Struct.new(:code)
48
- GoogleContactsApi::Api.parse_response_code(Response.new("401")).should == 401
51
+ GoogleContactsApi::Api.parse_response_code(@Oauth.new("401")).should == 401
49
52
  end
50
53
 
51
54
  it "should parse something that looks like an oauth2 gem response" do
52
- Response = Struct.new(:status)
53
- GoogleContactsApi::Api.parse_response_code(Response.new("401")).should == 401
55
+ Resp = Struct.new(:status)
56
+ GoogleContactsApi::Api.parse_response_code(@Oauth2.new("401")).should == 401
54
57
  end
55
58
  end
56
59
  end
@@ -68,7 +71,7 @@ describe "GoogleContactsApi" do
68
71
  end
69
72
  # Should hit the right URLs and return the right stuff
70
73
  it "should be able to get groups including system groups" do
71
- @user.api.should_receive(:get).with("groups/default/full", hash_including(v: 2))
74
+ @user.api.should_receive(:get).with("groups/default/full", hash_including(:v => 2))
72
75
  @user.groups.should == "group set"
73
76
  end
74
77
  it "should be able to get contacts" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_contacts_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -92,7 +92,7 @@ dependencies:
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  - !ruby/object:Gem::Dependency
95
- name: bundler
95
+ name: simplecov
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
@@ -108,7 +108,7 @@ dependencies:
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  - !ruby/object:Gem::Dependency
111
- name: jeweler
111
+ name: rspec
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -124,7 +124,7 @@ dependencies:
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
- name: simplecov
127
+ name: rdoc
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
@@ -140,7 +140,7 @@ dependencies:
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  - !ruby/object:Gem::Dependency
143
- name: rspec
143
+ name: bundler
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
@@ -156,7 +156,23 @@ dependencies:
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  - !ruby/object:Gem::Dependency
159
- name: rdoc
159
+ name: jeweler
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: travis-lint
160
176
  requirement: !ruby/object:Gem::Requirement
161
177
  none: false
162
178
  requirements:
@@ -181,6 +197,7 @@ extra_rdoc_files:
181
197
  - README.markdown
182
198
  files:
183
199
  - .document
200
+ - .travis.yml
184
201
  - Gemfile
185
202
  - LICENSE.txt
186
203
  - README.markdown
@@ -217,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
234
  version: '0'
218
235
  segments:
219
236
  - 0
220
- hash: -3015739328210497821
237
+ hash: 3165396795363090061
221
238
  required_rubygems_version: !ruby/object:Gem::Requirement
222
239
  none: false
223
240
  requirements: