google-ads-common 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/README +1 -0
- data/lib/ads_common/api_config.rb +2 -2
- data/lib/ads_common/auth/oauth2_handler.rb +7 -1
- data/lib/ads_common/version.rb +1 -1
- metadata +8 -8
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -123,7 +123,7 @@ module AdsCommon
|
|
123
123
|
#
|
124
124
|
def endpoint(environment, version, service)
|
125
125
|
base = get_wsdl_base(environment, version)
|
126
|
-
# TODO(dklimkin): Unflatten subdir constants. Cross-API refactor 0.
|
126
|
+
# TODO(dklimkin): Unflatten subdir constants. Cross-API refactor 0.9.0.
|
127
127
|
if !subdir_config().nil?
|
128
128
|
base = base.to_s + subdir_config()[[version, service]].to_s
|
129
129
|
end
|
@@ -141,7 +141,7 @@ module AdsCommon
|
|
141
141
|
#
|
142
142
|
def subdir(version, service)
|
143
143
|
return nil if subdir_config().nil?
|
144
|
-
# TODO(dklimkin): Unflatten subdir constants. Cross-API refactor 0.
|
144
|
+
# TODO(dklimkin): Unflatten subdir constants. Cross-API refactor 0.9.0.
|
145
145
|
subdir_config()[[version, service]]
|
146
146
|
end
|
147
147
|
|
@@ -69,8 +69,8 @@ module AdsCommon
|
|
69
69
|
|
70
70
|
# Overrides base get_token method to account for the token expiration.
|
71
71
|
def get_token(credentials = nil)
|
72
|
-
refresh_token! if !@token.nil? && @token.expired?
|
73
72
|
token = super(credentials)
|
73
|
+
token = refresh_token! if !token.nil? && token.expired?
|
74
74
|
return oauth_token_to_hash(token)
|
75
75
|
end
|
76
76
|
|
@@ -123,6 +123,12 @@ module AdsCommon
|
|
123
123
|
raise AdsCommon::Errors::AuthError,
|
124
124
|
'Client secret is not included in the credentials.'
|
125
125
|
end
|
126
|
+
|
127
|
+
if credentials[:oauth2_token] &&
|
128
|
+
!credentials[:oauth2_token].kind_of?(Hash)
|
129
|
+
raise AdsCommon::Errors::AuthError,
|
130
|
+
'OAuth2 token provided must be a Hash'
|
131
|
+
end
|
126
132
|
end
|
127
133
|
|
128
134
|
# Auxiliary method to generate an authentication token for logging via
|
data/lib/ads_common/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-ads-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: savon
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 1.
|
30
|
+
version: 1.2.0
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: httpi
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 1.
|
38
|
+
version: 1.1.0
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.
|
46
|
+
version: 1.1.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: oauth
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
requirements:
|
68
68
|
- - ~>
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.8.0
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 0.
|
78
|
+
version: 0.8.0
|
79
79
|
description: Essential utilities shared by all Ads Ruby client libraries
|
80
80
|
email:
|
81
81
|
- api.dklimkin@gmail.com
|