catarse_pagarme 2.10.15 → 2.11.0

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: b566848a36cd013700ab5e10bafc142b516de7b0
4
- data.tar.gz: 0d3c37145bcbe3b6b8ac29b4bfd4f139d9fe06d8
3
+ metadata.gz: 21ed17cfa9f65fa5e88bd34ee66b2bb0ee762fea
4
+ data.tar.gz: ff0c6fab4c90a4f6038f294a608915b9fa39a029
5
5
  SHA512:
6
- metadata.gz: 36d0278391948d04c0bb0e484d9e4809874786254c401432cc701c83af0ef09aa3ae5a35406ba9ed880e0932af1813ece74aeaded00f71f1400ff59f119694b7
7
- data.tar.gz: d13edc16ff5d48ba5acc1babbf9c09e707a986eb1beef659cdf1a56d2c1d091758b79c5c3c7c42df649cbe34a7aefb26a6967ca70a7e6a84b35ed0667fc4017c
6
+ metadata.gz: 28a978f0fc17978e14e7d75b68391334190b4d7e8ac708df7e0346a185e5c28feb2f52f0d75309f6b4b8665474ecfc08a4ffc9b0a6f38e50ba1b4396bb773de3
7
+ data.tar.gz: f600748dfe50ae5882e0dc47cdf8520ed389a5d98f2284485ff0858bd7e860e34e03bfebc57a02ffe33d1636f159ae485823e9bf420e431bb20b96d2b4a44444
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_pagarme (2.10.15)
4
+ catarse_pagarme (2.11.0)
5
5
  pagarme (= 2.1.4)
6
6
  rails (~> 4.0)
7
7
  sentry-raven
@@ -47,55 +47,54 @@ GEM
47
47
  tzinfo (~> 1.1)
48
48
  arel (6.0.4)
49
49
  builder (3.2.3)
50
- coderay (1.1.0)
50
+ coderay (1.1.2)
51
51
  concurrent-ruby (1.0.5)
52
- connection_pool (2.2.1)
53
- crass (1.0.3)
54
- database_cleaner (1.5.0)
52
+ connection_pool (2.2.2)
53
+ crass (1.0.4)
54
+ database_cleaner (1.7.0)
55
55
  diff-lcs (1.3)
56
- domain_name (0.5.20170404)
56
+ domain_name (0.5.20180417)
57
57
  unf (>= 0.0.5, < 1.0.0)
58
58
  erubis (2.7.0)
59
- factory_girl (4.5.0)
59
+ factory_girl (4.9.0)
60
60
  activesupport (>= 3.0.0)
61
- factory_girl_rails (4.5.0)
62
- factory_girl (~> 4.5.0)
61
+ factory_girl_rails (4.9.0)
62
+ factory_girl (~> 4.9.0)
63
63
  railties (>= 3.0.0)
64
- faraday (0.9.2)
64
+ faraday (0.15.2)
65
65
  multipart-post (>= 1.2, < 3)
66
66
  globalid (0.4.1)
67
67
  activesupport (>= 4.2.0)
68
68
  http-cookie (1.0.3)
69
69
  domain_name (~> 0.5)
70
- i18n (0.9.1)
70
+ i18n (0.9.5)
71
71
  concurrent-ruby (~> 1.0)
72
- loofah (2.1.1)
72
+ loofah (2.2.2)
73
73
  crass (~> 1.0.2)
74
74
  nokogiri (>= 1.5.9)
75
75
  mail (2.7.0)
76
76
  mini_mime (>= 0.1.1)
77
- method_source (0.8.2)
78
- mime-types (3.1)
77
+ method_source (0.9.0)
78
+ mime-types (3.2.2)
79
79
  mime-types-data (~> 3.2015)
80
- mime-types-data (3.2016.0521)
81
- mini_mime (1.0.0)
80
+ mime-types-data (3.2018.0812)
81
+ mini_mime (1.0.1)
82
82
  mini_portile2 (2.3.0)
83
- minitest (5.10.3)
84
- multi_json (1.12.2)
83
+ minitest (5.11.3)
84
+ multi_json (1.13.1)
85
85
  multipart-post (2.0.0)
86
86
  netrc (0.11.0)
87
- nokogiri (1.8.1)
87
+ nokogiri (1.8.4)
88
88
  mini_portile2 (~> 2.3.0)
89
89
  pagarme (2.1.4)
90
90
  multi_json
91
91
  rest-client
92
- pg (0.18.3)
93
- pry (0.10.2)
92
+ pg (1.1.3)
93
+ pry (0.11.3)
94
94
  coderay (~> 1.1.0)
95
- method_source (~> 0.8.1)
96
- slop (~> 3.4)
97
- rack (1.6.8)
98
- rack-protection (1.5.3)
95
+ method_source (~> 0.9.0)
96
+ rack (1.6.10)
97
+ rack-protection (2.0.4)
99
98
  rack
100
99
  rack-test (0.6.3)
101
100
  rack (>= 1.0)
@@ -112,49 +111,47 @@ GEM
112
111
  sprockets-rails
113
112
  rails-deprecated_sanitizer (1.0.3)
114
113
  activesupport (>= 4.2.0.alpha)
115
- rails-dom-testing (1.0.8)
116
- activesupport (>= 4.2.0.beta, < 5.0)
114
+ rails-dom-testing (1.0.9)
115
+ activesupport (>= 4.2.0, < 5.0)
117
116
  nokogiri (~> 1.6)
118
117
  rails-deprecated_sanitizer (>= 1.0.1)
119
- rails-html-sanitizer (1.0.3)
120
- loofah (~> 2.0)
118
+ rails-html-sanitizer (1.0.4)
119
+ loofah (~> 2.2, >= 2.2.2)
121
120
  railties (4.2.10)
122
121
  actionpack (= 4.2.10)
123
122
  activesupport (= 4.2.10)
124
123
  rake (>= 0.8.7)
125
124
  thor (>= 0.18.1, < 2.0)
126
- rake (12.3.0)
127
- redis (3.3.2)
125
+ rake (12.3.1)
126
+ redis (4.0.2)
128
127
  rest-client (2.0.2)
129
128
  http-cookie (>= 1.0.2, < 2.0)
130
129
  mime-types (>= 1.16, < 4.0)
131
130
  netrc (~> 0.8)
132
- rspec-core (3.7.0)
133
- rspec-support (~> 3.7.0)
134
- rspec-expectations (3.7.0)
131
+ rspec-core (3.8.0)
132
+ rspec-support (~> 3.8.0)
133
+ rspec-expectations (3.8.1)
135
134
  diff-lcs (>= 1.2.0, < 2.0)
136
- rspec-support (~> 3.7.0)
137
- rspec-mocks (3.7.0)
135
+ rspec-support (~> 3.8.0)
136
+ rspec-mocks (3.8.0)
138
137
  diff-lcs (>= 1.2.0, < 2.0)
139
- rspec-support (~> 3.7.0)
140
- rspec-rails (3.7.2)
138
+ rspec-support (~> 3.8.0)
139
+ rspec-rails (3.8.0)
141
140
  actionpack (>= 3.0)
142
141
  activesupport (>= 3.0)
143
142
  railties (>= 3.0)
144
- rspec-core (~> 3.7.0)
145
- rspec-expectations (~> 3.7.0)
146
- rspec-mocks (~> 3.7.0)
147
- rspec-support (~> 3.7.0)
148
- rspec-support (3.7.0)
149
- sentry-raven (1.2.0)
150
- faraday (>= 0.7.6, < 0.10.x)
151
- sidekiq (4.2.7)
152
- concurrent-ruby (~> 1.0)
153
- connection_pool (~> 2.2, >= 2.2.0)
143
+ rspec-core (~> 3.8.0)
144
+ rspec-expectations (~> 3.8.0)
145
+ rspec-mocks (~> 3.8.0)
146
+ rspec-support (~> 3.8.0)
147
+ rspec-support (3.8.0)
148
+ sentry-raven (2.7.4)
149
+ faraday (>= 0.7.6, < 1.0)
150
+ sidekiq (5.2.2)
151
+ connection_pool (~> 2.2, >= 2.2.2)
154
152
  rack-protection (>= 1.5.0)
155
- redis (~> 3.2, >= 3.2.1)
156
- slop (3.6.0)
157
- sprockets (3.7.1)
153
+ redis (>= 3.3.5, < 5)
154
+ sprockets (3.7.2)
158
155
  concurrent-ruby (~> 1.0)
159
156
  rack (> 1, < 3)
160
157
  sprockets-rails (3.2.1)
@@ -163,11 +160,11 @@ GEM
163
160
  sprockets (>= 3.0.0)
164
161
  thor (0.20.0)
165
162
  thread_safe (0.3.6)
166
- tzinfo (1.2.4)
163
+ tzinfo (1.2.5)
167
164
  thread_safe (~> 0.1)
168
165
  unf (0.1.4)
169
166
  unf_ext
170
- unf_ext (0.0.7.4)
167
+ unf_ext (0.0.7.5)
171
168
  weekdays (1.0.2)
172
169
 
173
170
  PLATFORMS
@@ -182,4 +179,4 @@ DEPENDENCIES
182
179
  rspec-rails (~> 3.3)
183
180
 
184
181
  BUNDLED WITH
185
- 1.13.6
182
+ 1.16.5
@@ -113,14 +113,15 @@ module CatarsePagarme
113
113
  installments = payment.pagarme_delegator.get_installments['installments']
114
114
  collection = installments.map do |installment|
115
115
  installment_number = installment[0].to_i
116
+
116
117
  if installment_number <= (project.try(:total_installments) || CatarsePagarme.configuration.max_installments.to_i)
117
118
  amount = installment[1]['installment_amount'] / 100.0
118
119
 
119
- {amount: amount, number: installment_number}
120
+ { amount: amount, number: installment_number, total_amount: installment[1]['amount'] / 100.0 }
120
121
  end
121
122
  end
122
123
  else
123
- collection = [{amount: payment.value, number: 1}]
124
+ collection = [{ amount: payment.value, number: 1, total_amount: payment.value }]
124
125
  end
125
126
  collection.compact
126
127
  end
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.10.15"
2
+ VERSION = "2.11.0"
3
3
  end
@@ -65,7 +65,7 @@ RSpec.configure do |config|
65
65
  config.before(:each) do
66
66
  DatabaseCleaner.start
67
67
  ActionMailer::Base.deliveries.clear
68
- allow(PagarMe).to receive(:api_key).and_return('ak_test_XLoo19QDn9kg5JFGU70x12IA4NqbAv')
68
+ allow(PagarMe).to receive(:api_key).and_return(ENV['TEST_GATEWAY_API_KEY'])
69
69
  allow(PaymentEngines).to receive(:configuration).and_return({})
70
70
  Sidekiq::Testing.inline!
71
71
  allow(CatarsePagarme::VerifyPagarmeWorker).to receive(:perform_in).and_return(true)
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.10.15
4
+ version: 2.11.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: 2017-11-21 00:00:00.000000000 Z
12
+ date: 2018-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails