spree_braintree_vzero 3.5.1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +11 -0
  3. data/.travis.yml +39 -46
  4. data/Appraisals +19 -28
  5. data/README.md +6 -4
  6. data/app/assets/images/backend-settle.svg +3 -0
  7. data/app/assets/javascripts/spree/frontend/spree_braintree_vzero.js +3 -1
  8. data/app/controllers/spree/admin/payments_controller_decorator.rb +9 -4
  9. data/app/controllers/spree/orders_controller_decorator.rb +2 -0
  10. data/app/helpers/spree/admin/payment_methods_helper.rb +11 -5
  11. data/app/helpers/spree/braintree_helper.rb +2 -2
  12. data/app/models/concerns/spree/gateway/braintree_vzero/legacy_rails_patch.rb +20 -0
  13. data/app/models/spree/address_decorator.rb +2 -2
  14. data/app/models/spree/braintree_vzero/order_decorator.rb +155 -0
  15. data/app/models/spree/gateway/braintree_vzero_base/utils.rb +50 -3
  16. data/app/models/spree/gateway/braintree_vzero_base.rb +4 -0
  17. data/app/models/spree/gateway/braintree_vzero_drop_in_ui.rb +3 -1
  18. data/app/models/spree/gateway/braintree_vzero_hosted_fields.rb +3 -1
  19. data/app/models/spree/log_entry_decorator.rb +52 -0
  20. data/app/models/spree/payment_processing_decorator.rb +12 -0
  21. data/app/models/spree/preferences/preferable_decorator.rb +1 -1
  22. data/app/overrides/spree/orders/edit.rb +1 -1
  23. data/app/views/spree/braintree_vzero/_paypal_checkout.html.erb +77 -59
  24. data/app/views/spree/checkout/payment/braintree_vzero/_non_three_d_secure.html.erb +178 -0
  25. data/app/views/spree/checkout/payment/braintree_vzero/_payment.html.erb +32 -13
  26. data/app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb +54 -14
  27. data/config/initializers/prepend_helpers.rb +3 -1
  28. data/db/migrate/20160112153422_add_admin_payment_to_spree_braintree_checkout.rb +1 -1
  29. data/gemfiles/spree_3_7.gemfile +2 -0
  30. data/gemfiles/spree_4_0.gemfile +1 -0
  31. data/gemfiles/{spree_3_5.gemfile → spree_4_1.gemfile} +2 -5
  32. data/gemfiles/{spree_4_0_spree_auth_devise.gemfile → spree_4_2.gemfile} +2 -2
  33. data/gemfiles/spree_master.gemfile +1 -3
  34. data/lib/spree_braintree_vzero/engine.rb +3 -1
  35. data/lib/spree_braintree_vzero/version.rb +2 -2
  36. data/spec/controllers/spree/checkout_controller_spec.rb +1 -1
  37. data/spec/features/spree/admin/log_entries_spec.rb +18 -3
  38. data/spec/models/gateway/braintree_vzero_base_spec.rb +8 -5
  39. data/spec/models/spree/address_spec.rb +18 -0
  40. data/spec/support/vcr.rb +1 -1
  41. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/sends_address_data_when_address_is_new.yml +72 -0
  42. data/spree_braintree_vzero.gemspec +4 -5
  43. metadata +22 -49
  44. data/app/controllers/spree/user_sessions_controller_decorator.rb +0 -15
  45. data/app/models/spree/order_decorator.rb +0 -153
  46. data/gemfiles/spree_3_5_spree_auth_devise.gemfile +0 -13
  47. data/gemfiles/spree_3_7_spree_auth_devise.gemfile +0 -13
  48. data/gemfiles/spree_master_spree_auth_devise.gemfile +0 -12
@@ -8,5 +8,7 @@ gem "pg"
8
8
  gem "mysql2"
9
9
  gem "webmock", ">= 2.3.1"
10
10
  gem "rails-controller-testing"
11
+ gem "spree_auth_devise", "~> 3.5.2"
12
+
11
13
 
12
14
  gemspec path: "../"
@@ -7,5 +7,6 @@ gem "pg"
7
7
  gem "mysql2"
8
8
  gem "webmock", ">= 2.3.1"
9
9
  gem "rails-controller-testing"
10
+ gem "spree_auth_devise", "~> 4.0.0"
10
11
 
11
12
  gemspec path: "../"
@@ -2,11 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "spree", "~> 3.5.0"
6
- gem "pg"
7
- gem "mysql2"
8
- gem "webmock", ">= 2.3.1"
5
+ gem "spree", "~> 4.1.0"
6
+ gem "spree_auth_devise", "~> 4.1.0"
9
7
  gem "rails-controller-testing"
10
- gem 'sprockets', '~> 3.7'
11
8
 
12
9
  gemspec path: "../"
@@ -2,11 +2,11 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "spree", "~> 4.0.0"
5
+ gem "spree", "~> 4.2.0"
6
+ gem "spree_auth_devise", "~> 4.2.0"
6
7
  gem "pg"
7
8
  gem "mysql2"
8
9
  gem "webmock", ">= 2.3.1"
9
10
  gem "rails-controller-testing"
10
- gem "spree_auth_devise", "~> 4.0.0"
11
11
 
12
12
  gemspec path: "../"
@@ -3,9 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "spree", github: "spree/spree", branch: "master"
6
- gem "pg"
7
- gem "mysql2"
8
- gem "webmock", ">= 2.3.1"
6
+ gem "spree_auth_devise", github: "spree/spree_auth_devise", branch: "master"
9
7
  gem "rails-controller-testing"
10
8
 
11
9
  gemspec path: "../"
@@ -1,3 +1,5 @@
1
+ require 'braintree'
2
+
1
3
  module SpreeBraintreeVzero
2
4
  class Engine < Rails::Engine
3
5
  require 'spree/core'
@@ -17,7 +19,7 @@ module SpreeBraintreeVzero
17
19
 
18
20
  config.to_prepare &method(:activate).to_proc
19
21
 
20
- initializer 'spree.braintree_vzero.payment_methods', after: 'spree.register.payment_methods' do |app|
22
+ config.after_initialize do |app|
21
23
  app.config.spree.payment_methods += [
22
24
  Spree::Gateway::BraintreeVzeroDropInUi,
23
25
  Spree::Gateway::BraintreeVzeroPaypalExpress,
@@ -9,8 +9,8 @@ module SpreeBraintreeVzero
9
9
 
10
10
  module VERSION
11
11
  MAJOR = 3
12
- MINOR = 5
13
- TINY = 1
12
+ MINOR = 6
13
+ TINY = 0
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
16
16
  end
@@ -78,7 +78,7 @@ describe Spree::CheckoutController, :vcr, type: :controller do
78
78
  it 'amount in payment should be updated' do
79
79
  expect(order.reload.payments.sum(:amount)).to eq 0
80
80
  put :update, params: { state: 'confirm' }
81
- expect(order.reload.payments.last.amount).to eq order.order_total_after_store_credit
81
+ expect(order.reload.payments.last.amount).to eq order.total
82
82
  end
83
83
  end
84
84
  end
@@ -28,7 +28,12 @@ describe 'Log entries', :vcr, type: :feature do
28
28
  find_all("#payment_#{payment.id} a")[0].click
29
29
  end
30
30
 
31
- click_link 'Logs'
31
+ if Spree.version.to_f < 4.0
32
+ click_link 'Logs'
33
+ else
34
+ all('a', text: 'Logs')[0].click
35
+ end
36
+
32
37
  within('#listing_log_entries') do
33
38
  expect(page).to have_css('.log_entry.success')
34
39
  expect(page).not_to have_css('.log_entry.fail')
@@ -50,8 +55,18 @@ describe 'Log entries', :vcr, type: :feature do
50
55
  expect(message).to be_present
51
56
 
52
57
  visit spree.admin_order_payments_path(order)
53
- find("#payment_#{payment.id} a").click
54
- click_link 'Logs'
58
+ if Spree.version.to_f < 4.0
59
+ find("#payment_#{payment.id} a").click
60
+ else
61
+ find_all("#payment_#{payment.id} a")[0].click
62
+ end
63
+
64
+ if Spree.version.to_f < 4.0
65
+ click_link 'Logs'
66
+ else
67
+ all('a', text: 'Logs')[0].click
68
+ end
69
+
55
70
  within('#listing_log_entries') do
56
71
  expect(page).not_to have_css('.log_entry.success')
57
72
  expect(page).to have_css('.log_entry.fail')
@@ -116,9 +116,10 @@ describe Spree::Gateway::BraintreeVzeroBase, :vcr do
116
116
  it 'saves Braintree::Address id to Spree::Address when address is being saved' do
117
117
  gateway.preferred_pass_billing_and_shipping_address = true
118
118
  address = create(:address)
119
- order.ship_address = address
120
- order.bill_address = address
121
- order.save
119
+
120
+ order.update!(ship_address: address, bill_address: address)
121
+ user.update!(ship_address: address, bill_address: address)
122
+
122
123
  purchase
123
124
  order.reload
124
125
 
@@ -133,8 +134,10 @@ describe Spree::Gateway::BraintreeVzeroBase, :vcr do
133
134
  gateway.preferred_pass_billing_and_shipping_address = true
134
135
  ship_address = create(:address, first_name: 'foo')
135
136
  bill_address = create(:address, first_name: 'bar')
136
- order.ship_address = ship_address
137
- order.bill_address = bill_address
137
+
138
+ order.update!(ship_address: ship_address, bill_address: bill_address)
139
+ user.update!(ship_address: ship_address, bill_address: bill_address)
140
+
138
141
  order.save
139
142
  purchase
140
143
  order.reload
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::Address do
4
+ describe '.vaulted_duplicates' do
5
+ subject { described_class.vaulted_duplicates(given_address) }
6
+
7
+ let(:given_address) { create(:address) }
8
+ let(:vaulted_duplicate) do
9
+ Spree::Address.create(given_address.attributes.symbolize_keys.except(:id, :updated_at, :created_at, :braintree_id, :preferences).
10
+ merge(braintree_id: rand(100)))
11
+ end
12
+ let(:some_address) { create(:address) }
13
+
14
+ it 'returns only vaulted duplicates of given address' do
15
+ expect(subject).to contain_exactly vaulted_duplicate
16
+ end
17
+ end
18
+ end
data/spec/support/vcr.rb CHANGED
@@ -5,6 +5,6 @@ VCR.configure do |config|
5
5
  config.hook_into :webmock
6
6
  config.ignore_localhost = true
7
7
  config.configure_rspec_metadata!
8
- config.default_cassette_options = { match_requests_on: [:method, :host], record: :new_episodes }
8
+ config.default_cassette_options = { match_requests_on: [:method, :host], record: :once }
9
9
  config.ignore_hosts 'codeclimate.com'
10
10
  end
@@ -0,0 +1,72 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.sandbox.braintreegateway.com/merchants/6g9mpsybnt3htx2t/customers/2
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip
12
+ Accept:
13
+ - application/xml
14
+ User-Agent:
15
+ - Braintree Ruby Gem 3.1.0
16
+ X-Apiversion:
17
+ - '6'
18
+ Content-Type:
19
+ - application/xml
20
+ Authorization:
21
+ - Basic djY2MjhraHNoYjVrOW52dDpkN2FhYzU0NDRmMzdhMTY5ZTVhMWVlOTkzYmI1MmY1Mw==
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: ''
26
+ headers:
27
+ Date:
28
+ - Thu, 03 Dec 2020 13:28:35 GMT
29
+ Content-Type:
30
+ - application/xml; charset=utf-8
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ X-Xss-Protection:
34
+ - 1; mode=block
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ X-Download-Options:
38
+ - noopen
39
+ X-Permitted-Cross-Domain-Policies:
40
+ - none
41
+ Referrer-Policy:
42
+ - strict-origin-when-cross-origin
43
+ X-Authentication:
44
+ - basic_auth
45
+ X-User:
46
+ - c97s5s74wf6cmypv
47
+ Vary:
48
+ - Accept-Encoding, Origin
49
+ Content-Encoding:
50
+ - gzip
51
+ Etag:
52
+ - W/"cdc2dd1286ed5b9f9b8282c940bd6f87"
53
+ Cache-Control:
54
+ - max-age=0, private, must-revalidate
55
+ X-Runtime:
56
+ - '0.104716'
57
+ X-Request-Id:
58
+ - 95722415-01a2-4bee-b287-f6fa5bb5d9dc
59
+ Content-Security-Policy:
60
+ - frame-ancestors 'self'
61
+ X-Broxyid:
62
+ - 95722415-01a2-4bee-b287-f6fa5bb5d9dc
63
+ Strict-Transport-Security:
64
+ - max-age=31536000; includeSubDomains
65
+ Transfer-Encoding:
66
+ - chunked
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: !binary |-
70
+ H4sIAAPoyF8AA5RSy07DMBC89ysi313nISFauSkSCKRK3AoCbtt4m1j4Edkuafh64qYvqScutmZmxztrmy/3WiU/6Ly0ZkGyaUoSNJUV0tQL8rZ+pvdkWU54tfPBanTlJEm4FGXO2bBGMJBVAybQAd/VM936fmNC0YR9Hji7VmP1VjofqAGN5co2hrMrIuoKTujJImcXGMXK6hZMXz6OO2cnIoqoQapSS4dKwdR3YCR0/ls+dICqauQ0HsPZWBYNbWMNJkaqBQluh4SNAWF/w3W48TLc1lYOIaCgEJLQt7ggYoBBaiRlnuYpzTJapOssnefFPE2/hrxnw8G/a8X//BfD2P/wKHQrUQk/RqqV3YCKt/1ZvP+Kl1n4+lhtX2vOLsoxupCBVuCEPzYH56A/TgZCOPQeb7RhhvNP+AMAAP//AwAWVZ08PAIAAA==
71
+ recorded_at: Thu, 03 Dec 2020 13:28:35 GMT
72
+ recorded_with: VCR 6.0.0
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.name = 'spree_braintree_vzero'
10
10
  s.version = SpreeBraintreeVzero.version
11
- s.summary = 'Spree Braintree v.zero'
12
- s.description = 'Braintree v.zero extension for Spree Commerce'
11
+ s.summary = 'Official Braintree + PayPal for Spree Commerce'
12
+ s.description = 'Official Braintree + PayPal for Spree Commerce'
13
13
  s.required_ruby_version = '>= 2.0.0'
14
14
 
15
15
  s.author = 'Spark Solutions'
@@ -22,14 +22,13 @@ Gem::Specification.new do |s|
22
22
  s.require_path = 'lib'
23
23
  s.requirements << 'none'
24
24
 
25
- spree_version = '>= 3.1.0', '< 5.0'
25
+ spree_version = '>= 3.1.0'
26
26
  s.add_dependency 'spree_core', spree_version
27
27
  s.add_dependency 'spree_backend', spree_version
28
28
  s.add_dependency 'spree_frontend', spree_version
29
29
  s.add_dependency 'spree_extension'
30
30
  s.add_dependency 'braintree', '>= 2.40.0'
31
31
  s.add_dependency 'deface', '~> 1.0'
32
- s.add_dependency 'whenever'
33
32
 
34
33
  s.add_development_dependency 'appraisal'
35
34
  s.add_development_dependency 'capybara'
@@ -48,5 +47,5 @@ Gem::Specification.new do |s|
48
47
  s.add_development_dependency 'simplecov'
49
48
  s.add_development_dependency 'sqlite3'
50
49
  s.add_development_dependency 'vcr'
51
- s.add_development_dependency 'webmock', '~> 2.3' # https://github.com/bblimke/webmock/issues/683
50
+ s.add_development_dependency 'webmock', '~> 3.12' # https://github.com/bblimke/webmock/issues/683
52
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_braintree_vzero
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spark Solutions
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-25 00:00:00.000000000 Z
11
+ date: 2023-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.1.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.1.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '5.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: spree_backend
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -37,9 +31,6 @@ dependencies:
37
31
  - - ">="
38
32
  - !ruby/object:Gem::Version
39
33
  version: 3.1.0
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '5.0'
43
34
  type: :runtime
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,9 +38,6 @@ dependencies:
47
38
  - - ">="
48
39
  - !ruby/object:Gem::Version
49
40
  version: 3.1.0
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '5.0'
53
41
  - !ruby/object:Gem::Dependency
54
42
  name: spree_frontend
55
43
  requirement: !ruby/object:Gem::Requirement
@@ -57,9 +45,6 @@ dependencies:
57
45
  - - ">="
58
46
  - !ruby/object:Gem::Version
59
47
  version: 3.1.0
60
- - - "<"
61
- - !ruby/object:Gem::Version
62
- version: '5.0'
63
48
  type: :runtime
64
49
  prerelease: false
65
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -67,9 +52,6 @@ dependencies:
67
52
  - - ">="
68
53
  - !ruby/object:Gem::Version
69
54
  version: 3.1.0
70
- - - "<"
71
- - !ruby/object:Gem::Version
72
- version: '5.0'
73
55
  - !ruby/object:Gem::Dependency
74
56
  name: spree_extension
75
57
  requirement: !ruby/object:Gem::Requirement
@@ -112,20 +94,6 @@ dependencies:
112
94
  - - "~>"
113
95
  - !ruby/object:Gem::Version
114
96
  version: '1.0'
115
- - !ruby/object:Gem::Dependency
116
- name: whenever
117
- requirement: !ruby/object:Gem::Requirement
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- version: '0'
122
- type: :runtime
123
- prerelease: false
124
- version_requirements: !ruby/object:Gem::Requirement
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- version: '0'
129
97
  - !ruby/object:Gem::Dependency
130
98
  name: appraisal
131
99
  requirement: !ruby/object:Gem::Requirement
@@ -370,21 +338,22 @@ dependencies:
370
338
  requirements:
371
339
  - - "~>"
372
340
  - !ruby/object:Gem::Version
373
- version: '2.3'
341
+ version: '3.12'
374
342
  type: :development
375
343
  prerelease: false
376
344
  version_requirements: !ruby/object:Gem::Requirement
377
345
  requirements:
378
346
  - - "~>"
379
347
  - !ruby/object:Gem::Version
380
- version: '2.3'
381
- description: Braintree v.zero extension for Spree Commerce
348
+ version: '3.12'
349
+ description: Official Braintree + PayPal for Spree Commerce
382
350
  email: we@sparksolutions.co
383
351
  executables: []
384
352
  extensions: []
385
353
  extra_rdoc_files: []
386
354
  files:
387
355
  - ".codeclimate.yml"
356
+ - ".github/dependabot.yml"
388
357
  - ".gitignore"
389
358
  - ".rspec"
390
359
  - ".travis.yml"
@@ -394,6 +363,7 @@ files:
394
363
  - LICENSE
395
364
  - README.md
396
365
  - Rakefile
366
+ - app/assets/images/backend-settle.svg
397
367
  - app/assets/images/credit_cards/icons/jcb.png
398
368
  - app/assets/javascripts/spree/backend/payments.js
399
369
  - app/assets/javascripts/spree/backend/spree_braintree_vzero.js
@@ -403,13 +373,14 @@ files:
403
373
  - app/controllers/spree/api/v1/braintree_client_token_controller.rb
404
374
  - app/controllers/spree/checkout_controller_decorator.rb
405
375
  - app/controllers/spree/orders_controller_decorator.rb
406
- - app/controllers/spree/user_sessions_controller_decorator.rb
407
376
  - app/helpers/spree/admin/decorated_navigation_helper.rb
408
377
  - app/helpers/spree/admin/payment_methods_helper.rb
409
378
  - app/helpers/spree/braintree_helper.rb
410
379
  - app/models/braintree/successful_result_decorator.rb
380
+ - app/models/concerns/spree/gateway/braintree_vzero/legacy_rails_patch.rb
411
381
  - app/models/spree/address_decorator.rb
412
382
  - app/models/spree/braintree_checkout.rb
383
+ - app/models/spree/braintree_vzero/order_decorator.rb
413
384
  - app/models/spree/gateway/braintree_vzero_base.rb
414
385
  - app/models/spree/gateway/braintree_vzero_base/address.rb
415
386
  - app/models/spree/gateway/braintree_vzero_base/braintree_user.rb
@@ -419,7 +390,7 @@ files:
419
390
  - app/models/spree/gateway/braintree_vzero_drop_in_ui.rb
420
391
  - app/models/spree/gateway/braintree_vzero_hosted_fields.rb
421
392
  - app/models/spree/gateway/braintree_vzero_paypal_express.rb
422
- - app/models/spree/order_decorator.rb
393
+ - app/models/spree/log_entry_decorator.rb
423
394
  - app/models/spree/payment_decorator.rb
424
395
  - app/models/spree/payment_processing_decorator.rb
425
396
  - app/models/spree/preferences/preferable_decorator.rb
@@ -451,6 +422,7 @@ files:
451
422
  - app/views/spree/checkout/payment/braintree_vzero/_dropin_on_ready_callback.js.erb
452
423
  - app/views/spree/checkout/payment/braintree_vzero/_hosted_fields_on_field_event_callback.js.erb
453
424
  - app/views/spree/checkout/payment/braintree_vzero/_hosted_fields_styles.js.erb
425
+ - app/views/spree/checkout/payment/braintree_vzero/_non_three_d_secure.html.erb
454
426
  - app/views/spree/checkout/payment/braintree_vzero/_payment.html.erb
455
427
  - app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb
456
428
  - app/views/spree/shared/braintree_vzero/_dropin.js.erb
@@ -469,14 +441,11 @@ files:
469
441
  - db/migrate/20151202095956_add_risk_id_and_risk_decision_to_spree_braintree_checkouts.rb
470
442
  - db/migrate/20151211100203_add_braintree_last_digits_and_braintree_card_type_to_spree_braintree_checkouts.rb
471
443
  - db/migrate/20160112153422_add_admin_payment_to_spree_braintree_checkout.rb
472
- - gemfiles/spree_3_5.gemfile
473
- - gemfiles/spree_3_5_spree_auth_devise.gemfile
474
444
  - gemfiles/spree_3_7.gemfile
475
- - gemfiles/spree_3_7_spree_auth_devise.gemfile
476
445
  - gemfiles/spree_4_0.gemfile
477
- - gemfiles/spree_4_0_spree_auth_devise.gemfile
446
+ - gemfiles/spree_4_1.gemfile
447
+ - gemfiles/spree_4_2.gemfile
478
448
  - gemfiles/spree_master.gemfile
479
- - gemfiles/spree_master_spree_auth_devise.gemfile
480
449
  - lib/generators/spree_braintree_vzero/install/install_generator.rb
481
450
  - lib/spree_braintree_vzero.rb
482
451
  - lib/spree_braintree_vzero/engine.rb
@@ -496,6 +465,7 @@ files:
496
465
  - spec/models/gateway/braintree_vzero_base_spec.rb
497
466
  - spec/models/gateway/braintree_vzero_dropin_ui_spec.rb
498
467
  - spec/models/gateway/braintree_vzero_hosted_fields_spec.rb
468
+ - spec/models/spree/address_spec.rb
499
469
  - spec/models/spree/order_spec.rb
500
470
  - spec/spec_helper.rb
501
471
  - spec/support/vcr.rb
@@ -519,6 +489,7 @@ files:
519
489
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/returns_suceess_with_valid_nonce.yml
520
490
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/saves_Braintree_Address_id_to_Spree_Address_when_address_is_being_saved.yml
521
491
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/saves_unique_Braintree_Addresses_ids.yml
492
+ - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/sends_address_data_when_address_is_new.yml
522
493
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/sends_empty_address_id_when_address_is_already_in_vault.yml
523
494
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/stores_Transaction.yml
524
495
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/with_3DSecure_option_turned_on/performs_3DSecure_check.yml
@@ -555,7 +526,7 @@ homepage: http://sparksolutions.co
555
526
  licenses:
556
527
  - BSD-3
557
528
  metadata: {}
558
- post_install_message:
529
+ post_install_message:
559
530
  rdoc_options: []
560
531
  require_paths:
561
532
  - lib
@@ -571,10 +542,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
571
542
  version: '0'
572
543
  requirements:
573
544
  - none
574
- rubygems_version: 3.0.2
575
- signing_key:
545
+ rubygems_version: 3.0.9
546
+ signing_key:
576
547
  specification_version: 4
577
- summary: Spree Braintree v.zero
548
+ summary: Official Braintree + PayPal for Spree Commerce
578
549
  test_files:
579
550
  - spec/controllers/spree/api/v1/braintree_client_token_controller_spec.rb
580
551
  - spec/controllers/spree/checkout_controller_spec.rb
@@ -588,6 +559,7 @@ test_files:
588
559
  - spec/models/gateway/braintree_vzero_base_spec.rb
589
560
  - spec/models/gateway/braintree_vzero_dropin_ui_spec.rb
590
561
  - spec/models/gateway/braintree_vzero_hosted_fields_spec.rb
562
+ - spec/models/spree/address_spec.rb
591
563
  - spec/models/spree/order_spec.rb
592
564
  - spec/spec_helper.rb
593
565
  - spec/support/vcr.rb
@@ -611,6 +583,7 @@ test_files:
611
583
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/returns_suceess_with_valid_nonce.yml
612
584
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/saves_Braintree_Address_id_to_Spree_Address_when_address_is_being_saved.yml
613
585
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/saves_unique_Braintree_Addresses_ids.yml
586
+ - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/sends_address_data_when_address_is_new.yml
614
587
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/sends_empty_address_id_when_address_is_already_in_vault.yml
615
588
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/stores_Transaction.yml
616
589
  - spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/with_3DSecure_option_turned_on/performs_3DSecure_check.yml
@@ -1,15 +0,0 @@
1
- module Spree
2
- module UserSessionsControllerDecorator
3
- def self.prepended(base)
4
- base.before_action :associate_user, only: :create
5
- end
6
-
7
- def current_order_params
8
- { currency: current_currency, guest_token: cookies.signed[:guest_token], store_id: current_store.id }
9
- end
10
- end
11
- end
12
-
13
- if defined?(::Spree::UserSessionsController)
14
- ::Spree::UserSessionsController.prepend(Spree::UserSessionsControllerDecorator)
15
- end