parliament-ruby 0.7.5.pre → 0.7.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda45191ecdf7c3e64b4c4e09fb44db78e09f730
|
4
|
+
data.tar.gz: ef87dbefc78f70e36e6fa5334bf527e8bc6726f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a38175fa37f64948d1ad2691967b42fd47c3cf70186100f0fa55489d21c77e6552d03dce6818470fbe3e1b9a4941defc133cf94f5defed71f7d43ee5d6b566ad
|
7
|
+
data.tar.gz: 07156cafb96f86844e3de83af2b67e5ae9b9c597d587e67b7e586e9cddcf7074ec531f1f11c8e14c7633b2a8048a6d31a480708f4c5500a47630f888bad5e0f5
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Parliament
|
2
|
-
# An error raised when
|
2
|
+
# An error raised when an empty response is returned by Net::HTTP inside of Parliament::Request.
|
3
3
|
#
|
4
4
|
# @since 0.6.0
|
5
5
|
class NoContentResponseError < Parliament::NetworkError
|
@@ -11,7 +11,7 @@ module Parliament
|
|
11
11
|
#
|
12
12
|
# response = Net::HTTP.get_response(URI(url))
|
13
13
|
#
|
14
|
-
# raise Parliament::NoContentResponseError.new(url, response) if response.
|
14
|
+
# raise Parliament::NoContentResponseError.new(url, response) if response.body.nil?
|
15
15
|
def initialize(url, response)
|
16
16
|
super
|
17
17
|
end
|
@@ -133,7 +133,7 @@ module Parliament
|
|
133
133
|
def handle_errors(response)
|
134
134
|
case response
|
135
135
|
when Net::HTTPSuccess # 2xx Status
|
136
|
-
exception_class = Parliament::NoContentResponseError if response.
|
136
|
+
exception_class = Parliament::NoContentResponseError if response.body.nil?
|
137
137
|
when Net::HTTPClientError # 4xx Status
|
138
138
|
exception_class = Parliament::ClientError
|
139
139
|
when Net::HTTPServerError # 5xx Status
|
data/lib/parliament/version.rb
CHANGED
data/parliament-ruby.gemspec
CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'simplecov', '~> 0.12'
|
28
28
|
spec.add_development_dependency 'vcr', '~> 3.0'
|
29
29
|
spec.add_development_dependency 'webmock', '~> 2.3'
|
30
|
-
spec.add_development_dependency 'parliament-grom-decorators'
|
30
|
+
spec.add_development_dependency 'parliament-grom-decorators', '~> 0.1'
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Rayner
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: parliament-grom-decorators
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
117
|
+
version: '0.1'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
124
|
+
version: '0.1'
|
125
125
|
description: Internal parliamentary data API wrapper for ruby
|
126
126
|
email:
|
127
127
|
- mattrayner1@gmail.com
|
@@ -172,9 +172,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
|
-
- - "
|
175
|
+
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
|
-
version:
|
177
|
+
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
180
|
rubygems_version: 2.6.6
|