nationbuilder-rb 1.2.1 → 1.2.2

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: ed83c1a7ea3f4620237f7e8ac24a6a735f53040c
4
- data.tar.gz: 9de67b51d069fd267fe51a3eece11b58c7fab9cb
3
+ metadata.gz: dca9dd1e00384837fdbc518daae5b86c132caf28
4
+ data.tar.gz: 7ce361b2a3d47fd914fc535b067f174c79fb4975
5
5
  SHA512:
6
- metadata.gz: 38cc6c6a51d1b5a51b47c87afc334d1fb6d6855df1abbf1280edc7b63ab81c56c4df128ab17927afce489724f82e0868f6fe39c4070732d422ee2e7168cb0610
7
- data.tar.gz: e8fad6eb21f0662b11c7dbf5dec13166ec7fec1f9f7937bfaa724f4a29a4cffb66e690822340df84009a130b299a879f7e3551b39fe8d86c60a3effb9e5a259b
6
+ metadata.gz: 76daa929f2bc4e1aa76c18f02c439435e4489f9ea6a54c078ccd1d448becb7e8f05f37d366a81bc1aaf37e71050531f49875fea3a499a2cacae0447ec8c43e96
7
+ data.tar.gz: ce0c52c3f24b3081e77820334d34b63a96a69b23e5c428e43f98880a3126b85a791477f8e20865a40861bf55266828102e1eb77a055ee29ff8b6036de59ddf32
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.2.2
2
+ - The retries parameter on a client should correspond to the number of retries,
3
+ not total calls.
4
+
1
5
  # 1.2.1
2
6
  - Include Paginator class in NationBuilder module
3
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -7,8 +7,8 @@ class NationBuilder::Client
7
7
  @base_url = opts[:base_url] || 'https://:nation_name.nationbuilder.com'
8
8
  @retries = opts[:retries] || 8
9
9
 
10
- if @retries < 1
11
- raise 'A positive number of retries must be specified'
10
+ if @retries < 0
11
+ raise 'Retries must be at least zero'
12
12
  end
13
13
 
14
14
  parsed_endpoints.each do |endpoint|
@@ -75,7 +75,7 @@ class NationBuilder::Client
75
75
  raw_response = HTTPClient.send(method, url, request_args)
76
76
  parsed_response = nil
77
77
 
78
- @retries.times do |i|
78
+ (@retries + 1).times do |i|
79
79
  begin
80
80
  parsed_response = parse_response_body(raw_response)
81
81
  rescue NationBuilder::RateLimitedError
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: nationbuilder-rb 1.2.1 ruby lib
5
+ # stub: nationbuilder-rb 1.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "nationbuilder-rb"
9
- s.version = "1.2.1"
9
+ s.version = "1.2.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -5,7 +5,7 @@ describe NationBuilder::Client do
5
5
  let(:client) do
6
6
  NationBuilder::Client.new('organizeralexandreschmitt',
7
7
  '53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5',
8
- retries: 2)
8
+ retries: 1)
9
9
  end
10
10
 
11
11
  describe '#endpoints' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nationbuilder-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Huie