cbraspag 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/README.md +4 -3
  2. data/cbraspag.gemspec +2 -0
  3. data/coverage/.resultset.json +3445 -0
  4. data/coverage/assets/0.5.3/app.js +88 -0
  5. data/coverage/assets/0.5.3/fancybox/blank.gif +0 -0
  6. data/coverage/assets/0.5.3/fancybox/fancy_close.png +0 -0
  7. data/coverage/assets/0.5.3/fancybox/fancy_loading.png +0 -0
  8. data/coverage/assets/0.5.3/fancybox/fancy_nav_left.png +0 -0
  9. data/coverage/assets/0.5.3/fancybox/fancy_nav_right.png +0 -0
  10. data/coverage/assets/0.5.3/fancybox/fancy_shadow_e.png +0 -0
  11. data/coverage/assets/0.5.3/fancybox/fancy_shadow_n.png +0 -0
  12. data/coverage/assets/0.5.3/fancybox/fancy_shadow_ne.png +0 -0
  13. data/coverage/assets/0.5.3/fancybox/fancy_shadow_nw.png +0 -0
  14. data/coverage/assets/0.5.3/fancybox/fancy_shadow_s.png +0 -0
  15. data/coverage/assets/0.5.3/fancybox/fancy_shadow_se.png +0 -0
  16. data/coverage/assets/0.5.3/fancybox/fancy_shadow_sw.png +0 -0
  17. data/coverage/assets/0.5.3/fancybox/fancy_shadow_w.png +0 -0
  18. data/coverage/assets/0.5.3/fancybox/fancy_title_left.png +0 -0
  19. data/coverage/assets/0.5.3/fancybox/fancy_title_main.png +0 -0
  20. data/coverage/assets/0.5.3/fancybox/fancy_title_over.png +0 -0
  21. data/coverage/assets/0.5.3/fancybox/fancy_title_right.png +0 -0
  22. data/coverage/assets/0.5.3/fancybox/fancybox-x.png +0 -0
  23. data/coverage/assets/0.5.3/fancybox/fancybox-y.png +0 -0
  24. data/coverage/assets/0.5.3/fancybox/fancybox.png +0 -0
  25. data/coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.css +363 -0
  26. data/coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.pack.js +44 -0
  27. data/coverage/assets/0.5.3/favicon_green.png +0 -0
  28. data/coverage/assets/0.5.3/favicon_red.png +0 -0
  29. data/coverage/assets/0.5.3/favicon_yellow.png +0 -0
  30. data/coverage/assets/0.5.3/highlight.css +129 -0
  31. data/coverage/assets/0.5.3/highlight.pack.js +1 -0
  32. data/coverage/assets/0.5.3/jquery-1.6.2.min.js +18 -0
  33. data/coverage/assets/0.5.3/jquery.dataTables.min.js +152 -0
  34. data/coverage/assets/0.5.3/jquery.timeago.js +141 -0
  35. data/coverage/assets/0.5.3/jquery.url.js +174 -0
  36. data/coverage/assets/0.5.3/loading.gif +0 -0
  37. data/coverage/assets/0.5.3/magnify.png +0 -0
  38. data/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  39. data/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  40. data/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  41. data/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  42. data/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  43. data/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  44. data/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  45. data/coverage/assets/0.5.3/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  46. data/coverage/assets/0.5.3/smoothness/images/ui-icons_222222_256x240.png +0 -0
  47. data/coverage/assets/0.5.3/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  48. data/coverage/assets/0.5.3/smoothness/images/ui-icons_454545_256x240.png +0 -0
  49. data/coverage/assets/0.5.3/smoothness/images/ui-icons_888888_256x240.png +0 -0
  50. data/coverage/assets/0.5.3/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  51. data/coverage/assets/0.5.3/smoothness/jquery-ui-1.8.4.custom.css +295 -0
  52. data/coverage/assets/0.5.3/stylesheet.css +383 -0
  53. data/coverage/index.html +21549 -0
  54. data/lib/cbraspag.rb +1 -1
  55. data/lib/cbraspag/core/connection.rb +25 -20
  56. data/lib/cbraspag/core/converter.rb +22 -119
  57. data/lib/cbraspag/core/customer.rb +0 -24
  58. data/lib/cbraspag/core/order.rb +179 -129
  59. data/lib/cbraspag/payment/billet.rb +38 -17
  60. data/lib/cbraspag/payment/credit_card.rb +86 -112
  61. data/lib/cbraspag/payment/eft.rb +0 -16
  62. data/lib/cbraspag/payment/recurrency_credit_card.rb +99 -0
  63. data/lib/cbraspag/version.rb +1 -1
  64. data/spec/core/connection_spec.rb +56 -2
  65. data/spec/core/converter_spec.rb +49 -10
  66. data/spec/core/order_spec.rb +315 -193
  67. data/spec/integration/billet_spec.rb +38 -0
  68. data/spec/integration/credit_card_spec.rb +0 -0
  69. data/spec/payment/billet_spec.rb +130 -81
  70. data/spec/payment/credit_card_spec.rb +263 -487
  71. data/spec/payment/recurrency_credit_card_spec.rb +479 -0
  72. data/spec/spec_helper.rb +15 -2
  73. metadata +92 -6
  74. data/Guardfile +0 -10
  75. data/lib/cbraspag/core/response.rb +0 -27
  76. data/spec/core/response_spec.rb +0 -5
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,24 @@
1
1
  require 'rubygems'
2
2
  require 'bundler'
3
- require 'cbraspag'
3
+
4
4
  Bundler.setup(:default, :test, :development)
5
5
 
6
+ require 'simplecov'
7
+ SimpleCov.start do
8
+ add_group "Core", "lib/cbraspag/core"
9
+ add_group "Crypto", "lib/cbraspag/crypto"
10
+ add_group "Payment", "lib/cbraspag/payment"
11
+ add_group "ActiveMerchant", "lib/cbraspag/active_mechant"
12
+ add_group "Spec", "spec"
13
+ end
14
+
6
15
  require 'pry'
16
+ require 'cbraspag'
17
+
18
+ HTTPI.log = false
7
19
 
8
20
  RSpec.configure do |config|
9
21
  config.mock_with :rspec
10
- HTTPI.log = false
22
+ config.filter_run_excluding :integration => true, :billet_integration => true
23
+ config.run_all_when_everything_filtered = true
11
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbraspag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,8 +10,24 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-24 00:00:00.000000000 Z
13
+ date: 2012-11-12 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activemerchant
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 1.28.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 1.28.0
15
31
  - !ruby/object:Gem::Dependency
16
32
  name: active_attr
17
33
  requirement: !ruby/object:Gem::Requirement
@@ -124,6 +140,22 @@ dependencies:
124
140
  - - ! '>='
125
141
  - !ruby/object:Gem::Version
126
142
  version: '0'
143
+ - !ruby/object:Gem::Dependency
144
+ name: simplecov
145
+ requirement: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ type: :development
152
+ prerelease: false
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
127
159
  - !ruby/object:Gem::Dependency
128
160
  name: pry
129
161
  requirement: !ruby/object:Gem::Requirement
@@ -152,37 +184,89 @@ files:
152
184
  - .rspec
153
185
  - Gemfile
154
186
  - Gemfile.lock
155
- - Guardfile
156
187
  - LICENSE.md
157
188
  - README.md
158
189
  - RELEASES.md
159
190
  - Rakefile
160
191
  - cbraspag.gemspec
192
+ - coverage/.resultset.json
193
+ - coverage/assets/0.5.3/app.js
194
+ - coverage/assets/0.5.3/fancybox/blank.gif
195
+ - coverage/assets/0.5.3/fancybox/fancy_close.png
196
+ - coverage/assets/0.5.3/fancybox/fancy_loading.png
197
+ - coverage/assets/0.5.3/fancybox/fancy_nav_left.png
198
+ - coverage/assets/0.5.3/fancybox/fancy_nav_right.png
199
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_e.png
200
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_n.png
201
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_ne.png
202
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_nw.png
203
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_s.png
204
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_se.png
205
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_sw.png
206
+ - coverage/assets/0.5.3/fancybox/fancy_shadow_w.png
207
+ - coverage/assets/0.5.3/fancybox/fancy_title_left.png
208
+ - coverage/assets/0.5.3/fancybox/fancy_title_main.png
209
+ - coverage/assets/0.5.3/fancybox/fancy_title_over.png
210
+ - coverage/assets/0.5.3/fancybox/fancy_title_right.png
211
+ - coverage/assets/0.5.3/fancybox/fancybox-x.png
212
+ - coverage/assets/0.5.3/fancybox/fancybox-y.png
213
+ - coverage/assets/0.5.3/fancybox/fancybox.png
214
+ - coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.css
215
+ - coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.pack.js
216
+ - coverage/assets/0.5.3/favicon_green.png
217
+ - coverage/assets/0.5.3/favicon_red.png
218
+ - coverage/assets/0.5.3/favicon_yellow.png
219
+ - coverage/assets/0.5.3/highlight.css
220
+ - coverage/assets/0.5.3/highlight.pack.js
221
+ - coverage/assets/0.5.3/jquery-1.6.2.min.js
222
+ - coverage/assets/0.5.3/jquery.dataTables.min.js
223
+ - coverage/assets/0.5.3/jquery.timeago.js
224
+ - coverage/assets/0.5.3/jquery.url.js
225
+ - coverage/assets/0.5.3/loading.gif
226
+ - coverage/assets/0.5.3/magnify.png
227
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
228
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
229
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
230
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
231
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_dadada_1x400.png
232
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
233
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
234
+ - coverage/assets/0.5.3/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
235
+ - coverage/assets/0.5.3/smoothness/images/ui-icons_222222_256x240.png
236
+ - coverage/assets/0.5.3/smoothness/images/ui-icons_2e83ff_256x240.png
237
+ - coverage/assets/0.5.3/smoothness/images/ui-icons_454545_256x240.png
238
+ - coverage/assets/0.5.3/smoothness/images/ui-icons_888888_256x240.png
239
+ - coverage/assets/0.5.3/smoothness/images/ui-icons_cd0a0a_256x240.png
240
+ - coverage/assets/0.5.3/smoothness/jquery-ui-1.8.4.custom.css
241
+ - coverage/assets/0.5.3/stylesheet.css
242
+ - coverage/index.html
161
243
  - lib/cbraspag.rb
162
244
  - lib/cbraspag/core/connection.rb
163
245
  - lib/cbraspag/core/converter.rb
164
246
  - lib/cbraspag/core/customer.rb
165
247
  - lib/cbraspag/core/order.rb
166
248
  - lib/cbraspag/core/poster.rb
167
- - lib/cbraspag/core/response.rb
168
249
  - lib/cbraspag/crypto/jar_webservice.rb
169
250
  - lib/cbraspag/crypto/no_crypto.rb
170
251
  - lib/cbraspag/crypto/webservice.rb
171
252
  - lib/cbraspag/payment/billet.rb
172
253
  - lib/cbraspag/payment/credit_card.rb
173
254
  - lib/cbraspag/payment/eft.rb
255
+ - lib/cbraspag/payment/recurrency_credit_card.rb
174
256
  - lib/cbraspag/version.rb
175
257
  - spec/core/connection_spec.rb
176
258
  - spec/core/converter_spec.rb
177
259
  - spec/core/customer_spec.rb
178
260
  - spec/core/order_spec.rb
179
261
  - spec/core/poster_spec.rb
180
- - spec/core/response_spec.rb
181
262
  - spec/crypto/jar_webservice_spec.rb
182
263
  - spec/crypto/webservice_spec.rb
264
+ - spec/integration/billet_spec.rb
265
+ - spec/integration/credit_card_spec.rb
183
266
  - spec/payment/billet_spec.rb
184
267
  - spec/payment/credit_card_spec.rb
185
268
  - spec/payment/eft_spec.rb
269
+ - spec/payment/recurrency_credit_card_spec.rb
186
270
  - spec/spec_helper.rb
187
271
  homepage: http://github.com/codeminer42/braspag
188
272
  licenses: []
@@ -214,11 +298,13 @@ test_files:
214
298
  - spec/core/customer_spec.rb
215
299
  - spec/core/order_spec.rb
216
300
  - spec/core/poster_spec.rb
217
- - spec/core/response_spec.rb
218
301
  - spec/crypto/jar_webservice_spec.rb
219
302
  - spec/crypto/webservice_spec.rb
303
+ - spec/integration/billet_spec.rb
304
+ - spec/integration/credit_card_spec.rb
220
305
  - spec/payment/billet_spec.rb
221
306
  - spec/payment/credit_card_spec.rb
222
307
  - spec/payment/eft_spec.rb
308
+ - spec/payment/recurrency_credit_card_spec.rb
223
309
  - spec/spec_helper.rb
224
310
  has_rdoc:
data/Guardfile DELETED
@@ -1,10 +0,0 @@
1
- guard 'bundler' do
2
- watch('Gemfile')
3
- end
4
-
5
- guard 'rspec', :version => 2, :bundler => false do
6
- watch(%r{^spec/(.*)_spec\.rb$})
7
- watch(%r{^lib/cbraspag.rb$}) { "spec" }
8
- watch(%r{^lib/cbraspag/(.*)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
9
- watch('spec/spec_helper.rb') { "spec" }
10
- end
@@ -1,27 +0,0 @@
1
- module Braspag
2
- class Response
3
- attr_reader :params, :message, :test, :authorization, :avs_result, :cvv_result
4
-
5
- def success?
6
- @success
7
- end
8
-
9
- def test?
10
- @test
11
- end
12
-
13
- def fraud_review?
14
- @fraud_review
15
- end
16
-
17
- def initialize(success, message, params = {}, options = {})
18
- @success, @message, @params = success, message, params.stringify_keys
19
- @test = options[:test] || false
20
- @authorization = options[:authorization]
21
- @fraud_review = options[:fraud_review]
22
- @avs_result = {:code => nil}
23
- @cvv_result = {:code => nil}
24
- end
25
- end
26
-
27
- end
@@ -1,5 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
-
3
- describe Braspag::Response do
4
-
5
- end