solidus_braintree 2.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +42 -9
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +8 -1
  5. data/CHANGELOG.md +1 -189
  6. data/OLD_CHANGELOG.md +199 -0
  7. data/Rakefile +7 -1
  8. data/app/assets/config/solidus_braintree_manifest.js +0 -1
  9. data/app/assets/javascripts/spree/backend/solidus_braintree.js +4 -4
  10. data/app/models/solidus_braintree/gateway.rb +5 -1
  11. data/app/models/solidus_braintree/response.rb +1 -1
  12. data/app/models/solidus_braintree/source.rb +5 -0
  13. data/app/models/solidus_braintree/transaction.rb +1 -1
  14. data/app/models/solidus_braintree/transaction_import.rb +1 -0
  15. data/bin/dummy-app +37 -0
  16. data/bin/rails-dummy-app +17 -0
  17. data/bin/rspec +11 -0
  18. data/bin/sandbox +20 -62
  19. data/db/migrate/20230210104310_add_device_data_to_braintree_sources.rb +5 -0
  20. data/lib/generators/solidus_braintree/install/install_generator.rb +134 -34
  21. data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/javascripts/spree/frontend/paypal_button.js +1 -1
  22. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/ajax.js +13 -0
  23. data/{app/assets/javascripts → lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend}/solidus_braintree/apple_pay_button.js +2 -2
  24. data/{app/assets/javascripts → lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend}/solidus_braintree/checkout.js +10 -5
  25. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/client.js +239 -0
  26. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/constants.js +89 -0
  27. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/frontend.js +15 -0
  28. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/hosted_form.js +48 -0
  29. data/{app/assets/javascripts → lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend}/solidus_braintree/paypal_button.js +4 -3
  30. data/{app/assets/javascripts → lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend}/solidus_braintree/paypal_messaging.js +1 -1
  31. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js +20 -0
  32. data/{app/assets/javascripts → lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend}/solidus_braintree/venmo_button.js +1 -1
  33. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree.js +1 -0
  34. data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/stylesheets/spree/frontend/solidus_braintree.scss +11 -0
  35. data/lib/{controllers/frontend → generators/solidus_braintree/install/templates/app/controllers}/solidus_braintree/checkouts_controller.rb +1 -1
  36. data/lib/{controllers/frontend → generators/solidus_braintree/install/templates/app/controllers}/solidus_braintree/transactions_controller.rb +5 -4
  37. data/lib/generators/solidus_braintree/install/templates/app/views/checkouts/existing_payment/_braintree.html.erb +2 -0
  38. data/lib/{views/frontend/spree/checkout → generators/solidus_braintree/install/templates/app/views/checkouts}/payment/_braintree.html.erb +1 -1
  39. data/lib/{views/frontend/solidus_braintree/payments/_payment.html.erb → generators/solidus_braintree/install/templates/app/views/payments/_braintree_payment_details.html.erb} +0 -3
  40. data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_apple_pay_button.html.erb +1 -1
  41. data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_braintree_head_scripts.html.erb +1 -1
  42. data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_braintree_hosted_fields.html.erb +1 -4
  43. data/lib/{views/frontend → generators/solidus_braintree/install/templates/app/views}/spree/shared/_paypal_checkout_button.html.erb +1 -0
  44. data/lib/solidus_braintree/engine.rb +15 -10
  45. data/lib/solidus_braintree/version.rb +1 -1
  46. data/solidus_braintree.gemspec +4 -8
  47. data/spec/controllers/solidus_braintree/checkouts_controller_spec.rb +2 -2
  48. data/spec/controllers/solidus_braintree/client_tokens_controller_spec.rb +2 -2
  49. data/spec/controllers/solidus_braintree/configurations_controller_spec.rb +2 -2
  50. data/spec/controllers/solidus_braintree/transactions_controller_spec.rb +3 -3
  51. data/spec/fixtures/views/carts/_cart_footer.html.erb +18 -0
  52. data/spec/helpers/solidus_braintree/braintree_admin_helper_spec.rb +1 -1
  53. data/spec/helpers/solidus_braintree/braintree_checkout_helper_spec.rb +1 -1
  54. data/spec/models/solidus_braintree/address_spec.rb +1 -1
  55. data/spec/models/solidus_braintree/avs_result_spec.rb +1 -1
  56. data/spec/models/solidus_braintree/gateway_spec.rb +35 -3
  57. data/spec/models/solidus_braintree/response_spec.rb +1 -1
  58. data/spec/models/solidus_braintree/source_spec.rb +17 -1
  59. data/spec/models/solidus_braintree/transaction_address_spec.rb +2 -2
  60. data/spec/models/solidus_braintree/transaction_import_spec.rb +2 -2
  61. data/spec/models/solidus_braintree/transaction_spec.rb +2 -2
  62. data/spec/models/spree/store_spec.rb +2 -2
  63. data/spec/requests/spree/api/orders_controller_spec.rb +2 -2
  64. data/spec/solidus_braintree_helper.rb +7 -0
  65. data/{lib/solidus_braintree/testing_support → spec/support/solidus_braintree}/factories.rb +17 -15
  66. data/spec/support/{order_ready_for_payment.rb → solidus_braintree/order_ready_for_payment.rb} +9 -2
  67. data/spec/support/solidus_braintree/order_walkthrough.rb +87 -0
  68. data/spec/support/solidus_braintree/with_prepended_view_fixtures.rb +19 -0
  69. data/spec/{features → system}/backend/configuration_spec.rb +2 -2
  70. data/spec/{features → system}/backend/new_payment_spec.rb +3 -4
  71. data/spec/{features → system}/frontend/braintree_credit_card_checkout_spec.rb +23 -15
  72. data/spec/{features → system}/frontend/paypal_checkout_spec.rb +6 -3
  73. data/spec/{features → system}/frontend/venmo_checkout_spec.rb +8 -9
  74. metadata +95 -114
  75. data/app/assets/javascripts/solidus_braintree/frontend.js +0 -14
  76. data/app/assets/javascripts/spree/frontend/solidus_braintree.js +0 -1
  77. data/app/decorators/controllers/solidus_braintree/checkout_controller_decorator.rb +0 -11
  78. data/app/decorators/controllers/solidus_braintree/orders_controller_decorator.rb +0 -11
  79. data/app/overrides/spree/payments/payment/add_paypal_funding_source_to_payment.rb +0 -9
  80. data/app/views/spree/checkout/existing_payment/_braintree.html.erb +0 -10
  81. data/spec/fixtures/views/spree/orders/edit.html.erb +0 -50
  82. data/spec/spec_helper.rb +0 -32
  83. data/spec/support/views.rb +0 -1
  84. /data/app/assets/javascripts/{solidus_braintree → spree/backend/solidus_braintree}/client.js +0 -0
  85. /data/app/assets/javascripts/{solidus_braintree → spree/backend/solidus_braintree}/constants.js +0 -0
  86. /data/app/assets/javascripts/{solidus_braintree → spree/backend/solidus_braintree}/hosted_form.js +0 -0
  87. /data/app/assets/javascripts/{solidus_braintree → spree/backend/solidus_braintree}/promise.js +0 -0
  88. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_active_blue_button_280x48.svg +0 -0
  89. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_active_blue_button_320x48.svg +0 -0
  90. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_active_blue_button_375x48.svg +0 -0
  91. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_active_white_button_280x48.svg +0 -0
  92. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_active_white_button_320x48.svg +0 -0
  93. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_active_white_button_375x48.svg +0 -0
  94. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_blue_acceptance_mark.svg +0 -0
  95. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_blue_button_280x48.svg +0 -0
  96. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_blue_button_320x48.svg +0 -0
  97. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_blue_button_375x48.svg +0 -0
  98. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_blue_logo.svg +0 -0
  99. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_white_acceptance_mark.svg +0 -0
  100. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_white_button_280x48.svg +0 -0
  101. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_white_button_320x48.svg +0 -0
  102. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_white_button_375x48.svg +0 -0
  103. /data/{app → lib/generators/solidus_braintree/install/templates/app}/assets/images/solidus_braintree/venmo/venmo_white_logo.svg +0 -0
  104. /data/{app → lib/generators/solidus_braintree/install/templates/app}/helpers/solidus_braintree/braintree_checkout_helper.rb +0 -0
  105. /data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_braintree_errors.html.erb +0 -0
  106. /data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_paypal_cart_button.html.erb +0 -0
  107. /data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_paypal_messaging.html.erb +0 -0
  108. /data/{app → lib/generators/solidus_braintree/install/templates/app}/views/spree/shared/_venmo_button.html.erb +0 -0
  109. /data/lib/generators/solidus_braintree/install/templates/{initializer.rb → config/initializers/solidus_braintree.rb} +0 -0
  110. /data/spec/support/{capybara.rb → solidus_braintree/capybara.rb} +0 -0
  111. /data/spec/support/{gateway_helpers.rb → solidus_braintree/gateway_helpers.rb} +0 -0
  112. /data/spec/support/{vcr.rb → solidus_braintree/vcr.rb} +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stembolt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-17 00:00:00.000000000 Z
11
+ date: 2023-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -44,40 +44,40 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 2.4.0
47
+ version: 3.4.0.dev
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: '4'
50
+ version: '5'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: 2.4.0
57
+ version: 3.4.0.dev
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '4'
60
+ version: '5'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: solidus_core
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 2.4.0
67
+ version: 3.4.0.dev
68
68
  - - "<"
69
69
  - !ruby/object:Gem::Version
70
- version: '4'
70
+ version: '5'
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: 2.4.0
77
+ version: 3.4.0.dev
78
78
  - - "<"
79
79
  - !ruby/object:Gem::Version
80
- version: '4'
80
+ version: '5'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: solidus_support
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -126,34 +126,6 @@ dependencies:
126
126
  - - "~>"
127
127
  - !ruby/object:Gem::Version
128
128
  version: '2.5'
129
- - !ruby/object:Gem::Dependency
130
- name: vcr
131
- requirement: !ruby/object:Gem::Requirement
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- version: '0'
136
- type: :development
137
- prerelease: false
138
- version_requirements: !ruby/object:Gem::Requirement
139
- requirements:
140
- - - ">="
141
- - !ruby/object:Gem::Version
142
- version: '0'
143
- - !ruby/object:Gem::Dependency
144
- name: webmock
145
- requirement: !ruby/object:Gem::Requirement
146
- requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- version: '0'
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- requirements:
154
- - - ">="
155
- - !ruby/object:Gem::Version
156
- version: '0'
157
129
  description: Uses the javascript API for seamless braintree payments
158
130
  email: braintree+gemfile@stembolt.com
159
131
  executables: []
@@ -170,48 +142,21 @@ files:
170
142
  - CHANGELOG.md
171
143
  - Gemfile
172
144
  - LICENSE
145
+ - OLD_CHANGELOG.md
173
146
  - README.md
174
147
  - Rakefile
175
148
  - app/assets/config/solidus_braintree_manifest.js
176
- - app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_280x48.svg
177
- - app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_320x48.svg
178
- - app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_375x48.svg
179
- - app/assets/images/solidus_braintree/venmo/venmo_active_white_button_280x48.svg
180
- - app/assets/images/solidus_braintree/venmo/venmo_active_white_button_320x48.svg
181
- - app/assets/images/solidus_braintree/venmo/venmo_active_white_button_375x48.svg
182
- - app/assets/images/solidus_braintree/venmo/venmo_blue_acceptance_mark.svg
183
- - app/assets/images/solidus_braintree/venmo/venmo_blue_button_280x48.svg
184
- - app/assets/images/solidus_braintree/venmo/venmo_blue_button_320x48.svg
185
- - app/assets/images/solidus_braintree/venmo/venmo_blue_button_375x48.svg
186
- - app/assets/images/solidus_braintree/venmo/venmo_blue_logo.svg
187
- - app/assets/images/solidus_braintree/venmo/venmo_white_acceptance_mark.svg
188
- - app/assets/images/solidus_braintree/venmo/venmo_white_button_280x48.svg
189
- - app/assets/images/solidus_braintree/venmo/venmo_white_button_320x48.svg
190
- - app/assets/images/solidus_braintree/venmo/venmo_white_button_375x48.svg
191
- - app/assets/images/solidus_braintree/venmo/venmo_white_logo.svg
192
- - app/assets/javascripts/solidus_braintree/apple_pay_button.js
193
- - app/assets/javascripts/solidus_braintree/checkout.js
194
- - app/assets/javascripts/solidus_braintree/client.js
195
- - app/assets/javascripts/solidus_braintree/constants.js
196
- - app/assets/javascripts/solidus_braintree/frontend.js
197
- - app/assets/javascripts/solidus_braintree/hosted_form.js
198
- - app/assets/javascripts/solidus_braintree/paypal_button.js
199
- - app/assets/javascripts/solidus_braintree/paypal_messaging.js
200
- - app/assets/javascripts/solidus_braintree/promise.js
201
- - app/assets/javascripts/solidus_braintree/venmo_button.js
202
149
  - app/assets/javascripts/spree/backend/solidus_braintree.js
203
- - app/assets/javascripts/spree/frontend/paypal_button.js
204
- - app/assets/javascripts/spree/frontend/solidus_braintree.js
150
+ - app/assets/javascripts/spree/backend/solidus_braintree/client.js
151
+ - app/assets/javascripts/spree/backend/solidus_braintree/constants.js
152
+ - app/assets/javascripts/spree/backend/solidus_braintree/hosted_form.js
153
+ - app/assets/javascripts/spree/backend/solidus_braintree/promise.js
205
154
  - app/assets/stylesheets/spree/backend/solidus_braintree.scss
206
- - app/assets/stylesheets/spree/frontend/solidus_braintree.scss
207
155
  - app/decorators/controllers/solidus_braintree/admin_payments_controller_decorator.rb
208
- - app/decorators/controllers/solidus_braintree/checkout_controller_decorator.rb
209
156
  - app/decorators/controllers/solidus_braintree/client_tokens_controller.rb
210
- - app/decorators/controllers/solidus_braintree/orders_controller_decorator.rb
211
157
  - app/decorators/models/solidus_braintree/spree/store_decorator.rb
212
158
  - app/decorators/models/solidus_braintree/spree/user_decorator.rb
213
159
  - app/helpers/solidus_braintree/braintree_admin_helper.rb
214
- - app/helpers/solidus_braintree/braintree_checkout_helper.rb
215
160
  - app/models/application_record.rb
216
161
  - app/models/solidus_braintree/address.rb
217
162
  - app/models/solidus_braintree/avs_result.rb
@@ -223,21 +168,15 @@ files:
223
168
  - app/models/solidus_braintree/transaction.rb
224
169
  - app/models/solidus_braintree/transaction_address.rb
225
170
  - app/models/solidus_braintree/transaction_import.rb
226
- - app/overrides/spree/payments/payment/add_paypal_funding_source_to_payment.rb
227
171
  - app/views/spree/api/payments/source_views/_braintree.json.jbuilder
228
- - app/views/spree/checkout/existing_payment/_braintree.html.erb
229
- - app/views/spree/shared/_apple_pay_button.html.erb
230
- - app/views/spree/shared/_braintree_errors.html.erb
231
- - app/views/spree/shared/_braintree_head_scripts.html.erb
232
- - app/views/spree/shared/_braintree_hosted_fields.html.erb
233
- - app/views/spree/shared/_paypal_cart_button.html.erb
234
- - app/views/spree/shared/_paypal_messaging.html.erb
235
- - app/views/spree/shared/_venmo_button.html.erb
236
172
  - bin/console
173
+ - bin/dummy-app
237
174
  - bin/rails
175
+ - bin/rails-dummy-app
238
176
  - bin/rails-engine
239
177
  - bin/rails-sandbox
240
178
  - bin/rake
179
+ - bin/rspec
241
180
  - bin/sandbox
242
181
  - bin/setup
243
182
  - config/locales/en.yml
@@ -255,17 +194,59 @@ files:
255
194
  - db/migrate/20211222170950_add_paypal_funding_source_to_solidus_paypal_braintree_sources.rb
256
195
  - db/migrate/20220104150301_add_venmo_to_braintree_configuration.rb
257
196
  - db/migrate/20230109080950_rename_solidus_paypal_braintree_source_type.rb
197
+ - db/migrate/20230210104310_add_device_data_to_braintree_sources.rb
258
198
  - lib/controllers/backend/solidus_braintree/configurations_controller.rb
259
- - lib/controllers/frontend/solidus_braintree/checkouts_controller.rb
260
- - lib/controllers/frontend/solidus_braintree/transactions_controller.rb
261
199
  - lib/generators/solidus_braintree/install/install_generator.rb
262
- - lib/generators/solidus_braintree/install/templates/initializer.rb
200
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_280x48.svg
201
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_320x48.svg
202
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_375x48.svg
203
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_white_button_280x48.svg
204
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_white_button_320x48.svg
205
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_white_button_375x48.svg
206
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_acceptance_mark.svg
207
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_button_280x48.svg
208
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_button_320x48.svg
209
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_button_375x48.svg
210
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_logo.svg
211
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_acceptance_mark.svg
212
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_button_280x48.svg
213
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_button_320x48.svg
214
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_button_375x48.svg
215
+ - lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_logo.svg
216
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/paypal_button.js
217
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree.js
218
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/ajax.js
219
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/apple_pay_button.js
220
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/checkout.js
221
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/client.js
222
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/constants.js
223
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/frontend.js
224
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/hosted_form.js
225
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_button.js
226
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js
227
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js
228
+ - lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/venmo_button.js
229
+ - lib/generators/solidus_braintree/install/templates/app/assets/stylesheets/spree/frontend/solidus_braintree.scss
230
+ - lib/generators/solidus_braintree/install/templates/app/controllers/solidus_braintree/checkouts_controller.rb
231
+ - lib/generators/solidus_braintree/install/templates/app/controllers/solidus_braintree/transactions_controller.rb
232
+ - lib/generators/solidus_braintree/install/templates/app/helpers/solidus_braintree/braintree_checkout_helper.rb
233
+ - lib/generators/solidus_braintree/install/templates/app/views/checkouts/existing_payment/_braintree.html.erb
234
+ - lib/generators/solidus_braintree/install/templates/app/views/checkouts/payment/_braintree.html.erb
235
+ - lib/generators/solidus_braintree/install/templates/app/views/payments/_braintree_payment_details.html.erb
236
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_apple_pay_button.html.erb
237
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_braintree_errors.html.erb
238
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_braintree_head_scripts.html.erb
239
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_braintree_hosted_fields.html.erb
240
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_paypal_cart_button.html.erb
241
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_paypal_checkout_button.html.erb
242
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_paypal_messaging.html.erb
243
+ - lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_venmo_button.html.erb
244
+ - lib/generators/solidus_braintree/install/templates/config/initializers/solidus_braintree.rb
263
245
  - lib/solidus_braintree.rb
264
246
  - lib/solidus_braintree/country_mapper.rb
265
247
  - lib/solidus_braintree/engine.rb
266
248
  - lib/solidus_braintree/extension_configuration.rb
267
249
  - lib/solidus_braintree/request_protection.rb
268
- - lib/solidus_braintree/testing_support/factories.rb
269
250
  - lib/solidus_braintree/version.rb
270
251
  - lib/solidus_paypal_braintree.rb
271
252
  - lib/views/backend/solidus_braintree/configurations/list.html.erb
@@ -274,19 +255,11 @@ files:
274
255
  - lib/views/backend/spree/admin/shared/preference_fields/_preference_select.html.erb
275
256
  - lib/views/backend_v1.2/spree/admin/payments/source_forms/_braintree.html.erb
276
257
  - lib/views/backend_v2.4/spree/admin/shared/preference_fields/_hash.html.erb
277
- - lib/views/frontend/solidus_braintree/payments/_payment.html.erb
278
- - lib/views/frontend/spree/checkout/payment/_braintree.html.erb
279
- - lib/views/frontend/spree/shared/_paypal_checkout_button.html.erb
280
258
  - solidus_braintree.gemspec
281
259
  - spec/controllers/solidus_braintree/checkouts_controller_spec.rb
282
260
  - spec/controllers/solidus_braintree/client_tokens_controller_spec.rb
283
261
  - spec/controllers/solidus_braintree/configurations_controller_spec.rb
284
262
  - spec/controllers/solidus_braintree/transactions_controller_spec.rb
285
- - spec/features/backend/configuration_spec.rb
286
- - spec/features/backend/new_payment_spec.rb
287
- - spec/features/frontend/braintree_credit_card_checkout_spec.rb
288
- - spec/features/frontend/paypal_checkout_spec.rb
289
- - spec/features/frontend/venmo_checkout_spec.rb
290
263
  - spec/fixtures/cassettes/admin/invalid_credit_card.yml
291
264
  - spec/fixtures/cassettes/admin/resubmit_credit_card.yml
292
265
  - spec/fixtures/cassettes/admin/valid_credit_card.yml
@@ -319,7 +292,7 @@ files:
319
292
  - spec/fixtures/cassettes/source/last4.yml
320
293
  - spec/fixtures/cassettes/transaction/import/valid.yml
321
294
  - spec/fixtures/cassettes/transaction/import/valid/capture.yml
322
- - spec/fixtures/views/spree/orders/edit.html.erb
295
+ - spec/fixtures/views/carts/_cart_footer.html.erb
323
296
  - spec/helpers/solidus_braintree/braintree_admin_helper_spec.rb
324
297
  - spec/helpers/solidus_braintree/braintree_checkout_helper_spec.rb
325
298
  - spec/models/solidus_braintree/address_spec.rb
@@ -332,21 +305,27 @@ files:
332
305
  - spec/models/solidus_braintree/transaction_spec.rb
333
306
  - spec/models/spree/store_spec.rb
334
307
  - spec/requests/spree/api/orders_controller_spec.rb
335
- - spec/spec_helper.rb
336
- - spec/support/capybara.rb
337
- - spec/support/gateway_helpers.rb
338
- - spec/support/order_ready_for_payment.rb
339
- - spec/support/vcr.rb
340
- - spec/support/views.rb
308
+ - spec/solidus_braintree_helper.rb
309
+ - spec/support/solidus_braintree/capybara.rb
310
+ - spec/support/solidus_braintree/factories.rb
311
+ - spec/support/solidus_braintree/gateway_helpers.rb
312
+ - spec/support/solidus_braintree/order_ready_for_payment.rb
313
+ - spec/support/solidus_braintree/order_walkthrough.rb
314
+ - spec/support/solidus_braintree/vcr.rb
315
+ - spec/support/solidus_braintree/with_prepended_view_fixtures.rb
316
+ - spec/system/backend/configuration_spec.rb
317
+ - spec/system/backend/new_payment_spec.rb
318
+ - spec/system/frontend/braintree_credit_card_checkout_spec.rb
319
+ - spec/system/frontend/paypal_checkout_spec.rb
320
+ - spec/system/frontend/venmo_checkout_spec.rb
341
321
  homepage: https://github.com/solidusio/solidus_braintree
342
322
  licenses:
343
323
  - BSD-3-Clause
344
324
  metadata:
345
325
  homepage_uri: https://github.com/solidusio/solidus_braintree
346
326
  source_code_uri: https://github.com/solidusio/solidus_braintree
347
- changelog_uri: https://github.com/solidusio/solidus_braintree/blob/master/CHANGELOG.md
348
- post_install_message: If you're upgrading to v2.0.0, please see the README for upgrade
349
- instructions.
327
+ changelog_uri: https://github.com/solidusio/solidus_braintree/releases
328
+ post_install_message:
350
329
  rdoc_options: []
351
330
  require_paths:
352
331
  - lib
@@ -354,7 +333,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
354
333
  requirements:
355
334
  - - ">="
356
335
  - !ruby/object:Gem::Version
357
- version: '2.5'
336
+ version: '3.0'
358
337
  - - "<"
359
338
  - !ruby/object:Gem::Version
360
339
  version: '4'
@@ -373,11 +352,6 @@ test_files:
373
352
  - spec/controllers/solidus_braintree/client_tokens_controller_spec.rb
374
353
  - spec/controllers/solidus_braintree/configurations_controller_spec.rb
375
354
  - spec/controllers/solidus_braintree/transactions_controller_spec.rb
376
- - spec/features/backend/configuration_spec.rb
377
- - spec/features/backend/new_payment_spec.rb
378
- - spec/features/frontend/braintree_credit_card_checkout_spec.rb
379
- - spec/features/frontend/paypal_checkout_spec.rb
380
- - spec/features/frontend/venmo_checkout_spec.rb
381
355
  - spec/fixtures/cassettes/admin/invalid_credit_card.yml
382
356
  - spec/fixtures/cassettes/admin/resubmit_credit_card.yml
383
357
  - spec/fixtures/cassettes/admin/valid_credit_card.yml
@@ -410,7 +384,7 @@ test_files:
410
384
  - spec/fixtures/cassettes/source/last4.yml
411
385
  - spec/fixtures/cassettes/transaction/import/valid.yml
412
386
  - spec/fixtures/cassettes/transaction/import/valid/capture.yml
413
- - spec/fixtures/views/spree/orders/edit.html.erb
387
+ - spec/fixtures/views/carts/_cart_footer.html.erb
414
388
  - spec/helpers/solidus_braintree/braintree_admin_helper_spec.rb
415
389
  - spec/helpers/solidus_braintree/braintree_checkout_helper_spec.rb
416
390
  - spec/models/solidus_braintree/address_spec.rb
@@ -423,9 +397,16 @@ test_files:
423
397
  - spec/models/solidus_braintree/transaction_spec.rb
424
398
  - spec/models/spree/store_spec.rb
425
399
  - spec/requests/spree/api/orders_controller_spec.rb
426
- - spec/spec_helper.rb
427
- - spec/support/capybara.rb
428
- - spec/support/gateway_helpers.rb
429
- - spec/support/order_ready_for_payment.rb
430
- - spec/support/vcr.rb
431
- - spec/support/views.rb
400
+ - spec/solidus_braintree_helper.rb
401
+ - spec/support/solidus_braintree/capybara.rb
402
+ - spec/support/solidus_braintree/factories.rb
403
+ - spec/support/solidus_braintree/gateway_helpers.rb
404
+ - spec/support/solidus_braintree/order_ready_for_payment.rb
405
+ - spec/support/solidus_braintree/order_walkthrough.rb
406
+ - spec/support/solidus_braintree/vcr.rb
407
+ - spec/support/solidus_braintree/with_prepended_view_fixtures.rb
408
+ - spec/system/backend/configuration_spec.rb
409
+ - spec/system/backend/new_payment_spec.rb
410
+ - spec/system/frontend/braintree_credit_card_checkout_spec.rb
411
+ - spec/system/frontend/paypal_checkout_spec.rb
412
+ - spec/system/frontend/venmo_checkout_spec.rb
@@ -1,14 +0,0 @@
1
- // This is a manifest file that'll be compiled into including all the files listed below.
2
- // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
- // be included in the compiled file accessible from http://example.com/assets/application.js
4
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
- // the compiled file.
6
- //
7
- //= require solidus_braintree/constants
8
- //= require solidus_braintree/promise
9
- //= require solidus_braintree/client
10
- //= require solidus_braintree/hosted_form
11
- //= require solidus_braintree/paypal_button
12
- //= require solidus_braintree/paypal_messaging
13
- //= require solidus_braintree/apple_pay_button
14
- //= require solidus_braintree/venmo_button
@@ -1 +0,0 @@
1
- //= require solidus_braintree/frontend
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusBraintree
4
- module CheckoutControllerDecorator
5
- def self.prepended(base)
6
- base.helper ::SolidusBraintree::BraintreeCheckoutHelper
7
- end
8
-
9
- ::Spree::CheckoutController.prepend(self) if SolidusSupport.frontend_available?
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusBraintree
4
- module OrdersControllerDecorator
5
- def self.prepended(base)
6
- base.helper ::SolidusBraintree::BraintreeCheckoutHelper
7
- end
8
-
9
- ::Spree::OrdersController.prepend(self) if SolidusSupport.frontend_available?
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Deface::Override.new(
4
- name: "payments/payment/add_paypal_funding_source_to_payment",
5
- virtual_path: "spree/payments/_payment",
6
- original: "0b5b5ae53626059cb3a202ef95d10827dd399925",
7
- insert_after: "erb[loud]:contains('content_tag(:span, payment.payment_method.name)')",
8
- partial: "solidus_braintree/payments/payment"
9
- )
@@ -1,10 +0,0 @@
1
- <tr id="<%= dom_id(wallet_payment_source, 'spree')%>" class="<%= cycle('even', 'odd') %>">
2
- <td>
3
- <%= radio_button_tag "order[wallet_payment_source_id]",
4
- wallet_payment_source.id,
5
- default,
6
- class: "existing-cc-radio" %>
7
- </td>
8
- <td><%= wallet_payment_source.payment_source.friendly_payment_type %></td>
9
- <td><%= wallet_payment_source.payment_source.display_number %></td>
10
- </tr>
@@ -1,50 +0,0 @@
1
- <!-- Modified cart view with PayPal button, from solidus_braintree -->
2
-
3
- <% @body_id = 'cart' %>
4
- <div data-hook="cart_container">
5
- <h1><%= t('spree.shopping_cart') %></h1>
6
-
7
- <% if @order.line_items.empty? %>
8
-
9
- <div data-hook="empty_cart">
10
- <p><%= t('spree.your_cart_is_empty') %></p>
11
- <p><%= link_to t('spree.continue_shopping'), products_path, class: 'button continue' %></p>
12
- </div>
13
-
14
- <% else %>
15
-
16
- <div data-hook="outside_cart_form">
17
- <%= form_for @order, url: update_cart_path, html: {id: 'update-cart'} do |order_form| %>
18
- <div data-hook="inside_cart_form">
19
-
20
- <div data-hook="cart_items">
21
- <%= render 'form', order_form: order_form %>
22
- </div>
23
-
24
- <div class="links columns sixteen alpha omega" data-hook="cart_buttons">
25
- <%= order_form.text_field :coupon_code, size: 10, placeholder: t('spree.coupon_code') %>
26
- <%= button_tag class: 'primary', id: 'update-button' do %>
27
- <%= t('spree.update') %>
28
- <% end %>
29
- <%= button_tag class: 'button checkout primary', id: 'checkout-link', name: 'checkout' do %>
30
- <%= t('spree.checkout') %>
31
- <% end %>
32
- </div>
33
-
34
- </div>
35
- <% end %>
36
- </div>
37
-
38
- <div id="empty-cart" data-hook>
39
- <%= form_tag empty_cart_path, method: :put do %>
40
- <p id="clear_cart_link" data-hook>
41
- <%= submit_tag t('spree.empty_cart'), class: 'button gray' %>
42
- <%= t('spree.or') %>
43
- <%= link_to t('spree.continue_shopping'), products_path, class: 'continue button gray' %>
44
- </p>
45
- <% end %>
46
- </div>
47
-
48
- <%= render "spree/shared/paypal_cart_button" %>
49
- <% end %>
50
- </div>
data/spec/spec_helper.rb DELETED
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Configure Rails Environment
4
- ENV['RAILS_ENV'] = 'test'
5
-
6
- # Run Coverage report
7
- require 'solidus_dev_support/rspec/coverage'
8
- require 'rails-controller-testing'
9
-
10
- # Create the dummy app if it's still missing.
11
- dummy_env = "#{__dir__}/dummy/config/environment.rb"
12
- system 'bin/rake extension:test_app' unless File.exist? dummy_env
13
- require dummy_env
14
-
15
- # Requires factories and other useful helpers defined in spree_core.
16
- require 'solidus_dev_support/rspec/feature_helper'
17
-
18
- # Requires supporting ruby files with custom matchers and macros, etc,
19
- # in spec/support/ and its subdirectories.
20
- Dir["#{__dir__}/support/**/*.rb"].sort.each { |f| require f }
21
-
22
- # Requires factories defined in lib/solidus_braintree/testing_support/factories.rb
23
- SolidusDevSupport::TestingSupport::Factories.load_for(SolidusBraintree::Engine)
24
-
25
- RSpec.configure do |config|
26
- config.infer_spec_type_from_file_location!
27
- config.use_transactional_fixtures = false
28
-
29
- if Spree.solidus_gem_version < Gem::Version.new('2.11')
30
- config.extend Spree::TestingSupport::AuthorizationHelpers::Request, type: :system
31
- end
32
- end
@@ -1 +0,0 @@
1
- ApplicationController.prepend_view_path "spec/fixtures/views"
File without changes