solidus_culqi 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +9 -3
- data/Gemfile +6 -2
- data/Rakefile +2 -0
- data/app/models/concerns/solidus_culqi/inject_installments_concern.rb +2 -0
- data/app/models/concerns/solidus_culqi/permitted_attributes_concern.rb +2 -0
- data/app/models/payment_decorator.rb +2 -0
- data/app/models/permitted_attributes_decorator.rb +2 -0
- data/app/models/solidus/gateway/culqi_gateway.rb +4 -1
- data/config/routes.rb +2 -0
- data/db/migrate/20170919145201_add_installments_to_orders.rb +2 -0
- data/lib/generators/solidus_culqi/install/install_generator.rb +2 -0
- data/lib/solidus_culqi.rb +2 -0
- data/lib/solidus_culqi/engine.rb +2 -0
- data/lib/solidus_culqi/factories.rb +3 -1
- data/lib/solidus_culqi/gateway.rb +2 -0
- data/lib/solidus_culqi/support.rb +2 -0
- data/lib/solidus_culqi/version.rb +3 -1
- data/solidus_culqi.gemspec +6 -4
- data/spec/cassettes/Culqi_checkout/with_logged_user/store_card_in_wallet.yml +24 -24
- data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/capture_payment.yml +23 -23
- data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/process_order.yml +17 -17
- data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/voids_a_payment.yml +23 -23
- data/spec/cassettes/Culqi_checkout_autocapture/with_valid_credit_card/can_process_a_valid_payment.yml +17 -17
- data/spec/cassettes/Culqi_checkout_autocapture/with_valid_credit_card/refunds_a_payment.yml +23 -23
- data/spec/features/culqi_checkout_autocapture_spec.rb +3 -1
- data/spec/features/culqi_checkout_spec.rb +2 -0
- data/spec/models/culqi_gateway.rb +2 -0
- data/spec/spec_helper.rb +5 -2
- data/spec/support/culqi_helper.rb +2 -0
- metadata +9 -9
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "spec_helper"
|
2
4
|
|
3
5
|
RSpec.describe "Culqi checkout autocapture", :vcr, type: :feature, js: true do
|
@@ -34,7 +36,7 @@ RSpec.describe "Culqi checkout autocapture", :vcr, type: :feature, js: true do
|
|
34
36
|
end
|
35
37
|
|
36
38
|
it "refunds a payment" do
|
37
|
-
reason =
|
39
|
+
reason = FactoryBot.create(:refund_reason)
|
38
40
|
|
39
41
|
click_button "Place Order"
|
40
42
|
visit spree.admin_order_payments_path(Spree::Order.last)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Run Coverage report
|
2
4
|
require 'simplecov'
|
3
5
|
SimpleCov.start do
|
@@ -13,7 +15,7 @@ end
|
|
13
15
|
# Configure Rails Environment
|
14
16
|
ENV['RAILS_ENV'] = 'test'
|
15
17
|
|
16
|
-
require File.expand_path('
|
18
|
+
require File.expand_path('dummy/config/environment.rb', __dir__)
|
17
19
|
|
18
20
|
require 'rspec/rails'
|
19
21
|
require 'database_cleaner'
|
@@ -46,7 +48,7 @@ require 'spree/testing_support/preferences'
|
|
46
48
|
require 'solidus_culqi/factories'
|
47
49
|
|
48
50
|
RSpec.configure do |config|
|
49
|
-
config.include
|
51
|
+
config.include FactoryBot::Syntax::Methods
|
50
52
|
config.include CulqiHelper
|
51
53
|
config.include Spree::TestingSupport::UrlHelpers
|
52
54
|
config.include Spree::TestingSupport::Preferences
|
@@ -105,4 +107,5 @@ VCR.configure do |c|
|
|
105
107
|
c.hook_into :webmock
|
106
108
|
c.ignore_localhost = true
|
107
109
|
c.configure_rspec_metadata!
|
110
|
+
c.default_cassette_options = { re_record_interval: 7.days }
|
108
111
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_culqi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- César Carruitero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: culqi-ruby
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: solidus_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: solidus_support
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: database_cleaner
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: factory_bot
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: poltergeist
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
270
|
version: '0'
|
271
271
|
requirements: []
|
272
272
|
rubyforge_project:
|
273
|
-
rubygems_version: 2.6.
|
273
|
+
rubygems_version: 2.6.14
|
274
274
|
signing_key:
|
275
275
|
specification_version: 4
|
276
276
|
summary: Adds solidus support for Culqi Gateway
|