nationbuilder-rb 1.2.2 → 1.2.3

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: dca9dd1e00384837fdbc518daae5b86c132caf28
4
- data.tar.gz: 7ce361b2a3d47fd914fc535b067f174c79fb4975
3
+ metadata.gz: 8648d21e88265f0cf6a71cddf2b9afd78fccd32b
4
+ data.tar.gz: a32b6405c3998adc8ab51467aa84fab65acd675a
5
5
  SHA512:
6
- metadata.gz: 76daa929f2bc4e1aa76c18f02c439435e4489f9ea6a54c078ccd1d448becb7e8f05f37d366a81bc1aaf37e71050531f49875fea3a499a2cacae0447ec8c43e96
7
- data.tar.gz: ce0c52c3f24b3081e77820334d34b63a96a69b23e5c428e43f98880a3126b85a791477f8e20865a40861bf55266828102e1eb77a055ee29ff8b6036de59ddf32
6
+ metadata.gz: bf6c54ac14c62d25ecc992eb53c3db859b4ae909c3176f1557e3255c28427d257f1128db27d0327173668438ac334ab76c81ef7dc3b4973071cc9d2fc8ee5e60
7
+ data.tar.gz: 739964b86179782bb0155d7a93cdd23791938626e65f87b5394ddac67b55584911484a51c5ef8370879dee9af3e33562680210fc8500d36c59d3b779ad0ee93a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.2.3
2
+ - Return true for non-JSON responses
3
+
1
4
  # 1.2.2
2
5
  - The retries parameter on a client should correspond to the number of retries,
3
6
  not total calls.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.3
@@ -103,11 +103,11 @@ class NationBuilder::Client
103
103
  def classify_response_error(response)
104
104
  case
105
105
  when response.code == 429
106
- return NationBuilder::RateLimitedError.new(response.body)
106
+ NationBuilder::RateLimitedError.new(response.body)
107
107
  when response.code.to_s.start_with?('4')
108
- return NationBuilder::ClientError.new(response.body)
108
+ NationBuilder::ClientError.new(response.body)
109
109
  when response.code.to_s.start_with?('5')
110
- return NationBuilder::ServerError.new(response.body)
110
+ NationBuilder::ServerError.new(response.body)
111
111
  end
112
112
  end
113
113
 
@@ -116,7 +116,7 @@ class NationBuilder::Client
116
116
  raise error if error
117
117
 
118
118
  if response.header['Content-Type'].first != 'application/json'
119
- return nil
119
+ return true
120
120
  end
121
121
 
122
122
  body = response.body.strip
@@ -2,16 +2,16 @@
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.2 ruby lib
5
+ # stub: nationbuilder-rb 1.2.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "nationbuilder-rb"
9
- s.version = "1.2.2"
9
+ s.version = "1.2.3"
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"]
13
13
  s.authors = ["David Huie"]
14
- s.date = "2015-02-17"
14
+ s.date = "2015-02-18"
15
15
  s.description = "A Ruby client to the NationBuilder API"
16
16
  s.email = "david@nationbuilder.com"
17
17
  s.executables = ["nbdoc"]
@@ -79,7 +79,7 @@ describe NationBuilder::Client do
79
79
  client.call(:people, :destroy, params)
80
80
  end
81
81
 
82
- expect(response).to eq(nil)
82
+ expect(response).to eq(true)
83
83
  end
84
84
  end
85
85
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nationbuilder-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Huie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient