actv 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/actv.gemspec +0 -1
- data/lib/actv/default.rb +1 -1
- data/lib/actv/response/raise_server_error.rb +5 -1
- data/lib/actv/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5119a6879d04dfc3dafd7f8a6fc115fa806c9a8c
|
4
|
+
data.tar.gz: f4a034b352dc924ad3d0d8244cf9c864dfd47cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc5794a3baaaae5e7bbb4c7e2a0152eaaf8efc30c04c79613154acca0f81f861dd2f481d089a24d49238f06be78f181b6146cbba095b14de5b02c66726c5259a
|
7
|
+
data.tar.gz: 77a218495bacd9e10f985863bd2ff90d74fb5cd0ab29f29d374ab350697b102e1ee5775ff0a413f1bbd9aa73aa3f9c383325a910ce787ffc8f61643add46d253
|
data/actv.gemspec
CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.add_development_dependency 'timecop'
|
17
17
|
gem.add_development_dependency 'webmock'
|
18
18
|
gem.add_development_dependency 'yard'
|
19
|
-
gem.add_development_dependency 'guard-rspec'
|
20
19
|
gem.add_development_dependency 'activesupport'
|
21
20
|
|
22
21
|
|
data/lib/actv/default.rb
CHANGED
@@ -55,8 +55,8 @@ module ACTV
|
|
55
55
|
builder.use Faraday::Request::Multipart # Checks for files in the payload
|
56
56
|
builder.use Faraday::Request::UrlEncoded # Convert request params as "www-form-urlencoded"
|
57
57
|
builder.use ACTV::Response::RaiseClientError # Handle 4xx server responses
|
58
|
-
builder.use ACTV::Response::ParseJson # Parse JSON response bodies using MultiJson
|
59
58
|
builder.use ACTV::Response::RaiseServerError # Handle 5xx server responses
|
59
|
+
builder.use ACTV::Response::ParseJson # Parse JSON response bodies using MultiJson
|
60
60
|
# builder.use ACTV::Response::RateLimit # Update RateLimit object
|
61
61
|
builder.adapter Faraday.default_adapter # Set Faraday's HTTP adapter
|
62
62
|
end
|
@@ -10,7 +10,11 @@ module ACTV
|
|
10
10
|
def on_complete(env)
|
11
11
|
status_code = env[:status].to_i
|
12
12
|
error_class = ACTV::Error::ServerError.errors[status_code]
|
13
|
-
|
13
|
+
|
14
|
+
if error_class
|
15
|
+
error_message = env[:body][:error][:message]
|
16
|
+
raise error_class.new(error_message)
|
17
|
+
end
|
14
18
|
end
|
15
19
|
|
16
20
|
end
|
data/lib/actv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Barnes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -206,20 +206,6 @@ dependencies:
|
|
206
206
|
- - '>='
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: guard-rspec
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - '>='
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - '>='
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
209
|
- !ruby/object:Gem::Dependency
|
224
210
|
name: activesupport
|
225
211
|
requirement: !ruby/object:Gem::Requirement
|