smartystreets_ruby_sdk 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,2 +1,10 @@
1
1
  require 'bundler/gem_tasks'
2
- task :default => :spec
2
+ require 'rake/testtask'
3
+
4
+ desc 'Run tests'
5
+ task default: :test
6
+
7
+ Rake::TestTask.new do |t|
8
+ t.libs << 'lib'
9
+ t.pattern = 'test/**/test_*.rb'
10
+ end
@@ -1,7 +1,7 @@
1
1
  module SmartyStreets
2
2
  class RetrySender
3
3
  MAX_BACKOFF_DURATION = 10
4
- STATUS_INTERNAL_SERVER_ERROR = '500'.freeze
4
+ STATUS_INTERNAL_SERVER_ERROR = 500
5
5
 
6
6
  def initialize(max_retries, inner, sleeper, logger)
7
7
  @max_retries = max_retries
@@ -14,7 +14,7 @@ module SmartyStreets
14
14
  response = @inner.send(request)
15
15
 
16
16
  (0..@max_retries-1).each do |i|
17
- break if response.status_code < STATUS_INTERNAL_SERVER_ERROR
17
+ break if response.status_code.to_i < STATUS_INTERNAL_SERVER_ERROR
18
18
 
19
19
  backoff(i)
20
20
 
@@ -1,3 +1,3 @@
1
1
  module SmartyStreets
2
- VERSION = '5.2.1' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
+ VERSION = '5.2.2' # DO NOT EDIT (this is updated by a build job when a new release is published)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartystreets_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-10-30 00:00:00.000000000 Z
12
+ date: 2017-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler