smartystreets_ruby_sdk 5.14.8 → 5.14.11

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
  SHA256:
3
- metadata.gz: 73a74155aa4e6204603c70d7a19f2c4a8a5f25917fcb3228b97f5e8979c2c8de
4
- data.tar.gz: 8700baf3f0d0bc16549050120033d39e873894905551c8ef516b7d8648c821aa
3
+ metadata.gz: 0ff192ddb4a25231edbc50c5cf2a588c691273dc2ad493d7975c9f72c307eb2e
4
+ data.tar.gz: 66aa0fcd8d46e921fd5a02af354785456b95e29b7900f8b6e85888395d67af2f
5
5
  SHA512:
6
- metadata.gz: a6f4b0326b89cb89d99349ae6548b9e8d40740b8b6e35867aa2b6bd2d45af124d02309cc62a0fdcc3f3d01fddcb384bc989661c60629f08204e81413a23b86b0
7
- data.tar.gz: 3f5042ffd258950f77ff9e52ccaa69b889e54310f9eca155dab8ce2e6e3861515c82e1ac40130152fd61001793f0b4fc30c109e5aacf228e8150157b2342b0e3
6
+ metadata.gz: 843a42ebf7f9a5ee3ea5de275e214717c98fcb1ef66310ab83b62e43a6fbd6ece05f0808e74efe750251c6a53d84b9a2d8b2fc73cf4b612230c6818cd5ca24fe
7
+ data.tar.gz: d5581f41c90f0d4dbbb9f054f271050a8f58956c3d0c74dcd84f6cebf540a7d65089da1ef682f5bcc2a3c796d7d3652e21ac023131b6de762a18df3984e2184d
@@ -187,7 +187,7 @@
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright SmartyStreets
190
+ Copyright Smarty
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ # SMARTY DISCLAIMER: Subject to the terms of the associated license agreement, this software is freely available for your use. This software is FREE, AS IN PUPPIES, and is a gift. Enjoy your new responsibility. This means that while we may consider enhancement requests, we may or may not choose to entertain requests at our sole and absolute discretion.
2
+
1
3
  # SmartyStreets Ruby SDK
2
4
 
3
5
  The official client libraries for accessing SmartyStreets APIs from Ruby
@@ -6,12 +6,12 @@ class InternationalExample
6
6
  Lookup = SmartyStreets::InternationalStreet::Lookup
7
7
 
8
8
  def run
9
- auth_id = 'Your SmartyStreets Auth ID here'
10
- auth_token = 'Your SmartyStreets Auth Token here'
9
+ # auth_id = 'Your SmartyStreets Auth ID here'
10
+ # auth_token = 'Your SmartyStreets Auth Token here'
11
11
 
12
12
  # We recommend storing your secret keys in environment variables instead---it's safer!
13
- # auth_id = ENV['SMARTY_AUTH_ID']
14
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
13
+ auth_id = ENV['SMARTY_AUTH_ID']
14
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
15
15
 
16
16
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
17
17
 
@@ -6,12 +6,12 @@ class USExtractExample
6
6
  Lookup = SmartyStreets::USExtract::Lookup
7
7
 
8
8
  def run
9
- auth_id = 'Your SmartyStreets Auth ID here'
10
- auth_token = 'Your SmartyStreets Auth Token here'
9
+ # auth_id = 'Your SmartyStreets Auth ID here'
10
+ # auth_token = 'Your SmartyStreets Auth Token here'
11
11
 
12
12
  # We recommend storing your secret keys in environment variables instead---it's safer!
13
- # auth_id = ENV['SMARTY_AUTH_ID']
14
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
13
+ auth_id = ENV['SMARTY_AUTH_ID']
14
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
15
15
 
16
16
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
17
17
 
@@ -6,12 +6,12 @@ class USReverseGeoExample
6
6
  Lookup = SmartyStreets::USReverseGeo::Lookup
7
7
 
8
8
  def run
9
- auth_id = 'Your SmartyStreets Auth ID here'
10
- auth_token = 'Your SmartyStreets Auth Token here'
9
+ # auth_id = 'Your SmartyStreets Auth ID here'
10
+ # auth_token = 'Your SmartyStreets Auth Token here'
11
11
 
12
12
  # We recommend storing your secret keys in environment variables instead---it's safer!
13
- # auth_id = ENV['SMARTY_AUTH_ID']
14
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
13
+ auth_id = ENV['SMARTY_AUTH_ID']
14
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
15
15
 
16
16
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
17
17
 
@@ -7,19 +7,19 @@ class USStreetMultipleAddressExample
7
7
  Lookup = SmartyStreets::USStreet::Lookup
8
8
 
9
9
  def run
10
- auth_id = 'Your SmartyStreets Auth ID here'
11
- auth_token = 'Your SmartyStreets Auth Token here'
10
+ # auth_id = 'Your SmartyStreets Auth ID here'
11
+ # auth_token = 'Your SmartyStreets Auth Token here'
12
12
 
13
13
  # We recommend storing your secret keys in environment variables instead---it's safer!
14
- # auth_id = ENV['SMARTY_AUTH_ID']
15
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
14
+ auth_id = ENV['SMARTY_AUTH_ID']
15
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
16
16
 
17
17
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
18
18
 
19
19
  # The appropriate license values to be used for your subscriptions
20
20
  # can be found on the Subscriptions page of the account dashboard.
21
21
  # https://www.smartystreets.com/docs/cloud/licensing
22
- client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-rooftop-geocoding-cloud'])
22
+ client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-core-cloud'])
23
23
  .build_us_street_api_client
24
24
  batch = SmartyStreets::Batch.new
25
25
 
@@ -4,19 +4,19 @@ require 'smartystreets_ruby_sdk/us_street/lookup'
4
4
 
5
5
  class USStreetSingleAddressExample
6
6
  def run
7
- auth_id = 'Your SmartyStreets Auth ID here'
8
- auth_token = 'Your SmartyStreets Auth Token here'
7
+ # auth_id = 'Your SmartyStreets Auth ID here'
8
+ # auth_token = 'Your SmartyStreets Auth Token here'
9
9
 
10
10
  # We recommend storing your secret keys in environment variables instead---it's safer!
11
- # auth_id = ENV['SMARTY_AUTH_ID']
12
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
11
+ auth_id = ENV['SMARTY_AUTH_ID']
12
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
13
13
 
14
14
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
15
15
 
16
16
  # The appropriate license values to be used for your subscriptions
17
17
  # can be found on the Subscriptions page of the account dashboard.
18
18
  # https://www.smartystreets.com/docs/cloud/licensing
19
- client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-rooftop-geocoding-cloud'])
19
+ client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-core-cloud'])
20
20
  # with_proxy('localhost', 8080, 'proxyUser', 'proxyPassword'). # Uncomment this line to try it with a proxy
21
21
  build_us_street_api_client
22
22
 
@@ -7,12 +7,12 @@ class USZipcodeMultipleLookupExample
7
7
  Lookup = SmartyStreets::USZipcode::Lookup
8
8
 
9
9
  def run
10
- auth_id = 'Your SmartyStreets Auth ID here'
11
- auth_token = 'Your SmartyStreets Auth Token here'
10
+ # auth_id = 'Your SmartyStreets Auth ID here'
11
+ # auth_token = 'Your SmartyStreets Auth Token here'
12
12
 
13
13
  # We recommend storing your secret keys in environment variables instead---it's safer!
14
- # auth_id = ENV['SMARTY_AUTH_ID']
15
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
14
+ auth_id = ENV['SMARTY_AUTH_ID']
15
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
16
16
 
17
17
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
18
18
 
@@ -4,12 +4,12 @@ require 'smartystreets_ruby_sdk/us_zipcode/lookup'
4
4
 
5
5
  class UsZipcodeSingleLookupExample
6
6
  def run
7
- auth_id = 'Your SmartyStreets Auth ID here'
8
- auth_token = 'Your SmartyStreets Auth Token here'
7
+ # auth_id = 'Your SmartyStreets Auth ID here'
8
+ # auth_token = 'Your SmartyStreets Auth Token here'
9
9
 
10
10
  # We recommend storing your secret keys in environment variables instead---it's safer!
11
- # auth_id = ENV['SMARTY_AUTH_ID']
12
- # auth_token = ENV['SMARTY_AUTH_TOKEN']
11
+ auth_id = ENV['SMARTY_AUTH_ID']
12
+ auth_token = ENV['SMARTY_AUTH_TOKEN']
13
13
 
14
14
  credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
15
15
 
@@ -2,6 +2,7 @@ module SmartyStreets
2
2
  class RetrySender
3
3
  MAX_BACKOFF_DURATION = 10
4
4
  STATUS_INTERNAL_SERVER_ERROR = 500
5
+ STATUS_TOO_MANY_REQUESTS = 429
5
6
 
6
7
  def initialize(max_retries, inner, sleeper, logger)
7
8
  @max_retries = max_retries
@@ -14,6 +15,10 @@ module SmartyStreets
14
15
  response = @inner.send(request)
15
16
 
16
17
  (0..@max_retries-1).each do |i|
18
+ if response.status_code.to_i == STATUS_TOO_MANY_REQUESTS
19
+ backoff(5)
20
+ end
21
+
17
22
  break if response.status_code.to_i < STATUS_INTERNAL_SERVER_ERROR
18
23
 
19
24
  backoff(i)
@@ -1,3 +1,3 @@
1
1
  module SmartyStreets
2
- VERSION = '5.14.8' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
+ VERSION = '5.14.11' # DO NOT EDIT (this is updated by a build job when a new release is published)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartystreets_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.14.8
4
+ version: 5.14.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - SmartyStreets SDK Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-06 00:00:00.000000000 Z
11
+ date: 2022-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,7 +83,7 @@ files:
83
83
  - CHANGELOG.md
84
84
  - Dockerfile
85
85
  - Gemfile
86
- - LICENSE.txt
86
+ - LICENSE.md
87
87
  - Makefile
88
88
  - README.md
89
89
  - Rakefile
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.2.22
196
+ rubygems_version: 3.3.7
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: An official library for the SmartyStreets APIs