catarse_pagarme 2.7.1 → 2.7.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
  SHA1:
3
- metadata.gz: 206c9608b3e5e57d10d7f9a83d5208980061766a
4
- data.tar.gz: 838ff604dc0851e1fbbb44955a999cca865ff397
3
+ metadata.gz: ee9a86472ff099391c0c8e6325a1c3c59df75b58
4
+ data.tar.gz: 7cd444703b838f678225f581badc6692ea1cf968
5
5
  SHA512:
6
- metadata.gz: 0ef8764eeb290309da82a65c66ef70b3d7296d741d3f3dfb17c7bbe00543e4a9a2d14e591da383833a2e103235c482881345d03549e1b644205847c1e2509c8e
7
- data.tar.gz: ebb62d7e7ff6663d64aecacb3ea3debee701402fc7a1c9b5c3ecd2f82e58789afbd3bd4df87b9847af0e2e472a028eef02dc150d3554396788ddd6ac088b0c49
6
+ metadata.gz: 4fb7aa8f70997d872699120360bb10c9317ab0174697b2c6d5270ec0c22e749158b8a5bee4b1a77db63c2438deec9833fb7873db04a086c0a3c492749dbd5f82
7
+ data.tar.gz: 386474b3167a359fc2b78a2b23792b9377d756632dbb591731a3f915ec6eb283deee770ff7b2c3eb344a902c3dda2c72cece9d2dee5fa965e7b086d7973a9537
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_pagarme (2.7.1)
4
+ catarse_pagarme (2.7.2)
5
5
  pagarme (= 1.10.0)
6
6
  rails (~> 4.0)
7
7
  weekdays (>= 1.0.2)
@@ -5,7 +5,7 @@ module CatarsePagarme
5
5
  transaction = CreditCardTransaction.new(credit_card_attributes, payment).charge!
6
6
 
7
7
  render json: { payment_status: transaction.status }
8
- rescue Exception => e
8
+ rescue PagarMe::PagarMeError => e
9
9
  render json: { payment_status: 'failed', message: e.message }
10
10
  end
11
11
 
@@ -7,8 +7,10 @@ module CatarsePagarme
7
7
  self.transaction = PagarMe::Transaction.new(self.attributes)
8
8
 
9
9
  payment.update_attributes({
10
- gateway: 'Pagarme', payment_method: payment_method})
11
- payment.save
10
+ gateway: 'Pagarme',
11
+ payment_method: payment_method
12
+ })
13
+ payment.save!
12
14
 
13
15
  self.transaction.charge
14
16
 
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.7.1"
2
+ VERSION = "2.7.2"
3
3
  end
@@ -47,7 +47,7 @@ describe CatarsePagarme::CreditCardsController do
47
47
 
48
48
  context "when charges fails" do
49
49
  before do
50
- allow_any_instance_of(PagarMe::Transaction).to receive(:charge).and_raise("boom")
50
+ allow_any_instance_of(PagarMe::Transaction).to receive(:charge).and_raise(PagarMe::PagarMeError)
51
51
  post :create, {
52
52
  locale: :pt, id: contribution.id, use_route: 'catarse_pagarme',
53
53
  card_hash: sample_card_hash }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catarse_pagarme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-23 00:00:00.000000000 Z
12
+ date: 2015-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails