google-api-client 0.6.4 → 0.7.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,6 @@
15
15
  require 'spec_helper'
16
16
 
17
17
  require 'faraday'
18
- require 'faraday/utils'
19
18
  require 'signet/oauth_1/client'
20
19
  require 'google/api_client'
21
20
  require 'google/api_client/version'
@@ -36,7 +35,7 @@ shared_examples_for 'configurable user agent' do
36
35
  it 'should not allow the user agent to be used with bogus values' do
37
36
  (lambda do
38
37
  client.user_agent = 42
39
- client.execute(:uri=>'http://www.google.com/')
38
+ client.execute(:uri=>'https://www.google.com/')
40
39
  end).should raise_error(TypeError)
41
40
  end
42
41
 
@@ -51,7 +50,7 @@ shared_examples_for 'configurable user agent' do
51
50
  [200, {}, ['']]
52
51
  end
53
52
  end
54
- client.execute(:uri=>'http://www.google.com/', :connection => conn)
53
+ client.execute(:uri=>'https://www.google.com/', :connection => conn)
55
54
  conn.verify
56
55
  end
57
56
  end
@@ -143,6 +142,21 @@ describe Google::APIClient do
143
142
  )
144
143
  end
145
144
 
145
+ it 'should accept options with batch/request style execute' do
146
+ client.authorization.access_token = "abcdef"
147
+ new_auth = Signet::OAuth2::Client.new(:access_token => '12345')
148
+ request = client.generate_request(
149
+ :api_method => @prediction.training.insert,
150
+ :parameters => {'data' => '12345'}
151
+ )
152
+ client.execute(
153
+ request,
154
+ :authorization => new_auth,
155
+ :connection => @connection
156
+ )
157
+ end
158
+
159
+
146
160
  it 'should accept options in array style execute' do
147
161
  client.authorization.access_token = "abcdef"
148
162
  new_auth = Signet::OAuth2::Client.new(:access_token => '12345')
data/spec/spec_helper.rb CHANGED
@@ -4,6 +4,8 @@ $LOAD_PATH.uniq!
4
4
  require 'rspec'
5
5
  require 'faraday'
6
6
 
7
+ Faraday::Adapter.load_middleware(:test)
8
+
7
9
  module Faraday
8
10
  class Connection
9
11
  def verify
@@ -22,6 +24,7 @@ module ConnectionHelpers
22
24
  block.call(stub)
23
25
  end
24
26
  connection = Faraday.new do |builder|
27
+ builder.options.params_encoder = Faraday::FlatParamsEncoder
25
28
  builder.adapter(:test, stubs)
26
29
  end
27
30
  end
data/tasks/gem.rake CHANGED
@@ -16,7 +16,7 @@ namespace :gem do
16
16
  s.email = PKG_AUTHOR_EMAIL
17
17
  s.summary = PKG_SUMMARY
18
18
  s.description = PKG_DESCRIPTION
19
-
19
+ s.license = 'Apache 2.0'
20
20
  s.files = PKG_FILES.to_a
21
21
  s.executables << 'google-api'
22
22
 
@@ -24,11 +24,11 @@ namespace :gem do
24
24
  s.rdoc_options.concat ['--main', 'README.md']
25
25
 
26
26
  # Dependencies used in the main library
27
- s.add_runtime_dependency('signet', '~> 0.4.5')
27
+ s.add_runtime_dependency('signet', '>= 0.5.0')
28
28
  s.add_runtime_dependency('addressable', '>= 2.3.2')
29
29
  s.add_runtime_dependency('uuidtools', '>= 2.1.0')
30
30
  s.add_runtime_dependency('autoparse', '>= 0.3.3')
31
- s.add_runtime_dependency('faraday', '~> 0.8.4')
31
+ s.add_runtime_dependency('faraday', '>= 0.9.0.rc5')
32
32
  s.add_runtime_dependency('multi_json', '>= 1.0.0')
33
33
  s.add_runtime_dependency('extlib', '>= 0.9.15')
34
34
  s.add_runtime_dependency('jwt', '>= 0.1.5')
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
5
- prerelease:
4
+ version: 0.7.0.rc2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Bob Aman
@@ -10,129 +9,162 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-06-03 00:00:00.000000000Z
12
+ date: 2013-09-09 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: signet
17
- requirement: &70272141588380 !ruby/object:Gem::Requirement
18
- none: false
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  requirements:
20
- - - ~>
18
+ - - ! '>='
21
19
  - !ruby/object:Gem::Version
22
- version: 0.4.5
20
+ version: 0.5.0
23
21
  type: :runtime
24
22
  prerelease: false
25
- version_requirements: *70272141588380
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 0.5.0
26
28
  - !ruby/object:Gem::Dependency
27
29
  name: addressable
28
- requirement: &70272141587760 !ruby/object:Gem::Requirement
29
- none: false
30
+ requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
32
  - - ! '>='
32
33
  - !ruby/object:Gem::Version
33
34
  version: 2.3.2
34
35
  type: :runtime
35
36
  prerelease: false
36
- version_requirements: *70272141587760
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: 2.3.2
37
42
  - !ruby/object:Gem::Dependency
38
43
  name: uuidtools
39
- requirement: &70272141587280 !ruby/object:Gem::Requirement
40
- none: false
44
+ requirement: !ruby/object:Gem::Requirement
41
45
  requirements:
42
46
  - - ! '>='
43
47
  - !ruby/object:Gem::Version
44
48
  version: 2.1.0
45
49
  type: :runtime
46
50
  prerelease: false
47
- version_requirements: *70272141587280
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 2.1.0
48
56
  - !ruby/object:Gem::Dependency
49
57
  name: autoparse
50
- requirement: &70272141586660 !ruby/object:Gem::Requirement
51
- none: false
58
+ requirement: !ruby/object:Gem::Requirement
52
59
  requirements:
53
60
  - - ! '>='
54
61
  - !ruby/object:Gem::Version
55
62
  version: 0.3.3
56
63
  type: :runtime
57
64
  prerelease: false
58
- version_requirements: *70272141586660
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.3.3
59
70
  - !ruby/object:Gem::Dependency
60
71
  name: faraday
61
- requirement: &70272141586100 !ruby/object:Gem::Requirement
62
- none: false
72
+ requirement: !ruby/object:Gem::Requirement
63
73
  requirements:
64
- - - ~>
74
+ - - ! '>='
65
75
  - !ruby/object:Gem::Version
66
- version: 0.8.4
76
+ version: 0.9.0.rc5
67
77
  type: :runtime
68
78
  prerelease: false
69
- version_requirements: *70272141586100
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: 0.9.0.rc5
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: multi_json
72
- requirement: &70272141585580 !ruby/object:Gem::Requirement
73
- none: false
86
+ requirement: !ruby/object:Gem::Requirement
74
87
  requirements:
75
88
  - - ! '>='
76
89
  - !ruby/object:Gem::Version
77
90
  version: 1.0.0
78
91
  type: :runtime
79
92
  prerelease: false
80
- version_requirements: *70272141585580
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: 1.0.0
81
98
  - !ruby/object:Gem::Dependency
82
99
  name: extlib
83
- requirement: &70272141585000 !ruby/object:Gem::Requirement
84
- none: false
100
+ requirement: !ruby/object:Gem::Requirement
85
101
  requirements:
86
102
  - - ! '>='
87
103
  - !ruby/object:Gem::Version
88
104
  version: 0.9.15
89
105
  type: :runtime
90
106
  prerelease: false
91
- version_requirements: *70272141585000
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: 0.9.15
92
112
  - !ruby/object:Gem::Dependency
93
113
  name: jwt
94
- requirement: &70272141584460 !ruby/object:Gem::Requirement
95
- none: false
114
+ requirement: !ruby/object:Gem::Requirement
96
115
  requirements:
97
116
  - - ! '>='
98
117
  - !ruby/object:Gem::Version
99
118
  version: 0.1.5
100
119
  type: :runtime
101
120
  prerelease: false
102
- version_requirements: *70272141584460
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 0.1.5
103
126
  - !ruby/object:Gem::Dependency
104
127
  name: launchy
105
- requirement: &70272141583860 !ruby/object:Gem::Requirement
106
- none: false
128
+ requirement: !ruby/object:Gem::Requirement
107
129
  requirements:
108
130
  - - ! '>='
109
131
  - !ruby/object:Gem::Version
110
132
  version: 2.1.1
111
133
  type: :runtime
112
134
  prerelease: false
113
- version_requirements: *70272141583860
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ! '>='
138
+ - !ruby/object:Gem::Version
139
+ version: 2.1.1
114
140
  - !ruby/object:Gem::Dependency
115
141
  name: rake
116
- requirement: &70272141583320 !ruby/object:Gem::Requirement
117
- none: false
142
+ requirement: !ruby/object:Gem::Requirement
118
143
  requirements:
119
144
  - - ! '>='
120
145
  - !ruby/object:Gem::Version
121
146
  version: 0.9.0
122
147
  type: :development
123
148
  prerelease: false
124
- version_requirements: *70272141583320
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: 0.9.0
125
154
  - !ruby/object:Gem::Dependency
126
155
  name: rspec
127
- requirement: &70272141582660 !ruby/object:Gem::Requirement
128
- none: false
156
+ requirement: !ruby/object:Gem::Requirement
129
157
  requirements:
130
158
  - - ! '>='
131
159
  - !ruby/object:Gem::Version
132
160
  version: 2.11.0
133
161
  type: :development
134
162
  prerelease: false
135
- version_requirements: *70272141582660
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: 2.11.0
136
168
  description: ! 'The Google API Ruby Client makes it trivial to discover and access
137
169
  supported
138
170
 
@@ -146,8 +178,11 @@ extensions: []
146
178
  extra_rdoc_files:
147
179
  - README.md
148
180
  files:
181
+ - lib/cacerts.pem
149
182
  - lib/compat/multi_json.rb
150
183
  - lib/google/api_client.rb
184
+ - lib/google/api_client/auth/compute_service_account.rb
185
+ - lib/google/api_client/auth/file_storage.rb
151
186
  - lib/google/api_client/auth/installed_app.rb
152
187
  - lib/google/api_client/auth/jwt_asserter.rb
153
188
  - lib/google/api_client/auth/key_utils.rb
@@ -162,6 +197,7 @@ files:
162
197
  - lib/google/api_client/discovery/schema.rb
163
198
  - lib/google/api_client/environment.rb
164
199
  - lib/google/api_client/errors.rb
200
+ - lib/google/api_client/gzip.rb
165
201
  - lib/google/api_client/logging.rb
166
202
  - lib/google/api_client/media.rb
167
203
  - lib/google/api_client/railtie.rb
@@ -176,7 +212,9 @@ files:
176
212
  - spec/fixtures/files/secret.pem
177
213
  - spec/google/api_client/batch_spec.rb
178
214
  - spec/google/api_client/discovery_spec.rb
215
+ - spec/google/api_client/gzip_spec.rb
179
216
  - spec/google/api_client/media_spec.rb
217
+ - spec/google/api_client/request_spec.rb
180
218
  - spec/google/api_client/result_spec.rb
181
219
  - spec/google/api_client/service_account_spec.rb
182
220
  - spec/google/api_client_spec.rb
@@ -188,14 +226,16 @@ files:
188
226
  - tasks/wiki.rake
189
227
  - tasks/yard.rake
190
228
  - CHANGELOG.md
191
- - CONTRIB.md
229
+ - CONTRIBUTING.md
192
230
  - Gemfile
193
231
  - LICENSE
194
232
  - README.md
195
233
  - Rakefile
196
234
  - bin/google-api
197
235
  homepage: http://code.google.com/p/google-api-ruby-client/
198
- licenses: []
236
+ licenses:
237
+ - Apache 2.0
238
+ metadata: {}
199
239
  post_install_message:
200
240
  rdoc_options:
201
241
  - --main
@@ -203,21 +243,19 @@ rdoc_options:
203
243
  require_paths:
204
244
  - lib
205
245
  required_ruby_version: !ruby/object:Gem::Requirement
206
- none: false
207
246
  requirements:
208
247
  - - ! '>='
209
248
  - !ruby/object:Gem::Version
210
249
  version: '0'
211
250
  required_rubygems_version: !ruby/object:Gem::Requirement
212
- none: false
213
251
  requirements:
214
- - - ! '>='
252
+ - - ! '>'
215
253
  - !ruby/object:Gem::Version
216
- version: '0'
254
+ version: 1.3.1
217
255
  requirements: []
218
256
  rubyforge_project:
219
- rubygems_version: 1.8.10
257
+ rubygems_version: 2.0.7
220
258
  signing_key:
221
- specification_version: 3
259
+ specification_version: 4
222
260
  summary: Package Summary
223
261
  test_files: []