openpay 1.0.5 → 1.0.6

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
  SHA1:
3
- metadata.gz: d76a36a8a210880d4d9f915f6034daeb95af848a
4
- data.tar.gz: ac4548deb7c79e7e938743f3d8b547c83a24809e
3
+ metadata.gz: 23388a3e6c33cde8c41a8a69055a5eec2bb37ccb
4
+ data.tar.gz: e71536fe4278baec59d2e892e4ebfd37acd09ecc
5
5
  SHA512:
6
- metadata.gz: a16717da2675093422157648ec8d8546effcd32be3ea89671540c08ab3c3b4ca674c500a4d3ed27cf82b3fa981eefe2d83a81b871cdaaf14da04c14dcc680bdc
7
- data.tar.gz: 0dc77e62e3789d538509cd007741e0e50a318078ed3cf9fcbe7b5c68dfea718e5457250a91726278db0a7fe3b98feeabfc2a9710bde64b32e73907980daf3802
6
+ metadata.gz: 4ca520e2620859d865ad0280c78ed5b24684d2d3e6307b085b964bfe9261c7b7c3ee8e29de9487b08004e231939ab8205cd8278d6a3528848b067cd88422c734
7
+ data.tar.gz: a9f353af0a9f28b02f9e1cd9f48eadcf71fafdf67d57517a87fb2ce6ddcac37131463c85386244f223721dc06a2925b21de2d98bf1458d9417cdce92cb522d2f
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ##Description
8
8
 
9
- ruby client for *Openpay api* services (version 1.0.5)
9
+ ruby client for *Openpay api* services (version 1.0.6)
10
10
 
11
11
  This is a ruby client implementing the payment services for *Openpay* at openpay.mx
12
12
 
@@ -767,7 +767,7 @@ In the Openpay dashboard you are able to see every request and its corresponding
767
767
 
768
768
  - bank accounts for merchant cannot be created using the api. It should be done through the dashboard.
769
769
  - Is recommended to reset your account using the dashboard when running serious testing (assure clean state)
770
- - check openpay_ap.rb for Logger configuration
770
+ - check openpay_api.rb for Logger configuration
771
771
  - travis https://travis-ci.org/open-pay/openpay-ruby , if a test fails it will leave leave some records, it may affect posterior tests.
772
772
  it is recommended to reset the console/account to assure a clean state after a failure occurs.
773
773
 
@@ -34,8 +34,12 @@ class OpenpayExceptionFactory
34
34
  raise oe
35
35
 
36
36
  when RestClient::Exception , RestClient::InternalServerError
37
- oe=OpenpayException.new exception.http_body
38
- LOG.warn exception.http_body
37
+ LOG.warn exception
38
+ if exception.http_body
39
+ oe=OpenpayException.new exception.http_body
40
+ else
41
+ oe=OpenpayException.new(exception.message, false)
42
+ end
39
43
  @errors=true
40
44
  raise oe
41
45
  else
@@ -1,3 +1,4 @@
1
+ require 'ostruct'
1
2
  module OpenpayUtils
2
3
 
3
4
  class SearchParams < OpenStruct
data/lib/version.rb CHANGED
@@ -1,5 +1,3 @@
1
1
  module Openpay
2
- # Dec 31 2014, 6:00 PM Qro Local time.
3
- # 97 test cases passed / 220.232 secs
4
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
5
3
  end
@@ -1,38 +1,20 @@
1
1
  require_relative '../spec_helper'
2
2
 
3
3
 
4
- describe Bankaccounts do
4
+ describe 'Request timeout exception' do
5
5
 
6
- #bankaccounts for merchant cannot be created using the api
7
- #the merchant bank account should be created using the Openpay dashboard
8
6
  before(:all) do
9
7
 
10
8
  @merchant_id='mywvupjjs9xdnryxtplq'
11
9
  @private_key='sk_92b25d3baec149e6b428d81abfe37006'
12
10
 
13
- @openpay=OpenpayApi.new(@merchant_id, @private_key, false, 30)
14
- @bank_accounts=@openpay.create(:bankaccounts)
15
- @customers=@openpay.create(:customers)
11
+ @openpay=OpenpayApi.new(@merchant_id, @private_key, false, 0)
12
+ @charges=@openpay.create(:charges)
16
13
 
17
14
  end
18
15
 
19
- describe '.get' do
20
-
21
- it 'get a given bank account for a given customer' do
22
-
23
- customer_hash= FactoryGirl.build(:customer)
24
- customer=@customers.create(customer_hash)
25
-
26
- account_hash=FactoryGirl.build(:bank_account)
27
- bank=@bank_accounts.create(account_hash, customer['id'])
28
-
29
- bank_account=@bank_accounts.get(customer['id'], bank['id'])
30
- expect(bank_account['alias']).to match 'Cuenta principal'
31
- @bank_accounts.delete(customer['id'], bank['id'])
32
- @customers.delete(customer['id'])
33
-
34
- end
35
-
16
+ it 'raise a OpenpayException when the operation timeouts' do
17
+ expect{@charges.all}.to raise_error(OpenpayException)
36
18
  end
37
19
 
38
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openpay
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
  - ronnie_bermejo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.0.14
177
+ rubygems_version: 2.0.6
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: ruby api for openpay resources