silencer_shop 1.1.1 → 1.1.2

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
  SHA256:
3
- metadata.gz: 6f99bfc0be651ead73041937cd95080a8ed289e7e8b340c68bf8adbb61976116
4
- data.tar.gz: d0a82c2282a3ea7af902995de3208bd590071468c6a0bccc214be6de9a8e2121
3
+ metadata.gz: 527fdc0f009ce9fb631e3bfa8df924e16e587d6592f8adb5f7facee165e009c0
4
+ data.tar.gz: 809fca7c53baa890b9fefab7ba57962d0c48a9b204dbc78fe206e6f9b0711751
5
5
  SHA512:
6
- metadata.gz: 28e34b7f61ca6a5651642ab9c592a6f92d1e44c051989ab114f9bde71223d05a342846f4ac44345ebd74ce250d0012146d5805d83b9e8942e2a9e5351c1af2a8
7
- data.tar.gz: 6b2d7cfcda157991cc9127f11b28f85af492042bb6454e81b33a9c86cfde476b81c895709db7a648caa1e55eb5593eb5f93a06cdcfbb80fdf0997bd5d4d96576
6
+ metadata.gz: afe10f0515b1ec231d73b1b3fa2bf969f45184c4021da62c6fb762bb520263842843e2576e5a8e55a76d24daaef883908d159e328a63e0705fa1aedefbc052ed
7
+ data.tar.gz: 0f613f75b722c853ba340c5ab3abb33f8eccf1a3144ac468bad259a6b22951f4cc3ecbfcd65154d837c7f0aa947e1e7792ea6632c56cd7b2e502221a3949aedf
@@ -14,15 +14,19 @@ module SilencerShop
14
14
  when Net::HTTPNoContent
15
15
  SilencerShop::Error::NoContent.new(@response.body)
16
16
  when Net::HTTPOK, Net::HTTPSuccess
17
- self.success = true
18
- _data = (JSON.parse(@response.body) if @response.body.present?)
19
-
20
17
  @data = case
21
18
  when _data.is_a?(Hash)
22
19
  _data.deep_symbolize_keys
23
20
  when _data.is_a?(Array)
24
21
  _data.map(&:deep_symbolize_keys)
25
22
  end
23
+
24
+ if @data.has_key?(:ErrorMessage)
25
+ raise SilencerShop::Error::RequestError.new(@response.body)
26
+ end
27
+
28
+ self.success = true
29
+ _data = (JSON.parse(@response.body) if @response.body.present?)
26
30
  else
27
31
  if @response.body =~ /unable to verify credentials/i
28
32
  SilencerShop::Error::NotAuthorized.new(@response.body)
@@ -1,3 +1,3 @@
1
1
  module SilencerShop
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silencer_shop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Dill
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-04 00:00:00.000000000 Z
11
+ date: 2021-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport