senec 0.6.1 → 0.6.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: 1517c01908beb3fbc18cfffeb17d4462eef1719b4e1db6dabb32cf4bd5bcc58a
4
- data.tar.gz: c8f0891f001b127fb7505598d4d2aede9efbc6f026de90789e0142b7848b1dcf
3
+ metadata.gz: 877e39b91e6ff1f4709131aaf96394db590396faad43d8648c88ab90cce1ca3a
4
+ data.tar.gz: bffeb00945d5a22ab11936299ec8d716283aa5c8283250c2ec337534f10af690
5
5
  SHA512:
6
- metadata.gz: 4fb4e49af482a1ff74eafcfd5b326c38c0aedb54053bfcfc6ebc54a1977e329d0e55ed028b4d081c8d54afb50b54d18c0ce088d0f3281228c172894f1fc01365
7
- data.tar.gz: 6f7dfdc2b6900d3b2d13e5d69e47e8d514f78923781030664fb28e51dab3db322b0edfe47c60dc94e657548dcaf6708dfbd6bedf7eaebc5db924bbe53b8531e2
6
+ metadata.gz: 966c843b9dfe626d753cf7ceafa1c030479a59c8bd076009e8406252147d09f11f239225b86c628a537eb87b538d5893503c6206579cf0c769d235e442035100
7
+ data.tar.gz: ca2fc0dfe72ce5934bc0ebeae1b2ac453f188031dbd0a2c515f135c892bc1d971fec9d81f9b7ccde604affdd0a6d312ee9dabfa349f00bd9df2ec97039e22734
data/lib/senec/request.rb CHANGED
@@ -72,12 +72,9 @@ module Senec
72
72
  def response
73
73
  @response ||= begin
74
74
  res = HTTP.post uri, json: Senec::BASIC_REQUEST
75
+ raise Senec::Error, res.status.to_s unless res.status.success?
75
76
 
76
- if res.status.success?
77
- JSON.parse(res.body)
78
- else
79
- throw "Failure: #{res.value}"
80
- end
77
+ JSON.parse(res.body)
81
78
  end
82
79
  end
83
80
 
data/lib/senec/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Senec
2
- VERSION = '0.6.1'.freeze
2
+ VERSION = '0.6.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: senec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann