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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6faf12e654e27e0fb8a1230e4e4e2acfa58cffd4
4
- data.tar.gz: b191d5c6fa2a3cc411124ffc09d89c4ecf2dff4f
3
+ metadata.gz: 0b9e24e6aedd80d73b6c7864d45211a6dd022d90
4
+ data.tar.gz: 51da886577cec72cf529eee35100954fb63354f2
5
5
  SHA512:
6
- metadata.gz: b3021db1d874428ca91c7ecb6181bac5460898af3c1be46bc2aa1c8c1485e4f428b439d2d151f0a89c0fa8959d153241dbd8c3f255957298eddffce18ef3b3f6
7
- data.tar.gz: 9cdb936470485f3bb428713449fbeae1739a8bccb93b49809392238dc2c05bc957088c188dbae43c7301d2c35c77a634047adfec2de39a060fa45c24699ddae4
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.5'
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"
@@ -20,4 +20,8 @@ class Bluepark::Client::Skus
20
20
  def update_single_sku(sku_id, sku_params)
21
21
  @client.rest_put_with_token("skus/#{sku_id}", sku_params)
22
22
  end
23
+
24
+ def update_skus(sku_id, sku_params)
25
+ @client.rest_put_with_token("skus/", sku_params)
26
+ end
23
27
  end
@@ -33,18 +33,14 @@ class Bluepark::Client
33
33
  end
34
34
 
35
35
  def decode_status(response)
36
- if response.code == 404
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
- if response.body.nil? || response.body.strip.empty? || response.code >= 300
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.5
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.5.1
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