google-ads-common 0.12.3 → 0.12.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d34659b849a7c7d8c74e8c55ec41687e20b6f27
4
- data.tar.gz: b0166a1ea29fec1b996d2dcd1b7d7c56e3e7088e
3
+ metadata.gz: 3f6a5db7dfd14b7bf4d37bdbc437877bc0c62e00
4
+ data.tar.gz: 4f6a32a4c035bc75da84395ebf93f074eb262b34
5
5
  SHA512:
6
- metadata.gz: 8cf1179914225735a33c703ae6457fee953007e9b264c039027bd7c54d5ddde6df99cde904d2c3a8987efda61f4270cbb0773942a7779c1071c458e5e4fe2bd8
7
- data.tar.gz: 63934b55ddbc67f57356779acacfe7a2cdf4e9b90a9cd4ee447a3b8eeb44e2419fe36e28a182db9df75a34a8493e1218414a82eeb51fcd8ae7835a1258746830
6
+ metadata.gz: af9f3aed5785a4c41c5608b286b7e9eb949085866815357f90d59cdb8319c9ccba0748c7ca44888f37342cb4919197b8cf417f5b7a40d15d41f60cab52e2377e
7
+ data.tar.gz: 412ac052f5c5730a06bbe08b63f8ba3837df2059312f2625a3a3d5e03592223d43bc928ba679c36deacb69e8539cef9e7efbc1e9b6a65498cade2110a5a05ac8
data/ChangeLog CHANGED
@@ -1,8 +1,11 @@
1
- 0.12.3
1
+ 0.12.4:
2
+ - Started enforcing minumum Ruby runtime version via gemspec.
3
+
4
+ 0.12.3:
2
5
  - Fix discrepancy in version between Github and RubyGems due to failure to
3
6
  push to Github.
4
7
 
5
- 0.12.2
8
+ 0.12.2:
6
9
  - Fix permissions for Ads Common gem.
7
10
 
8
11
  0.12.1:
@@ -115,13 +115,13 @@ module AdsCommon
115
115
  end
116
116
 
117
117
  if credentials[:oauth2_key].nil? && credentials[:oauth2_keyfile].nil?
118
- raise AdsCommon::Errors::AuthError,
119
- 'Either key or key file must be provided for OAuth2 service account.'
118
+ raise AdsCommon::Errors::AuthError, 'Either key or key file must ' +
119
+ 'be provided for OAuth2 service account.'
120
120
  end
121
121
 
122
122
  if credentials[:oauth2_key] && credentials[:oauth2_keyfile]
123
- raise AdsCommon::Errors::AuthError,
124
- 'Both service account key and key file provided, only one can be used.'
123
+ raise AdsCommon::Errors::AuthError, 'Both service account key and ' +
124
+ 'key file provided, only one can be used.'
125
125
  end
126
126
 
127
127
  p12 = true
@@ -152,8 +152,8 @@ module AdsCommon
152
152
 
153
153
  if credentials[:oauth2_key] &&
154
154
  !credentials[:oauth2_key].kind_of?(OpenSSL::PKey::RSA)
155
- raise AdsCommon::Errors::AuthError,
156
- 'OAuth2 service account key provided must be of type OpenSSL::PKey::RSA.'
155
+ raise AdsCommon::Errors::AuthError, 'OAuth2 service account key ' +
156
+ 'provided must be of type OpenSSL::PKey::RSA.'
157
157
  end
158
158
  end
159
159
 
@@ -19,18 +19,11 @@
19
19
 
20
20
  require 'ads_common/errors'
21
21
 
22
- MIN_RUBY_VERSION = Gem::Version.new('2.0')
23
22
  MIN_RUBY_RECOMMENDED_VERSION = Gem::Version.new('2.1')
24
23
 
25
- if Gem::Version.new(RUBY_VERSION.dup()) < MIN_RUBY_VERSION
26
- raise AdsCommon::Errors::VersionError,
27
- 'Unsupported Ruby version %s. Upgrade to version %s or later' %
28
- [RUBY_VERSION, MIN_RUBY_RECOMMENDED_VERSION]
29
- end
30
-
31
24
  # Checks current ruby version to make sure it's supported.
32
25
  def check_version(logger)
33
- if Gem::Version.new(RUBY_VERSION) < MIN_RUBY_RECOMMENDED_VERSION
26
+ if Gem::Version.new(RUBY_VERSION.dup()) < MIN_RUBY_RECOMMENDED_VERSION
34
27
  logger.warn(
35
28
  ('You are using a deprecated version of Ruby (%s). ' +
36
29
  'Consider upgrading to a fully supported version %s or later') %
@@ -19,6 +19,6 @@
19
19
 
20
20
  module AdsCommon
21
21
  module ApiConfig
22
- CLIENT_LIB_VERSION = '0.12.3'
22
+ CLIENT_LIB_VERSION = '0.12.4'
23
23
  end
24
24
  end
@@ -89,7 +89,7 @@ class TestCredentialHandler < Test::Unit::TestCase
89
89
  end
90
90
 
91
91
  def test_auth_handler_callback_once()
92
- mock = MiniTest::Mock.new()
92
+ mock = Minitest::Mock.new()
93
93
  mock.expect(:property_changed, nil, [:foo, 'bar'])
94
94
  @handler.set_auth_handler(mock)
95
95
  @handler.set_credential(:foo, 'bar')
@@ -101,21 +101,21 @@ class TestCredentialHandler < Test::Unit::TestCase
101
101
 
102
102
  credentials[:foo] = 'bar'
103
103
  credentials[:baz] = 42
104
- mock1 = MiniTest::Mock.new()
104
+ mock1 = Minitest::Mock.new()
105
105
  mock1.expect(:property_changed, nil, [:baz, 42])
106
106
  @handler.set_auth_handler(mock1)
107
107
  @handler.credentials = credentials
108
108
  assert(mock1.verify)
109
109
 
110
110
  credentials.delete(:baz)
111
- mock2 = MiniTest::Mock.new()
111
+ mock2 = Minitest::Mock.new()
112
112
  mock2.expect(:property_changed, nil, [:baz, nil])
113
113
  @handler.set_auth_handler(mock2)
114
114
  @handler.credentials = credentials
115
115
  assert(mock2.verify)
116
116
 
117
117
  credentials[:foo] = nil
118
- mock3 = MiniTest::Mock.new()
118
+ mock3 = Minitest::Mock.new()
119
119
  mock3.expect(:property_changed, nil, [:foo, nil])
120
120
  mock3.expect(:property_changed, nil, [:baz, nil])
121
121
  @handler.set_auth_handler(mock3)
@@ -65,7 +65,7 @@ class TestOAuth < Test::Unit::TestCase
65
65
  handler.setup_client()
66
66
  assert_not_nil(handler.client)
67
67
  handler.client.issued_at = Time.now.to_s
68
- assert_equal(String, handler.client.issued_at.class)
68
+ assert_equal(Time, handler.client.issued_at.class)
69
69
 
70
70
  # Make sure that we are still able to refresh the token.
71
71
  assert_nothing_raised do
@@ -34,13 +34,13 @@ end
34
34
  class TestOAuthServiceAccount < Test::Unit::TestCase
35
35
  def test_file_extension_check()
36
36
  assert_nothing_raised do
37
- validate_credentials(["test", ".json"])
37
+ validate_credentials(['test', '.json'])
38
38
  end
39
39
  assert_nothing_raised do
40
- validate_credentials(["test", ".p12"])
40
+ validate_credentials(['test', '.p12'])
41
41
  end
42
- assert_raise do
43
- validate_credentials(["test", ".other"])
42
+ assert_raises(AdsCommon::Errors::AuthError) do
43
+ validate_credentials(['test', '.other'])
44
44
  end
45
45
  end
46
46
 
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.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Gomes
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-05-23 00:00:00.000000000 Z
13
+ date: 2016-08-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: google-ads-savon
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.1
21
+ version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 1.0.1
28
+ version: '1.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: httpi
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - ">="
140
140
  - !ruby/object:Gem::Version
141
- version: '0'
141
+ version: '2.0'
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - ">="
@@ -146,17 +146,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: 1.3.6
147
147
  requirements: []
148
148
  rubyforge_project: google-ads-common
149
- rubygems_version: 2.5.1
149
+ rubygems_version: 2.4.8
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Common code for Google Ads APIs
153
153
  test_files:
154
- - test/test_env.rb
155
- - test/test_results_extractor.rb
154
+ - test/test_savon_service.rb
156
155
  - test/test_config.rb
157
- - test/test_utils.rb
156
+ - test/test_oauth2_service_account_handler.rb
158
157
  - test/test_credential_handler.rb
159
- - test/test_oauth2_handler.rb
160
- - test/test_savon_service.rb
158
+ - test/test_utils.rb
161
159
  - test/test_parameters_validator.rb
162
- - test/test_oauth2_service_account_handler.rb
160
+ - test/test_oauth2_handler.rb
161
+ - test/test_env.rb
162
+ - test/test_results_extractor.rb