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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.travis.yml +9 -3
  4. data/Gemfile +6 -2
  5. data/Rakefile +2 -0
  6. data/app/models/concerns/solidus_culqi/inject_installments_concern.rb +2 -0
  7. data/app/models/concerns/solidus_culqi/permitted_attributes_concern.rb +2 -0
  8. data/app/models/payment_decorator.rb +2 -0
  9. data/app/models/permitted_attributes_decorator.rb +2 -0
  10. data/app/models/solidus/gateway/culqi_gateway.rb +4 -1
  11. data/config/routes.rb +2 -0
  12. data/db/migrate/20170919145201_add_installments_to_orders.rb +2 -0
  13. data/lib/generators/solidus_culqi/install/install_generator.rb +2 -0
  14. data/lib/solidus_culqi.rb +2 -0
  15. data/lib/solidus_culqi/engine.rb +2 -0
  16. data/lib/solidus_culqi/factories.rb +3 -1
  17. data/lib/solidus_culqi/gateway.rb +2 -0
  18. data/lib/solidus_culqi/support.rb +2 -0
  19. data/lib/solidus_culqi/version.rb +3 -1
  20. data/solidus_culqi.gemspec +6 -4
  21. data/spec/cassettes/Culqi_checkout/with_logged_user/store_card_in_wallet.yml +24 -24
  22. data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/capture_payment.yml +23 -23
  23. data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/process_order.yml +17 -17
  24. data/spec/cassettes/Culqi_checkout/with_unlogged_user/with_process_checkout/voids_a_payment.yml +23 -23
  25. data/spec/cassettes/Culqi_checkout_autocapture/with_valid_credit_card/can_process_a_valid_payment.yml +17 -17
  26. data/spec/cassettes/Culqi_checkout_autocapture/with_valid_credit_card/refunds_a_payment.yml +23 -23
  27. data/spec/features/culqi_checkout_autocapture_spec.rb +3 -1
  28. data/spec/features/culqi_checkout_spec.rb +2 -0
  29. data/spec/models/culqi_gateway.rb +2 -0
  30. data/spec/spec_helper.rb +5 -2
  31. data/spec/support/culqi_helper.rb +2 -0
  32. 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 = FactoryGirl.create(:refund_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)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  RSpec.describe "Culqi checkout", :vcr, type: :feature, js: true do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Solidus::Gateway::CulqiGateway, type: :model do
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('../dummy/config/environment.rb', __FILE__)
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 FactoryGirl::Syntax::Methods
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  module CulqiHelper
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.2
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: 2017-10-16 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: solidus_core
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: solidus_support
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: culqi-ruby
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: poltergeist
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: database_cleaner
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: factory_girl
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.13
273
+ rubygems_version: 2.6.14
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Adds solidus support for Culqi Gateway