silencer_shop 1.1.0 → 1.1.1

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: 38cb8d12db135dd31536cc93d8158b2ba23dc5bc456d5fb6de42ca2a2f38cf81
4
- data.tar.gz: 0d157839522268b64e4889b160b510ccf21fd17db2fa1fc6366dda1d13af874b
3
+ metadata.gz: 6f99bfc0be651ead73041937cd95080a8ed289e7e8b340c68bf8adbb61976116
4
+ data.tar.gz: d0a82c2282a3ea7af902995de3208bd590071468c6a0bccc214be6de9a8e2121
5
5
  SHA512:
6
- metadata.gz: 4a906308b603fa51def2b7f086d251acd9ed9c025a1b44ca8afa6b150c73bf8a5264e9249dcb84dc3f9cab0dde47bab28d5c5eafc9f8189c04741ff913a5174d
7
- data.tar.gz: b7abe26ab5262049773bf9e0a935631ce0b82b6626f5b61854c7b5097acaae4eadcf2f5f4aa07cae783e145b92a5c19bd70089c42097b3629aa67d10716dfa3b
6
+ metadata.gz: 28e34b7f61ca6a5651642ab9c592a6f92d1e44c051989ab114f9bde71223d05a342846f4ac44345ebd74ce250d0012146d5805d83b9e8942e2a9e5351c1af2a8
7
+ data.tar.gz: 6b2d7cfcda157991cc9127f11b28f85af492042bb6454e81b33a9c86cfde476b81c895709db7a648caa1e55eb5593eb5f93a06cdcfbb80fdf0997bd5d4d96576
@@ -1,6 +1,8 @@
1
1
  module SilencerShop
2
2
  class Response
3
3
 
4
+ attr_accessor :success
5
+
4
6
  def initialize(response)
5
7
  @response = response
6
8
 
@@ -12,6 +14,7 @@ module SilencerShop
12
14
  when Net::HTTPNoContent
13
15
  SilencerShop::Error::NoContent.new(@response.body)
14
16
  when Net::HTTPOK, Net::HTTPSuccess
17
+ self.success = true
15
18
  _data = (JSON.parse(@response.body) if @response.body.present?)
16
19
 
17
20
  @data = case
@@ -42,7 +45,7 @@ module SilencerShop
42
45
  end
43
46
 
44
47
  def success?
45
- !!self[:success] && self[:errors].empty?
48
+ !!success
46
49
  end
47
50
 
48
51
  end
@@ -1,3 +1,3 @@
1
1
  module SilencerShop
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.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.0
4
+ version: 1.1.1
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-03 00:00:00.000000000 Z
11
+ date: 2021-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport