bluepark 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bluepark.gemspec +1 -1
- data/lib/bluepark/client/skus.rb +4 -0
- data/lib/bluepark/client.rb +7 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b9e24e6aedd80d73b6c7864d45211a6dd022d90
|
4
|
+
data.tar.gz: 51da886577cec72cf529eee35100954fb63354f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24a4c858c900b0df649ce390254888d2e3892ce16f493cf954986abdb49c7678ec8cb31ed86ac9493124f530bb32856f0155327adc10044e51dc5a5775826a0e
|
7
|
+
data.tar.gz: 25fad7881e11a51a064bbc5542449ab5957f1887cacc170dfd132e997032eb34f079af00edfe87f311abad27403b29c699d40d652485b0f3bb6ed180c2958562
|
data/bluepark.gemspec
CHANGED
@@ -3,7 +3,7 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'bluepark'
|
6
|
-
s.version = '1.0.
|
6
|
+
s.version = '1.0.6'
|
7
7
|
s.date = '2017-07-28'
|
8
8
|
s.summary = "Ruby client library for the Bluepark API"
|
9
9
|
s.description = "A simple client created to help with Bluepark integration"
|
data/lib/bluepark/client/skus.rb
CHANGED
data/lib/bluepark/client.rb
CHANGED
@@ -33,18 +33,14 @@ class Bluepark::Client
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def decode_status(response)
|
36
|
-
if response.code
|
37
|
-
|
36
|
+
if response.body.nil? || response.body.strip.empty? || response.code >= 300
|
37
|
+
error = {
|
38
|
+
status: STATUS_CODES[response.code],
|
39
|
+
status_code: response.code
|
40
|
+
}.merge(decode_json(response.body).to_h)
|
41
|
+
raise BlueparkError, encode_json(error)
|
38
42
|
else
|
39
|
-
|
40
|
-
error = {
|
41
|
-
status: STATUS_CODES[response.code],
|
42
|
-
status_code: response.code
|
43
|
-
}.merge(decode_json(response.body).to_h)
|
44
|
-
raise BlueparkError, encode_json(error)
|
45
|
-
else
|
46
|
-
decode_json(response.body)
|
47
|
-
end
|
43
|
+
decode_json(response.body)
|
48
44
|
end
|
49
45
|
end
|
50
46
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bluepark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andriy Byalyk
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.6.13
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Ruby client library for the Bluepark API
|