qiwi-pay 0.2.0 → 0.2.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: 6ccf37796f11498182ae5435a6659542138b03026a0f6cb86c124f4b832919a6
4
- data.tar.gz: f296cf13928751188c6db623b05181ac3e3ee1383c561062ed3bb6dc811681dd
3
+ metadata.gz: 23ffbc150e415e845492c1c2141c573ba4fc088987e53bade7676d707df32516
4
+ data.tar.gz: 86e1bdfa2bea5fea246d0dc080bc97ccded0e74fe1cf6fffbe4f1097db7735c2
5
5
  SHA512:
6
- metadata.gz: d0ceec3bf10ff6f8375dc64a6e57c6b9520500cc4ac5e121f6a3be5717a570d865c18b75179e4a88bfc98bf18f3eae0eb9f77c6fe3ba1fd092c58899614cbac3
7
- data.tar.gz: 91375b823e65e4149f3724a1301b14127f62f89da50822ab2f9b2bc37143e6e2af040353095ccdd6990e46a8debb9f3db04a9c75ab50eb3f541e515c9c769aa8
6
+ metadata.gz: 0f0803b76b7d152f29568abf2522f97c3ccd2e5bff513b6e306cdfc5ff87bb3888e6932b44a6f8d8b843bcaba0c07b05a64668baedaf89fdd070ea9f8358692f
7
+ data.tar.gz: 9f8b2cca5b96cc54e0d0eecd69752f331942bca46344abfd4b907f7a2266e4188071d79e24b318ddc64555d6cb1a621aa5b6c3bda688ba5f39d04b3df42066e1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiwi-pay (0.2.0)
4
+ qiwi-pay (0.2.1)
5
5
  rest-client (>= 1.8.0, < 2.1)
6
6
 
7
7
  GEM
@@ -18,7 +18,8 @@ module QiwiPay::Api
18
18
  rescue RestClient::Unauthorized, RestClient::Forbidden
19
19
  Response.new 403, 'Access denied'
20
20
  rescue RestClient::ExceptionWithResponse => e
21
- Response.new e.response.code, e.response.body
21
+ Response.new e.response && e.response.code,
22
+ e.response ? e.response.body : e.to_s
22
23
  end
23
24
 
24
25
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QiwiPay
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -55,5 +55,19 @@ RSpec.shared_examples "api_payment_operation" do
55
55
  end
56
56
 
57
57
  end
58
+
59
+ describe 'receiving timeout from QiwiPay' do
60
+ before do
61
+ WebMock.stub_request(:post, %r{\Ahttps://acquiring\.qiwi\.com.+}).to_timeout
62
+ end
63
+
64
+ it 'returns response with error description' do
65
+ r = subject.perform
66
+ expect(r).to be_a QiwiPay::Api::Response
67
+ expect(r.http_code).to be_nil
68
+ expect(r.error_code).to eq -1
69
+ expect(r.error_message).to eq 'Timed out connecting to server'
70
+ end
71
+ end
58
72
  end
59
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiwi-pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klimenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-17 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client