solidus_braintree 1.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +78 -0
  3. data/.gem_release.yml +5 -0
  4. data/.github/stale.yml +1 -0
  5. data/.github_changelog_generator +2 -0
  6. data/.gitignore +21 -10
  7. data/.rspec +1 -1
  8. data/.rubocop.yml +86 -0
  9. data/CHANGELOG.md +186 -18
  10. data/Gemfile +35 -17
  11. data/LICENSE +26 -0
  12. data/README.md +389 -24
  13. data/Rakefile +6 -16
  14. data/app/assets/config/solidus_braintree_manifest.js +0 -0
  15. data/app/assets/javascripts/spree/backend/solidus_braintree/client.js +239 -0
  16. data/app/assets/javascripts/spree/backend/solidus_braintree/constants.js +89 -0
  17. data/app/assets/javascripts/spree/backend/solidus_braintree/hosted_form.js +46 -0
  18. data/app/assets/javascripts/spree/backend/solidus_braintree/promise.js +20 -0
  19. data/app/assets/javascripts/spree/backend/solidus_braintree.js +96 -0
  20. data/app/assets/stylesheets/spree/backend/solidus_braintree.scss +28 -0
  21. data/app/decorators/controllers/solidus_braintree/admin_payments_controller_decorator.rb +11 -0
  22. data/app/decorators/controllers/solidus_braintree/client_tokens_controller.rb +41 -0
  23. data/app/decorators/models/solidus_braintree/spree/store_decorator.rb +20 -0
  24. data/app/decorators/models/solidus_braintree/spree/user_decorator.rb +13 -0
  25. data/app/helpers/solidus_braintree/braintree_admin_helper.rb +23 -0
  26. data/app/models/application_record.rb +5 -0
  27. data/app/models/solidus_braintree/address.rb +64 -0
  28. data/app/models/solidus_braintree/avs_result.rb +69 -0
  29. data/app/models/solidus_braintree/configuration.rb +39 -0
  30. data/app/models/solidus_braintree/customer.rb +8 -0
  31. data/app/models/solidus_braintree/gateway.rb +437 -0
  32. data/app/models/solidus_braintree/response.rb +80 -0
  33. data/app/models/solidus_braintree/source.rb +140 -0
  34. data/app/models/solidus_braintree/transaction.rb +31 -0
  35. data/app/models/solidus_braintree/transaction_address.rb +88 -0
  36. data/app/models/solidus_braintree/transaction_import.rb +98 -0
  37. data/app/views/spree/api/payments/source_views/_braintree.json.jbuilder +3 -0
  38. data/bin/console +4 -1
  39. data/bin/dummy-app +37 -0
  40. data/bin/rails +5 -5
  41. data/bin/rails-dummy-app +17 -0
  42. data/bin/rails-engine +13 -0
  43. data/bin/rails-sandbox +16 -0
  44. data/bin/rake +7 -0
  45. data/bin/rspec +11 -0
  46. data/bin/sandbox +61 -0
  47. data/bin/setup +5 -4
  48. data/config/locales/en.yml +94 -2
  49. data/config/locales/it.yml +56 -0
  50. data/config/routes.rb +12 -3
  51. data/db/migrate/20160830061749_create_solidus_paypal_braintree_sources.rb +16 -0
  52. data/db/migrate/20160906201711_create_solidus_paypal_braintree_customers.rb +13 -0
  53. data/db/migrate/20161114231422_create_solidus_paypal_braintree_configurations.rb +11 -0
  54. data/db/migrate/20161125172005_add_braintree_configuration_to_stores.rb +7 -0
  55. data/db/migrate/20170203191030_add_credit_card_to_braintree_configuration.rb +6 -0
  56. data/db/migrate/20170505193712_add_null_constraint_to_sources.rb +38 -0
  57. data/db/migrate/20170508085402_add_not_null_constraint_to_sources_payment_type.rb +14 -0
  58. data/db/migrate/20190705115327_add_paypal_button_preferences_to_braintree_configurations.rb +5 -0
  59. data/db/migrate/20190911141712_add_3d_secure_to_braintree_configuration.rb +5 -0
  60. data/db/migrate/20211222170950_add_paypal_funding_source_to_solidus_paypal_braintree_sources.rb +5 -0
  61. data/db/migrate/20220104150301_add_venmo_to_braintree_configuration.rb +5 -0
  62. data/db/migrate/20230109080950_rename_solidus_paypal_braintree_source_type.rb +31 -0
  63. data/db/migrate/20230210104310_add_device_data_to_braintree_sources.rb +5 -0
  64. data/lib/controllers/backend/solidus_braintree/configurations_controller.rb +48 -0
  65. data/lib/generators/solidus_braintree/install/install_generator.rb +155 -19
  66. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_280x48.svg +19 -0
  67. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_320x48.svg +19 -0
  68. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_375x48.svg +19 -0
  69. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_white_button_280x48.svg +19 -0
  70. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_white_button_320x48.svg +19 -0
  71. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_white_button_375x48.svg +19 -0
  72. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_acceptance_mark.svg +15 -0
  73. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_button_280x48.svg +19 -0
  74. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_button_320x48.svg +19 -0
  75. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_button_375x48.svg +19 -0
  76. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_blue_logo.svg +18 -0
  77. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_acceptance_mark.svg +20 -0
  78. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_button_280x48.svg +19 -0
  79. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_button_320x48.svg +19 -0
  80. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_button_375x48.svg +19 -0
  81. data/lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_white_logo.svg +18 -0
  82. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/paypal_button.js +34 -0
  83. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/ajax.js +13 -0
  84. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/apple_pay_button.js +179 -0
  85. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/checkout.js +113 -0
  86. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/client.js +239 -0
  87. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/constants.js +89 -0
  88. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/frontend.js +15 -0
  89. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/hosted_form.js +48 -0
  90. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_button.js +178 -0
  91. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/paypal_messaging.js +22 -0
  92. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js +20 -0
  93. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/venmo_button.js +86 -0
  94. data/lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree.js +1 -0
  95. data/lib/generators/solidus_braintree/install/templates/app/assets/stylesheets/spree/frontend/solidus_braintree.scss +62 -0
  96. data/lib/generators/solidus_braintree/install/templates/app/controllers/solidus_braintree/checkouts_controller.rb +31 -0
  97. data/lib/generators/solidus_braintree/install/templates/app/controllers/solidus_braintree/transactions_controller.rb +67 -0
  98. data/lib/generators/solidus_braintree/install/templates/app/helpers/solidus_braintree/braintree_checkout_helper.rb +60 -0
  99. data/lib/generators/solidus_braintree/install/templates/app/views/checkouts/existing_payment/_braintree.html.erb +2 -0
  100. data/lib/generators/solidus_braintree/install/templates/app/views/checkouts/payment/_braintree.html.erb +23 -0
  101. data/lib/generators/solidus_braintree/install/templates/app/views/payments/_braintree_payment_details.html.erb +9 -0
  102. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_apple_pay_button.html.erb +27 -0
  103. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_braintree_errors.html.erb +16 -0
  104. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_braintree_head_scripts.html.erb +26 -0
  105. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_braintree_hosted_fields.html.erb +40 -0
  106. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_paypal_cart_button.html.erb +38 -0
  107. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_paypal_checkout_button.html.erb +32 -0
  108. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_paypal_messaging.html.erb +13 -0
  109. data/lib/generators/solidus_braintree/install/templates/app/views/spree/shared/_venmo_button.html.erb +33 -0
  110. data/lib/generators/solidus_braintree/install/templates/config/initializers/solidus_braintree.rb +6 -0
  111. data/lib/solidus_braintree/country_mapper.rb +37 -0
  112. data/lib/solidus_braintree/engine.rb +61 -11
  113. data/lib/solidus_braintree/extension_configuration.rb +23 -0
  114. data/lib/solidus_braintree/request_protection.rb +21 -0
  115. data/lib/solidus_braintree/version.rb +3 -1
  116. data/lib/solidus_braintree.rb +14 -2
  117. data/lib/solidus_paypal_braintree.rb +6 -0
  118. data/lib/views/backend/solidus_braintree/configurations/list.html.erb +63 -0
  119. data/lib/views/backend/spree/admin/payments/source_forms/_braintree.html.erb +16 -0
  120. data/lib/views/backend/spree/admin/payments/source_views/_braintree.html.erb +39 -0
  121. data/lib/views/backend/spree/admin/shared/preference_fields/_preference_select.html.erb +13 -0
  122. data/lib/views/backend_v1.2/spree/admin/payments/source_forms/_braintree.html.erb +16 -0
  123. data/lib/views/backend_v2.4/spree/admin/shared/preference_fields/_hash.html.erb +12 -0
  124. data/solidus_braintree.gemspec +37 -38
  125. data/spec/controllers/solidus_braintree/checkouts_controller_spec.rb +99 -0
  126. data/spec/controllers/solidus_braintree/client_tokens_controller_spec.rb +55 -0
  127. data/spec/controllers/solidus_braintree/configurations_controller_spec.rb +73 -0
  128. data/spec/controllers/solidus_braintree/transactions_controller_spec.rb +183 -0
  129. data/spec/fixtures/cassettes/admin/invalid_credit_card.yml +63 -0
  130. data/spec/fixtures/cassettes/admin/resubmit_credit_card.yml +352 -0
  131. data/spec/fixtures/cassettes/admin/valid_credit_card.yml +412 -0
  132. data/spec/fixtures/cassettes/braintree/create_profile.yml +71 -0
  133. data/spec/fixtures/cassettes/braintree/generate_token.yml +63 -0
  134. data/spec/fixtures/cassettes/braintree/token.yml +63 -0
  135. data/spec/fixtures/cassettes/checkout/invalid_credit_card.yml +63 -0
  136. data/spec/fixtures/cassettes/checkout/resubmit_credit_card.yml +216 -0
  137. data/spec/fixtures/cassettes/checkout/update.yml +71 -0
  138. data/spec/fixtures/cassettes/checkout/valid_credit_card.yml +171 -0
  139. data/spec/fixtures/cassettes/checkout/valid_venmo_transaction.yml +599 -0
  140. data/spec/fixtures/cassettes/gateway/authorize/credit_card/address.yml +86 -0
  141. data/spec/fixtures/cassettes/gateway/authorize/merchant_account/EUR.yml +154 -0
  142. data/spec/fixtures/cassettes/gateway/authorize/paypal/EUR.yml +90 -0
  143. data/spec/fixtures/cassettes/gateway/authorize/paypal/address.yml +90 -0
  144. data/spec/fixtures/cassettes/gateway/authorize.yml +86 -0
  145. data/spec/fixtures/cassettes/gateway/authorized_transaction.yml +73 -0
  146. data/spec/fixtures/cassettes/gateway/cancel/missing.yml +63 -0
  147. data/spec/fixtures/cassettes/gateway/cancel/refunds.yml +272 -0
  148. data/spec/fixtures/cassettes/gateway/cancel/void.yml +201 -0
  149. data/spec/fixtures/cassettes/gateway/capture.yml +141 -0
  150. data/spec/fixtures/cassettes/gateway/complete.yml +157 -0
  151. data/spec/fixtures/cassettes/gateway/credit.yml +208 -0
  152. data/spec/fixtures/cassettes/gateway/customer.yml +79 -0
  153. data/spec/fixtures/cassettes/gateway/purchase.yml +87 -0
  154. data/spec/fixtures/cassettes/gateway/settled_transaction.yml +140 -0
  155. data/spec/fixtures/cassettes/gateway/void.yml +137 -0
  156. data/spec/fixtures/cassettes/source/bin.yml +295 -0
  157. data/spec/fixtures/cassettes/source/card_type.yml +267 -0
  158. data/spec/fixtures/cassettes/source/last4.yml +267 -0
  159. data/spec/fixtures/cassettes/transaction/import/valid/capture.yml +224 -0
  160. data/spec/fixtures/cassettes/transaction/import/valid.yml +71 -0
  161. data/spec/fixtures/views/carts/_cart_footer.html.erb +18 -0
  162. data/spec/helpers/solidus_braintree/braintree_admin_helper_spec.rb +17 -0
  163. data/spec/helpers/solidus_braintree/braintree_checkout_helper_spec.rb +70 -0
  164. data/spec/models/solidus_braintree/address_spec.rb +71 -0
  165. data/spec/models/solidus_braintree/avs_result_spec.rb +317 -0
  166. data/spec/models/solidus_braintree/gateway_spec.rb +774 -0
  167. data/spec/models/solidus_braintree/response_spec.rb +280 -0
  168. data/spec/models/solidus_braintree/source_spec.rb +555 -0
  169. data/spec/models/solidus_braintree/transaction_address_spec.rb +235 -0
  170. data/spec/models/solidus_braintree/transaction_import_spec.rb +302 -0
  171. data/spec/models/solidus_braintree/transaction_spec.rb +86 -0
  172. data/spec/models/spree/store_spec.rb +14 -0
  173. data/spec/requests/spree/api/orders_controller_spec.rb +36 -0
  174. data/spec/solidus_braintree_helper.rb +7 -0
  175. data/spec/support/solidus_braintree/capybara.rb +7 -0
  176. data/spec/support/solidus_braintree/factories.rb +55 -0
  177. data/spec/support/solidus_braintree/gateway_helpers.rb +29 -0
  178. data/spec/support/solidus_braintree/order_ready_for_payment.rb +44 -0
  179. data/spec/support/solidus_braintree/order_walkthrough.rb +87 -0
  180. data/spec/support/solidus_braintree/vcr.rb +42 -0
  181. data/spec/support/solidus_braintree/with_prepended_view_fixtures.rb +19 -0
  182. data/spec/system/backend/configuration_spec.rb +23 -0
  183. data/spec/system/backend/new_payment_spec.rb +136 -0
  184. data/spec/system/frontend/braintree_credit_card_checkout_spec.rb +199 -0
  185. data/spec/system/frontend/paypal_checkout_spec.rb +169 -0
  186. data/spec/system/frontend/venmo_checkout_spec.rb +193 -0
  187. metadata +289 -255
  188. data/.travis.yml +0 -41
  189. data/LICENSE.txt +0 -21
  190. data/app/controllers/spree/api/braintree_client_token_controller.rb +0 -13
  191. data/app/helpers/braintree_view_helpers.rb +0 -20
  192. data/app/models/concerns/solidus_braintree/add_name_validation_concern.rb +0 -8
  193. data/app/models/concerns/solidus_braintree/inject_device_data_concern.rb +0 -18
  194. data/app/models/concerns/solidus_braintree/payment_braintree_nonce_concern.rb +0 -8
  195. data/app/models/concerns/solidus_braintree/permitted_attributes_concern.rb +0 -11
  196. data/app/models/concerns/solidus_braintree/skip_require_card_numbers_concern.rb +0 -14
  197. data/app/models/concerns/solidus_braintree/use_data_field_concern.rb +0 -23
  198. data/app/models/credit_card_decorator.rb +0 -3
  199. data/app/models/payment_decorator.rb +0 -2
  200. data/app/models/permitted_attributes_decorator.rb +0 -1
  201. data/app/models/solidus/gateway/braintree_gateway.rb +0 -306
  202. data/app/overrides/spree/checkout/_confirm/braintree_security.html.erb.deface +0 -9
  203. data/app/views/spree/admin/payments/source_forms/_braintree.html.erb +0 -38
  204. data/app/views/spree/admin/payments/source_views/_braintree.html.erb +0 -30
  205. data/app/views/spree/checkout/payment/_braintree.html.erb +0 -55
  206. data/app/views/spree/checkout/payment/_braintree_initialization.html.erb +0 -12
  207. data/config/initializers/braintree.rb +0 -1
  208. data/db/migrate/20150910170527_add_data_to_credit_card.rb +0 -5
  209. data/db/migrate/20160426221931_add_braintree_device_data_to_order.rb +0 -5
  210. data/lib/assets/javascripts/spree/backend/braintree/solidus_braintree.js +0 -59
  211. data/lib/assets/javascripts/spree/frontend/braintree/solidus_braintree.js +0 -144
  212. data/lib/assets/javascripts/vendor/braintree.js +0 -8
  213. data/lib/assets/stylesheets/spree/frontend/solidus_braintree.scss +0 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6187e1c0eac731b74a33c03cec5b0a28036454e1491f21dc011b94904b9a59f
4
- data.tar.gz: 649dcd6d6e32db5499429fd7bdb6024ab87e7f50f413f091c84d331125364066
3
+ metadata.gz: 29c687c74a49c23dce595b8469774c1791b20ca32a634a5cb7cf732fc792c639
4
+ data.tar.gz: aa787422374836f1a6352599b57bb98aea63518ce13c612e53cbafc47ab2d811
5
5
  SHA512:
6
- metadata.gz: 7cfb547b455007903f95d4d9ce4353d862791eea8556204b6b20000d0aebac949206d74f33a1772d5c655fdf6dbc490c2848732cf530fff68c8920d9355e463a
7
- data.tar.gz: c75a9a69da5cbda3ac951b42f0aeadea6597bd1a6b81ed0bafc4a2cd457ac5dfb26ac2793b9040cf6ac64d1145ecefef7c4a8267c4bad14d259a50870473e856
6
+ metadata.gz: 94c9d30e3c88d47fcf4fab6c4a3c5edb0e72e8a670e6d0a8912864c0f71b68147745349cfa673c803aad93c0efd75e08f53cbb993dc7db6a91043822909fc9e5
7
+ data.tar.gz: 0f9e0362ab7ba67a6923e5998c171f5327446c40ba7e4f549762133616c7acbfb6beea71c16bfc0ef87f52da6c9d59a226e67565fb414c6c99cb3da18c4f1123
@@ -0,0 +1,78 @@
1
+ version: 2.1
2
+
3
+ orbs:
4
+ browser-tools: circleci/browser-tools@1.1
5
+
6
+ # Always take the latest version of the orb, this allows us to
7
+ # run specs against Solidus supported versions only without the need
8
+ # to change this configuration every time a Solidus version is released
9
+ # or goes EOL.
10
+ solidusio_extensions: solidusio/extensions@volatile
11
+
12
+ commands:
13
+ test-with-starter-frontend:
14
+ steps:
15
+ - checkout
16
+ - browser-tools/install-chrome
17
+ - run:
18
+ name: Install libvips
19
+ command: |
20
+ sudo apt-get update
21
+ sudo apt-get install -yq libvips-dev
22
+ - solidusio_extensions/test-branch:
23
+ branch: master
24
+ command: |
25
+ export FRONTEND=starter
26
+ sudo gem update --system
27
+ gem install bundler rails
28
+ bin/dummy-app
29
+ bin/rspec
30
+ - solidusio_extensions/store-test-results
31
+
32
+ jobs:
33
+ run-specs-with-postgres:
34
+ executor:
35
+ name: solidusio_extensions/postgres
36
+ ruby_version: '3.1'
37
+ steps:
38
+ - test-with-starter-frontend
39
+
40
+ run-specs-with-mysql:
41
+ executor:
42
+ name: solidusio_extensions/mysql
43
+ ruby_version: '3.0'
44
+ steps:
45
+ - test-with-starter-frontend
46
+
47
+ run-specs-with-sqlite:
48
+ executor:
49
+ name: solidusio_extensions/sqlite
50
+ ruby_version: '2.7'
51
+ steps:
52
+ - test-with-starter-frontend
53
+
54
+ lint-code:
55
+ executor: solidusio_extensions/sqlite-memory
56
+ steps:
57
+ - solidusio_extensions/lint-code
58
+
59
+ workflows:
60
+ "Run specs on supported Solidus versions":
61
+ jobs:
62
+ - run-specs-with-postgres
63
+ - run-specs-with-mysql
64
+ - run-specs-with-sqlite
65
+ - lint-code
66
+
67
+ "Weekly run specs against master":
68
+ triggers:
69
+ - schedule:
70
+ cron: "0 0 * * 4" # every Thursday
71
+ filters:
72
+ branches:
73
+ only:
74
+ - master
75
+ jobs:
76
+ - run-specs-with-postgres
77
+ - run-specs-with-mysql
78
+ - run-specs-with-sqlite
data/.gem_release.yml ADDED
@@ -0,0 +1,5 @@
1
+ bump:
2
+ recurse: false
3
+ file: 'lib/solidus_braintree/version.rb'
4
+ message: Bump SolidusBraintree to %{version}
5
+ tag: true
data/.github/stale.yml ADDED
@@ -0,0 +1 @@
1
+ _extends: .github
@@ -0,0 +1,2 @@
1
+ issues=false
2
+ exclude-labels=infrastructure
data/.gitignore CHANGED
@@ -1,10 +1,21 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /spec/dummy
1
+ *.gem
2
+ \#*
3
+ *~
4
+ .#*
5
+ .DS_Store
6
+ .idea
7
+ .project
8
+ .sass-cache
9
+ coverage
10
+ dummy-app
11
+ Gemfile.lock
12
+ tmp
13
+ nbproject
14
+ pkg
15
+ *.swp
16
+ spec/dummy
17
+ spec/examples.txt
18
+ /sandbox
19
+ .rvmrc
20
+ .ruby-version
21
+ .ruby-gemset
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --format documentation
2
1
  --color
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,86 @@
1
+ require:
2
+ - solidus_dev_support/rubocop
3
+
4
+ AllCops:
5
+ NewCops: disable
6
+ TargetRubyVersion: '2.7'
7
+ Exclude:
8
+ - sandbox/**/*
9
+ - dummy-app/**/*
10
+ - spec/dummy/**/*
11
+ - vendor/bundle/**/*
12
+
13
+ Layout/FirstArgumentIndentation:
14
+ EnforcedStyle: consistent
15
+
16
+ Layout/FirstArrayElementIndentation:
17
+ EnforcedStyle: consistent
18
+
19
+ Layout/FirstHashElementIndentation:
20
+ EnforcedStyle: consistent
21
+
22
+ Layout/MultilineMethodCallIndentation:
23
+ EnforcedStyle: indented
24
+
25
+ Naming/VariableNumber:
26
+ Enabled: false
27
+
28
+ # We use this extensively, the alternatives are not viable or desirable.
29
+ RSpec/AnyInstance:
30
+ Enabled: false
31
+
32
+ # No need to make the code more complex for no real gain.
33
+ RSpec/MessageSpies:
34
+ Enabled: false
35
+
36
+ # Let's consider legitimate to have multiple expectations within an example.
37
+ RSpec/MultipleExpectations:
38
+ Enabled: false
39
+
40
+ # Allow to use subject as is, no big deal.
41
+ RSpec/NamedSubject:
42
+ Enabled: false
43
+
44
+ # Let's set this to some really exagerate value.
45
+ RSpec/NestedGroups:
46
+ Max: 8
47
+
48
+ # We don't use the FactoryBot mixin
49
+ RSpec/FactoryBot/SyntaxMethods:
50
+ Enabled: false
51
+
52
+ RSpec/VerifiedDoubles:
53
+ # Sometimes you really need an "anything" double
54
+ IgnoreSymbolicNames: true
55
+
56
+ Style/FrozenStringLiteralComment:
57
+ Exclude:
58
+ - spec/**/*
59
+ - db/migrate/**/*
60
+ - bin/**/*
61
+
62
+ Style/ExplicitBlockArgument:
63
+ Exclude:
64
+ - lib/solidus_braintree/request_protection.rb
65
+
66
+ Rails/SkipsModelValidations:
67
+ Exclude:
68
+ - db/migrate/**/*
69
+
70
+ Rails/ReflectionClassName:
71
+ Exclude:
72
+ - app/models/solidus_braintree/customer.rb
73
+ - app/models/solidus_braintree/source.rb
74
+
75
+ RSpec/MultipleMemoizedHelpers:
76
+ Exclude:
77
+ - spec/models/solidus_braintree/transaction_import_spec.rb
78
+ - spec/models/solidus_braintree/response_spec.rb
79
+ - spec/models/solidus_braintree/gateway_spec.rb
80
+ - spec/controllers/solidus_braintree/client_tokens_controller_spec.rb
81
+ - spec/system/frontend/braintree_credit_card_checkout_spec.rb
82
+ - spec/system/frontend/paypal_checkout_spec.rb
83
+
84
+ Rails/ApplicationRecord:
85
+ Exclude:
86
+ - db/migrate/*
data/CHANGELOG.md CHANGED
@@ -1,31 +1,199 @@
1
- ## HEAD
1
+ # Changelog
2
2
 
3
- * Upgrade braintree to 2.23.0 for bug fixes and fraud detection with deviceData.
3
+ ## [v3.0.0](https://github.com/solidusio/solidus_braintree/tree/v3.0.0) (2023-03-29)
4
4
 
5
- ## 0.2.0
5
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v2.0.0...v3.0.0)
6
6
 
7
- * Add functionality around PayPal by adding a json or text field on credit card for storing extra data coming back from Braintree.
8
- * Upgrade braintree to 2.14.0 for hosted field and teardown support.
7
+ **Implemented enhancements:**
9
8
 
10
- ## 0.1.5
9
+ - Release SolidusBraintree 2.0.0 [\#130](https://github.com/solidusio/solidus_braintree/issues/130)
11
10
 
12
- * Use mapping to set cc_type conventionally.
11
+ **Merged pull requests:**
13
12
 
14
- ## 0.1.3
13
+ - Fix: last version supporting SolidusFrontend should be 2.x [\#137](https://github.com/solidusio/solidus_braintree/pull/137) ([gsmendoza](https://github.com/gsmendoza))
14
+ - Fix: user should still be able to disable data collection in a SolidusBraintree hosted form [\#129](https://github.com/solidusio/solidus_braintree/pull/129) ([gsmendoza](https://github.com/gsmendoza))
15
+ - Improve SolidusBraintree README [\#125](https://github.com/solidusio/solidus_braintree/pull/125) ([gsmendoza](https://github.com/gsmendoza))
16
+ - Fix: deprecated version in warning should be 1.x instead of 0.x [\#118](https://github.com/solidusio/solidus_braintree/pull/118) ([gsmendoza](https://github.com/gsmendoza))
17
+ - Migrate database by default [\#117](https://github.com/solidusio/solidus_braintree/pull/117) ([gsmendoza](https://github.com/gsmendoza))
18
+ - Add device data collection [\#116](https://github.com/solidusio/solidus_braintree/pull/116) ([gsmendoza](https://github.com/gsmendoza))
19
+ - Update Solidus dependency to \>= 3.4.0.dev and \< 4 [\#114](https://github.com/solidusio/solidus_braintree/pull/114) ([gsmendoza](https://github.com/gsmendoza))
20
+ - Update SolidusBraintree InstallGenerator to install frontend code [\#112](https://github.com/solidusio/solidus_braintree/pull/112) ([gsmendoza](https://github.com/gsmendoza))
21
+ - Deep stringify the keys of the result params [\#111](https://github.com/solidusio/solidus_braintree/pull/111) ([gsmendoza](https://github.com/gsmendoza))
22
+ - Add Response to log entry permitted classes [\#109](https://github.com/solidusio/solidus_braintree/pull/109) ([gsmendoza](https://github.com/gsmendoza))
23
+ - Make Solidus Braintree compatible with Starter Frontend [\#102](https://github.com/solidusio/solidus_braintree/pull/102) ([gsmendoza](https://github.com/gsmendoza))
24
+ - Make migrations independent of existing models [\#100](https://github.com/solidusio/solidus_braintree/pull/100) ([elia](https://github.com/elia))
25
+ - Update the SolidusPaypalBraintree namespace to SolidusBraintree [\#99](https://github.com/solidusio/solidus_braintree/pull/99) ([gsmendoza](https://github.com/gsmendoza))
26
+ - Merge the history of Solidus PayPal Braintree into this repository [\#98](https://github.com/solidusio/solidus_braintree/pull/98) ([gsmendoza](https://github.com/gsmendoza))
27
+ - Add stale bot [\#89](https://github.com/solidusio/solidus_braintree/pull/89) ([gsmendoza](https://github.com/gsmendoza))
28
+ - Update to use forked solidus\_frontend when needed [\#88](https://github.com/solidusio/solidus_braintree/pull/88) ([waiting-for-dev](https://github.com/waiting-for-dev))
29
+ - Add deprecation notice to README [\#87](https://github.com/solidusio/solidus_braintree/pull/87) ([seand7565](https://github.com/seand7565))
30
+ - Adopt CircleCI instead of Travis [\#85](https://github.com/solidusio/solidus_braintree/pull/85) ([aldesantis](https://github.com/aldesantis))
31
+ - Suggest setting a value for environment preference [\#82](https://github.com/solidusio/solidus_braintree/pull/82) ([mdesantis](https://github.com/mdesantis))
32
+ - Test suite improvements [\#80](https://github.com/solidusio/solidus_braintree/pull/80) ([aitbw](https://github.com/aitbw))
33
+ - Extension maintenance [\#78](https://github.com/solidusio/solidus_braintree/pull/78) ([aitbw](https://github.com/aitbw))
34
+ - Fix references to Spree.t [\#77](https://github.com/solidusio/solidus_braintree/pull/77) ([skukx](https://github.com/skukx))
35
+ - Remove 2.2 from CI \(EOL\) [\#71](https://github.com/solidusio/solidus_braintree/pull/71) ([jacobherrington](https://github.com/jacobherrington))
36
+ - Fix Travis issue with Solidus old versions \(Factory Bot gem\) [\#70](https://github.com/solidusio/solidus_braintree/pull/70) ([spaghetticode](https://github.com/spaghetticode))
37
+ - Remove versions past EOL from .travis.yml [\#69](https://github.com/solidusio/solidus_braintree/pull/69) ([jacobherrington](https://github.com/jacobherrington))
38
+ - Add Solidus 2.7 to .travis.yml [\#68](https://github.com/solidusio/solidus_braintree/pull/68) ([jacobherrington](https://github.com/jacobherrington))
15
39
 
16
- * Add back in name validation on `CreditCard`.
40
+ ## [v2.0.0](https://github.com/solidusio/solidus_braintree/tree/v2.0.0) (2023-03-17)
17
41
 
18
- ## 0.1.2
42
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v1.2.0...v2.0.0)
19
43
 
20
- * Upgrade braintree to 2.13.0-beta for the abiltiy to destroy/teardown.
21
- * Fix bug related to using existing credit cards in admin.
44
+ **Implemented enhancements:**
22
45
 
23
- ## 0.1.1
46
+ - Backport SolidusBraintree README changes to v2.x [\#131](https://github.com/solidusio/solidus_braintree/issues/131)
47
+ - Release SolidusBraintree 1.3 [\#127](https://github.com/solidusio/solidus_braintree/issues/127)
48
+ - Add overview to SolidusBraintree README [\#123](https://github.com/solidusio/solidus_braintree/issues/123)
49
+ - Add device data collection [\#115](https://github.com/solidusio/solidus_braintree/issues/115)
50
+ - Set Solidus dependency of SolidusBraintree to `> 3.4.0.dev, < 4` [\#113](https://github.com/solidusio/solidus_braintree/issues/113)
51
+ - Port device data collection from 1.x to 2.x [\#107](https://github.com/solidusio/solidus_braintree/issues/107)
52
+ - Support PayPal through frontend [\#26](https://github.com/solidusio/solidus_braintree/issues/26)
24
53
 
25
- * Get the client token and attach the dropin on page load to support the create
26
- order flow in admin, also fixes clicking the new credit card radio quickly and
27
- it attaching multiple dropins.
54
+ **Fixed bugs:**
28
55
 
29
- ## 0.1.0
56
+ - Fix: user should still be able to disable data collection in a SolidusBraintree hosted form [\#126](https://github.com/solidusio/solidus_braintree/issues/126)
57
+ - Fix Spree::LogEntry::DisallowedClass error for failed responses [\#110](https://github.com/solidusio/solidus_braintree/issues/110)
58
+ - Fix Spree::LogEntry::DisallowedClass error [\#108](https://github.com/solidusio/solidus_braintree/issues/108)
30
59
 
31
- * First release.
60
+ **Closed issues:**
61
+
62
+ - Fix: last version supporting SolidusFrontend should be 2.x instead of 1.x [\#136](https://github.com/solidusio/solidus_braintree/issues/136)
63
+ - Test SolidusBraintree SSF update with Venmo Pay [\#106](https://github.com/solidusio/solidus_braintree/issues/106)
64
+ - Update SolidusBraintree InstallGenerator to install frontend code [\#104](https://github.com/solidusio/solidus_braintree/issues/104)
65
+ - Release SolidusBraintree 1.3.0 [\#97](https://github.com/solidusio/solidus_braintree/issues/97)
66
+ - Update the SolidusPaypalBraintree namespace to SolidusBraintree [\#96](https://github.com/solidusio/solidus_braintree/issues/96)
67
+ - Merge the history of Solidus PayPal Braintree into this repository [\#92](https://github.com/solidusio/solidus_braintree/issues/92)
68
+ - Make Solidus Braintree compatible with Starter Frontend [\#91](https://github.com/solidusio/solidus_braintree/issues/91)
69
+ - Merge with `solidus_paypal_braintree` [\#90](https://github.com/solidusio/solidus_braintree/issues/90)
70
+ - Fix Deprecation warnings for use of Spree.t [\#76](https://github.com/solidusio/solidus_braintree/issues/76)
71
+ - New VCR specs with paypal fail [\#75](https://github.com/solidusio/solidus_braintree/issues/75)
72
+ - Drop-in Ui [\#73](https://github.com/solidusio/solidus_braintree/issues/73)
73
+ - Configure Solidus Braintree with Paypal Braintree SDK Token [\#67](https://github.com/solidusio/solidus_braintree/issues/67)
74
+ - Authenticate the payment client token endpoint [\#66](https://github.com/solidusio/solidus_braintree/issues/66)
75
+ - Is 3D Secure supported? [\#64](https://github.com/solidusio/solidus_braintree/issues/64)
76
+ - Deface Override requires solidus\_frontend [\#57](https://github.com/solidusio/solidus_braintree/issues/57)
77
+ - Allow to optionally create token with `customer_id` option [\#56](https://github.com/solidusio/solidus_braintree/issues/56)
78
+ - Guest checkout tries to create a customer profile [\#37](https://github.com/solidusio/solidus_braintree/issues/37)
79
+ - Use of undefined show\_flash function in frontend [\#31](https://github.com/solidusio/solidus_braintree/issues/31)
80
+ - Select an implementation for how to store non credit card data in Solidus [\#3](https://github.com/solidusio/solidus_braintree/issues/3)
81
+
82
+ ## [v1.2.0](https://github.com/solidusio/solidus_braintree/tree/v1.2.0) (2018-05-25)
83
+
84
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v1.1.0...v1.2.0)
85
+
86
+ **Closed issues:**
87
+
88
+ - Undefined local variable or method `solidus\_paypal\_braintree' [\#62](https://github.com/solidusio/solidus_braintree/issues/62)
89
+ - Solidus 1.3 Admin UI changes breaking New Card form [\#48](https://github.com/solidusio/solidus_braintree/issues/48)
90
+
91
+ **Merged pull requests:**
92
+
93
+ - Specify Rails versions in Gemfile [\#63](https://github.com/solidusio/solidus_braintree/pull/63) ([jhawthorn](https://github.com/jhawthorn))
94
+ - Re-record failing VCR cassettes [\#61](https://github.com/solidusio/solidus_braintree/pull/61) ([jhawthorn](https://github.com/jhawthorn))
95
+ - Revert "Ignore AVS response code in Paypal transactions." [\#60](https://github.com/solidusio/solidus_braintree/pull/60) ([jhawthorn](https://github.com/jhawthorn))
96
+ - Fixes link to Braintree v.zero docs [\#59](https://github.com/solidusio/solidus_braintree/pull/59) ([tvdeyen](https://github.com/tvdeyen))
97
+ - Download PhantomJS from github mirror [\#58](https://github.com/solidusio/solidus_braintree/pull/58) ([jhawthorn](https://github.com/jhawthorn))
98
+ - Add --ssl-protocol=any to phantomjs\_options [\#55](https://github.com/solidusio/solidus_braintree/pull/55) ([jhawthorn](https://github.com/jhawthorn))
99
+ - Fix spec failures due to missing address last\_name [\#54](https://github.com/solidusio/solidus_braintree/pull/54) ([jhawthorn](https://github.com/jhawthorn))
100
+ - Ignore AVS response code in Paypal transactions. [\#36](https://github.com/solidusio/solidus_braintree/pull/36) ([hectoregm](https://github.com/hectoregm))
101
+
102
+ ## [v1.1.0](https://github.com/solidusio/solidus_braintree/tree/v1.1.0) (2016-09-22)
103
+
104
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v1.0.0...v1.1.0)
105
+
106
+ **Merged pull requests:**
107
+
108
+ - Add support for Solidus 2.0 and Rails 5.0 [\#51](https://github.com/solidusio/solidus_braintree/pull/51) ([jhawthorn](https://github.com/jhawthorn))
109
+ - Spec to test new card [\#50](https://github.com/solidusio/solidus_braintree/pull/50) ([Murph33](https://github.com/Murph33))
110
+ - Add config to disable ship address verification [\#47](https://github.com/solidusio/solidus_braintree/pull/47) ([gmacdougall](https://github.com/gmacdougall))
111
+ - Add support for cancel [\#45](https://github.com/solidusio/solidus_braintree/pull/45) ([gmacdougall](https://github.com/gmacdougall))
112
+
113
+ ## [v1.0.0](https://github.com/solidusio/solidus_braintree/tree/v1.0.0) (2016-06-24)
114
+
115
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.2.1...v1.0.0)
116
+
117
+ **Closed issues:**
118
+
119
+ - Use Braintree Hosted Fields in frontend checkout [\#27](https://github.com/solidusio/solidus_braintree/issues/27)
120
+ - Not using v.zero SDK [\#14](https://github.com/solidusio/solidus_braintree/issues/14)
121
+
122
+ **Merged pull requests:**
123
+
124
+ - Change solidus dependency to components [\#44](https://github.com/solidusio/solidus_braintree/pull/44) ([gmacdougall](https://github.com/gmacdougall))
125
+ - Add placeholder text for each of the credit card inputs. [\#40](https://github.com/solidusio/solidus_braintree/pull/40) ([hectoregm](https://github.com/hectoregm))
126
+ - Get client token from braintree only in the payment page. [\#39](https://github.com/solidusio/solidus_braintree/pull/39) ([hectoregm](https://github.com/hectoregm))
127
+ - Fix tests [\#38](https://github.com/solidusio/solidus_braintree/pull/38) ([jhawthorn](https://github.com/jhawthorn))
128
+ - Ensure device\_data is added to the gateway\_options hash. [\#35](https://github.com/solidusio/solidus_braintree/pull/35) ([hectoregm](https://github.com/hectoregm))
129
+ - Paypal improvements [\#34](https://github.com/solidusio/solidus_braintree/pull/34) ([hectoregm](https://github.com/hectoregm))
130
+ - Fraud hosted fields [\#32](https://github.com/solidusio/solidus_braintree/pull/32) ([hectoregm](https://github.com/hectoregm))
131
+ - Add paypal button [\#30](https://github.com/solidusio/solidus_braintree/pull/30) ([jhawthorn](https://github.com/jhawthorn))
132
+ - Use braintree's Hosted Fields [\#29](https://github.com/solidusio/solidus_braintree/pull/29) ([jhawthorn](https://github.com/jhawthorn))
133
+ - Add feature spec for frontend checkout [\#25](https://github.com/solidusio/solidus_braintree/pull/25) ([jhawthorn](https://github.com/jhawthorn))
134
+ - Update braintree-web to 2.23.0 [\#24](https://github.com/solidusio/solidus_braintree/pull/24) ([hectoregm](https://github.com/hectoregm))
135
+ - Void payment in checkout state without authorization code [\#23](https://github.com/solidusio/solidus_braintree/pull/23) ([ericsaupe](https://github.com/ericsaupe))
136
+ - Hosted Forms Frontend [\#22](https://github.com/solidusio/solidus_braintree/pull/22) ([ericsaupe](https://github.com/ericsaupe))
137
+ - Cleanup dependencies [\#20](https://github.com/solidusio/solidus_braintree/pull/20) ([jhawthorn](https://github.com/jhawthorn))
138
+ - Remove out.json [\#19](https://github.com/solidusio/solidus_braintree/pull/19) ([jhawthorn](https://github.com/jhawthorn))
139
+ - Rebase \#9 [\#18](https://github.com/solidusio/solidus_braintree/pull/18) ([jhawthorn](https://github.com/jhawthorn))
140
+ - Rebase \#11 [\#17](https://github.com/solidusio/solidus_braintree/pull/17) ([jhawthorn](https://github.com/jhawthorn))
141
+ - MySQL support [\#16](https://github.com/solidusio/solidus_braintree/pull/16) ([jhawthorn](https://github.com/jhawthorn))
142
+ - Update travis.yml [\#15](https://github.com/solidusio/solidus_braintree/pull/15) ([jhawthorn](https://github.com/jhawthorn))
143
+
144
+ ## [v0.2.1](https://github.com/solidusio/solidus_braintree/tree/v0.2.1) (2015-11-03)
145
+
146
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.2.0...v0.2.1)
147
+
148
+ **Merged pull requests:**
149
+
150
+ - supply first and last name in shipping address [\#8](https://github.com/solidusio/solidus_braintree/pull/8) ([gvaughn](https://github.com/gvaughn))
151
+
152
+ ## [v0.2.0](https://github.com/solidusio/solidus_braintree/tree/v0.2.0) (2015-09-17)
153
+
154
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.1.5...v0.2.0)
155
+
156
+ **Merged pull requests:**
157
+
158
+ - Update braintree-web to 2.14.0 [\#7](https://github.com/solidusio/solidus_braintree/pull/7) ([kamui](https://github.com/kamui))
159
+ - Make Spree::CreditCard more flexible for handling paypal payments by … [\#6](https://github.com/solidusio/solidus_braintree/pull/6) ([allisonlarson](https://github.com/allisonlarson))
160
+
161
+ ## [v0.1.5](https://github.com/solidusio/solidus_braintree/tree/v0.1.5) (2015-09-08)
162
+
163
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.1.4...v0.1.5)
164
+
165
+ ## [v0.1.4](https://github.com/solidusio/solidus_braintree/tree/v0.1.4) (2015-09-08)
166
+
167
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.1.3...v0.1.4)
168
+
169
+ **Merged pull requests:**
170
+
171
+ - Use CARD\_TYPE\_MAPPING for setting cc\_type [\#5](https://github.com/solidusio/solidus_braintree/pull/5) ([allisonlarson](https://github.com/allisonlarson))
172
+
173
+ ## [v0.1.3](https://github.com/solidusio/solidus_braintree/tree/v0.1.3) (2015-09-04)
174
+
175
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.1.2...v0.1.3)
176
+
177
+ **Merged pull requests:**
178
+
179
+ - Add name presence validation on create [\#4](https://github.com/solidusio/solidus_braintree/pull/4) ([kamui](https://github.com/kamui))
180
+
181
+ ## [v0.1.2](https://github.com/solidusio/solidus_braintree/tree/v0.1.2) (2015-09-04)
182
+
183
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.1.1...v0.1.2)
184
+
185
+ ## [v0.1.1](https://github.com/solidusio/solidus_braintree/tree/v0.1.1) (2015-09-02)
186
+
187
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/v0.1.0...v0.1.1)
188
+
189
+ ## [v0.1.0](https://github.com/solidusio/solidus_braintree/tree/v0.1.0) (2015-09-02)
190
+
191
+ [Full Changelog](https://github.com/solidusio/solidus_braintree/compare/411a93001c017d41fd545e0dc9d4edef3422759e...v0.1.0)
192
+
193
+ **Merged pull requests:**
194
+
195
+ - Provide an option for always sending the bill address [\#2](https://github.com/solidusio/solidus_braintree/pull/2) ([jordan-brough](https://github.com/jordan-brough))
196
+
197
+
198
+
199
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -1,24 +1,42 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
2
5
 
3
6
  branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
4
- gem "solidus", github: "solidusio/solidus", branch: branch
5
-
6
- if branch == 'master' || branch >= "v2.3"
7
- gem "rails", "~> 5.1.0"
8
- gem "rails-controller-testing", group: :test
9
- elsif branch >= "v2.0"
10
- gem "rails", "~> 5.0.0"
11
- gem "rails-controller-testing", group: :test
12
- else
13
- gem "rails", "~> 4.2.0"
14
- gem "rails_test_params_backport", group: :test
15
- end
7
+ gem 'solidus', github: 'solidusio/solidus', branch: branch
8
+
9
+ # The solidus_frontend gem has been pulled out since v3.2
10
+ gem 'solidus_frontend', github: 'solidusio/solidus_frontend' if branch == 'master'
11
+ gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedGem
16
12
 
17
- gem 'pg', '~> 0.21'
18
- gem 'mysql2', '~> 0.4.10'
13
+ # Needed to help Bundler figure out how to resolve dependencies,
14
+ # otherwise it takes forever to resolve them.
15
+ # See https://github.com/bundler/bundler/issues/6677
16
+ gem 'rails', '>0.a'
19
17
 
20
- group :development, :test do
21
- gem "pry-rails"
18
+ # Provides basic authentication functionality for testing parts of your engine
19
+ gem 'solidus_auth_devise'
20
+
21
+ case ENV.fetch('DB', nil)
22
+ when 'mysql'
23
+ gem 'mysql2'
24
+ when 'postgresql'
25
+ gem 'pg'
26
+ else
27
+ gem 'sqlite3'
22
28
  end
23
29
 
30
+ # While we still support Ruby < 3 we need to workaround a limitation in
31
+ # the 'async' gem that relies on the latest ruby, since RubyGems doesn't
32
+ # resolve gems based on the required ruby version.
33
+ gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
34
+
24
35
  gemspec
36
+
37
+ # Use a local Gemfile to include development dependencies that might not be
38
+ # relevant for the project or for other contributors, e.g. pry-byebug.
39
+ #
40
+ # We use `send` instead of calling `eval_gemfile` to work around an issue with
41
+ # how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658.
42
+ send(:eval_gemfile, 'Gemfile-local') if File.exist? 'Gemfile-local'
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2016-2020 Stembolt and other contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Solidus nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.