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 CHANGED
@@ -1,3 +1,6 @@
1
+ 0.8.1:
2
+ - Updated dependencies for Savon, OAuth2, HTTPI.
3
+
1
4
  0.8.0:
2
5
  - Fixed issues #20, #78.
3
6
 
data/README CHANGED
@@ -17,6 +17,7 @@ The following gem libraries are required:
17
17
  - savon
18
18
  - httpi
19
19
  - oauth
20
+ - oauth2
20
21
 
21
22
  = Docs for Developers
22
23
 
@@ -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.8.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.8.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
@@ -21,6 +21,6 @@
21
21
 
22
22
  module AdsCommon
23
23
  module ApiConfig
24
- CLIENT_LIB_VERSION = '0.8.0'
24
+ CLIENT_LIB_VERSION = '0.8.1'
25
25
  end
26
26
  end
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.0
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-08-17 00:00:00.000000000 Z
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.0.0
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.0.0
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.0.0
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.0.0
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.7.1
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.7.1
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