catarse_pagarme 2.11.0 → 2.12.0

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: 21ed17cfa9f65fa5e88bd34ee66b2bb0ee762fea
4
- data.tar.gz: ff0c6fab4c90a4f6038f294a608915b9fa39a029
3
+ metadata.gz: 23b7ed33b61bf278071491b4d4cb16fc26cd87a3
4
+ data.tar.gz: 1a3125b4d3b945fdc1673689823bb1c4cc8d9150
5
5
  SHA512:
6
- metadata.gz: 28a978f0fc17978e14e7d75b68391334190b4d7e8ac708df7e0346a185e5c28feb2f52f0d75309f6b4b8665474ecfc08a4ffc9b0a6f38e50ba1b4396bb773de3
7
- data.tar.gz: f600748dfe50ae5882e0dc47cdf8520ed389a5d98f2284485ff0858bd7e860e34e03bfebc57a02ffe33d1636f159ae485823e9bf420e431bb20b96d2b4a44444
6
+ metadata.gz: a40e59a710b544e295b6866653a13673b53eff3f165065290ce69ea13a42ef6a555e980d630a92d7d627abf5babd2382534a719cb790c2fc7e7538d7ded7e255
7
+ data.tar.gz: fd9c19e3b631851304ad7ead7b13f2bfad24b29909c1e0fea0c0582b5f4d251def2658d36ebec655fc744e1eadd7f821ac94e231df91cb74daabf10a1367c50b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_pagarme (2.11.0)
4
+ catarse_pagarme (2.12.0)
5
5
  pagarme (= 2.1.4)
6
6
  rails (~> 4.0)
7
7
  sentry-raven
@@ -61,7 +61,7 @@ GEM
61
61
  factory_girl_rails (4.9.0)
62
62
  factory_girl (~> 4.9.0)
63
63
  railties (>= 3.0.0)
64
- faraday (0.15.2)
64
+ faraday (0.15.4)
65
65
  multipart-post (>= 1.2, < 3)
66
66
  globalid (0.4.1)
67
67
  activesupport (>= 4.2.0)
@@ -72,7 +72,7 @@ GEM
72
72
  loofah (2.2.2)
73
73
  crass (~> 1.0.2)
74
74
  nokogiri (>= 1.5.9)
75
- mail (2.7.0)
75
+ mail (2.7.1)
76
76
  mini_mime (>= 0.1.1)
77
77
  method_source (0.9.0)
78
78
  mime-types (3.2.2)
@@ -123,7 +123,7 @@ GEM
123
123
  rake (>= 0.8.7)
124
124
  thor (>= 0.18.1, < 2.0)
125
125
  rake (12.3.1)
126
- redis (4.0.2)
126
+ redis (4.0.3)
127
127
  rest-client (2.0.2)
128
128
  http-cookie (>= 1.0.2, < 2.0)
129
129
  mime-types (>= 1.16, < 4.0)
@@ -147,7 +147,7 @@ GEM
147
147
  rspec-support (3.8.0)
148
148
  sentry-raven (2.7.4)
149
149
  faraday (>= 0.7.6, < 1.0)
150
- sidekiq (5.2.2)
150
+ sidekiq (5.2.3)
151
151
  connection_pool (~> 2.2, >= 2.2.2)
152
152
  rack-protection (>= 1.5.0)
153
153
  redis (>= 3.3.5, < 5)
@@ -10,6 +10,8 @@ module CatarsePagarme
10
10
 
11
11
  def change_status_by_transaction(transaction_status)
12
12
  case transaction_status
13
+ when 'pending_review' then
14
+ self.payment.try(:notify_about_pending_review)
13
15
  when 'paid', 'authorized' then
14
16
  self.payment.pay unless self.payment.paid?
15
17
  when 'pending_refund' then
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.11.0"
2
+ VERSION = "2.12.0"
3
3
  end
@@ -218,6 +218,17 @@ describe CatarsePagarme::PaymentDelegator do
218
218
  end
219
219
  end
220
220
 
221
+ context "when status is pending_review" do
222
+ before do
223
+ expect(payment).to receive(:notify_about_pending_review)
224
+ delegator.change_status_by_transaction('pending_review')
225
+ end
226
+
227
+ it 'should keep state in current_status' do
228
+ expect(payment.pending?).to eq(true)
229
+ end
230
+ end
231
+
221
232
  context "when status is refunded" do
222
233
  context "and payment is already refunded" do
223
234
  before 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.11.0
4
+ version: 2.12.0
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: 2018-09-19 00:00:00.000000000 Z
12
+ date: 2018-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails