catarse_pagarme 2.7.2 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee9a86472ff099391c0c8e6325a1c3c59df75b58
4
- data.tar.gz: 7cd444703b838f678225f581badc6692ea1cf968
3
+ metadata.gz: ce5b0b5d15bfad80eb60d2fb0c515ce9893ebead
4
+ data.tar.gz: c22522700e197e43af26a801c23f7648223e273b
5
5
  SHA512:
6
- metadata.gz: 4fb7aa8f70997d872699120360bb10c9317ab0174697b2c6d5270ec0c22e749158b8a5bee4b1a77db63c2438deec9833fb7873db04a086c0a3c492749dbd5f82
7
- data.tar.gz: 386474b3167a359fc2b78a2b23792b9377d756632dbb591731a3f915ec6eb283deee770ff7b2c3eb344a902c3dda2c72cece9d2dee5fa965e7b086d7973a9537
6
+ metadata.gz: 9f1566c56a106264ab2e073e0b353a0c3ac6da6958595b3f530d27190dd8e9db8de86cf2526509d91868940023bcec369cff41b01fcd49301393b6435f9b951e
7
+ data.tar.gz: 68bca20a81f500253f682cca6eb2614cbcf9f4190fdf20f51ccc2ef94ac2328dc23d4213fbdebc7485ca95f54f0bbc8f6b5cf591bccfdffe4c297f86719b8eb4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_pagarme (2.7.2)
4
+ catarse_pagarme (2.7.3)
5
5
  pagarme (= 1.10.0)
6
6
  rails (~> 4.0)
7
7
  weekdays (>= 1.0.2)
@@ -131,3 +131,6 @@ DEPENDENCIES
131
131
  pg
132
132
  pry
133
133
  rspec-rails (~> 2.14.0)
134
+
135
+ BUNDLED WITH
136
+ 1.10.3
@@ -13,7 +13,12 @@ module CatarsePagarme
13
13
 
14
14
  def update
15
15
  transaction = SlipTransaction.new(slip_attributes, payment).charge!
16
- render text: transaction.boleto_url
16
+ respond_to do |format|
17
+ format.html { redirect_to transaction.boleto_url }
18
+ format.json do
19
+ { boleto_url: transaction.boleto_url }
20
+ end
21
+ end
17
22
  end
18
23
 
19
24
  protected
data/config/routes.rb CHANGED
@@ -3,7 +3,7 @@ CatarsePagarme::Engine.routes.draw do
3
3
 
4
4
  member do
5
5
  get :review
6
- put :second_slip, to: 'slip#update'
6
+ get :second_slip, to: 'slip#update'
7
7
  post :pay_credit_card, to: 'credit_cards#create'
8
8
  post :pay_slip, to: 'slip#create'
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.7.2"
2
+ VERSION = "2.7.3"
3
3
  end
@@ -11,13 +11,13 @@ describe CatarsePagarme::SlipController do
11
11
  let(:payment) { contribution.payments.first }
12
12
  let(:credit_card) { create(:credit_card, subscription_id: '1542')}
13
13
 
14
- describe 'PATCH update' do
14
+ describe 'GET update' do
15
15
  context 'without an user' do
16
16
  let(:user) { nil }
17
17
 
18
18
  it 'should raise a error' do
19
19
  expect {
20
- patch :update, locale: :pt, id: contribution.id, use_route: 'catarse_pagarme'
20
+ get :update, locale: :pt, id: contribution.id, use_route: 'catarse_pagarme'
21
21
  }.to raise_error('invalid user')
22
22
  end
23
23
  end
@@ -26,7 +26,7 @@ describe CatarsePagarme::SlipController do
26
26
  let(:user) { payment.user }
27
27
 
28
28
  before do
29
- patch :update, locale: :pt, id: contribution.id, use_route: 'catarse_pagarme'
29
+ get :update, locale: :pt, id: contribution.id, use_route: 'catarse_pagarme'
30
30
  end
31
31
 
32
32
  it 'boleto_url should be filled' do
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.2
4
+ version: 2.7.3
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-24 00:00:00.000000000 Z
12
+ date: 2015-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project:
229
- rubygems_version: 2.4.5
229
+ rubygems_version: 2.2.3
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Integration with Pagar.me