spree_frontend 4.7.0 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +37 -42
  3. data/.gem_release.yml +1 -1
  4. data/.github/CONTRIBUTING.md +1 -1
  5. data/.github/dependabot.yml +9 -30
  6. data/.rubocop.yml +10 -183
  7. data/.ruby-version +1 -0
  8. data/Gemfile +4 -4
  9. data/LICENSE +1 -1
  10. data/README.md +31 -38
  11. data/SECURITY.md +1 -1
  12. data/app/assets/config/spree_frontend_manifest.js +2 -1
  13. data/app/assets/images/favicon.ico +0 -0
  14. data/app/assets/images/logo/spree_50.png +0 -0
  15. data/app/assets/images/noimage/large.png +0 -0
  16. data/app/assets/images/noimage/mini.png +0 -0
  17. data/app/assets/images/noimage/product.png +0 -0
  18. data/app/assets/images/noimage/small.png +0 -0
  19. data/app/assets/javascripts/spree/frontend/{account.js → account.es6} +2 -5
  20. data/app/assets/javascripts/spree/frontend/{api_tokens.js → api_tokens.es6} +2 -5
  21. data/app/assets/javascripts/spree/frontend/cart.js +1 -1
  22. data/app/assets/javascripts/spree/frontend/checkout/address.js +1 -1
  23. data/app/assets/javascripts/spree/frontend/checkout/address_book.js +1 -1
  24. data/app/assets/javascripts/spree/frontend/checkout/payment.js +1 -1
  25. data/app/assets/javascripts/spree/frontend/checkout/shipment.js +1 -1
  26. data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
  27. data/app/assets/javascripts/spree/frontend/login.js +1 -1
  28. data/app/assets/javascripts/spree/frontend/main_nav_bar.js +1 -1
  29. data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +1 -1
  30. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +9 -2
  31. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
  32. data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +1 -1
  33. data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +1 -1
  34. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/single.js +1 -1
  35. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/swipes.js +1 -1
  36. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +1 -1
  37. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel.js +1 -1
  38. data/app/assets/javascripts/spree/frontend/views/spree/shared/delete_address_popup.js +1 -1
  39. data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +1 -1
  40. data/app/assets/javascripts/spree/frontend/views/spree/shared/quantity_select.js +1 -1
  41. data/app/assets/javascripts/spree/lazysizes.config.js +1 -1
  42. data/app/assets/stylesheets/spree/frontend/components-custom/headers.scss +0 -2
  43. data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +4 -146
  44. data/app/assets/stylesheets/spree/frontend/fonts.scss +0 -136
  45. data/app/assets/stylesheets/spree/frontend/variables/variables.scss +21 -7
  46. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +0 -3
  47. data/app/assets/stylesheets/spree/frontend/views/spree/layouts/spree_application.scss +1 -1
  48. data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +0 -20
  49. data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +2 -2
  50. data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +0 -20
  51. data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +0 -14
  52. data/app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss +0 -25
  53. data/app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss +0 -16
  54. data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +1 -8
  55. data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +1 -14
  56. data/app/assets/stylesheets/spree/frontend/views/spree/shared/no_product_available.scss +1 -1
  57. data/app/assets/stylesheets/spree/frontend/views/spree/shared/order_details.scss +0 -1
  58. data/app/assets/stylesheets/spree/frontend/views/spree/taxons/show.scss +1 -1
  59. data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -28
  60. data/app/helpers/spree/addresses_helper.rb +6 -10
  61. data/app/helpers/spree/frontend_helper.rb +1 -1
  62. data/app/helpers/spree/navigation_helper.rb +1 -1
  63. data/app/helpers/spree/products_filters_helper.rb +3 -3
  64. data/app/javascript/spree/frontend/application.js +2 -0
  65. data/app/views/spree/addresses/_form.html.erb +4 -5
  66. data/app/views/spree/addresses/edit.html.erb +1 -1
  67. data/app/views/spree/addresses/new.html.erb +1 -1
  68. data/app/views/spree/checkout/_address.html.erb +1 -1
  69. data/app/views/spree/checkout/_delivery.html.erb +1 -1
  70. data/app/views/spree/checkout/_summary.html.erb +1 -1
  71. data/app/views/spree/checkout/edit.html.erb +1 -1
  72. data/app/views/spree/checkout/payment/_gateway.html.erb +4 -4
  73. data/app/views/spree/checkout/payment/_storecredit.html.erb +1 -1
  74. data/app/views/spree/checkout/registration.html.erb +1 -1
  75. data/app/views/spree/layouts/spree_application.html.erb +4 -1
  76. data/app/views/spree/orders/_line_item_data.html.erb +1 -1
  77. data/app/views/spree/orders/show.html.erb +1 -1
  78. data/app/views/spree/products/_cart_form.html.erb +2 -2
  79. data/app/views/spree/products/_color_option_type.html.erb +1 -1
  80. data/app/views/spree/products/_description.html.erb +1 -1
  81. data/app/views/spree/products/_filters_desktop.html.erb +1 -1
  82. data/app/views/spree/products/_filters_mobile.html.erb +3 -3
  83. data/app/views/spree/products/_option_type.html.erb +1 -1
  84. data/app/views/spree/products/_promotions.html.erb +1 -1
  85. data/app/views/spree/products/_properties.html.erb +1 -1
  86. data/app/views/spree/products/_sort_desktop.html.erb +9 -24
  87. data/app/views/spree/products/index.html.erb +1 -1
  88. data/app/views/spree/products/related.html.erb +1 -1
  89. data/app/views/spree/shared/_checkout_header.html.erb +1 -1
  90. data/app/views/spree/shared/_currency_dropdown.html.erb +1 -1
  91. data/app/views/spree/shared/_delete_address_popup.html.erb +2 -2
  92. data/app/views/spree/shared/_footer.html.erb +3 -3
  93. data/app/views/spree/shared/_head.html.erb +2 -1
  94. data/app/views/spree/shared/_internationalization_options.html.erb +3 -3
  95. data/app/views/spree/shared/_line_item.html.erb +1 -1
  96. data/app/views/spree/shared/_locale_dropdown.html.erb +1 -1
  97. data/app/views/spree/shared/_login.html.erb +2 -2
  98. data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
  99. data/app/views/spree/shared/_mobile_internationalization_options.html.erb +1 -1
  100. data/app/views/spree/shared/_mobile_navigation.html.erb +1 -1
  101. data/app/views/spree/shared/_nav_bar.html.erb +5 -5
  102. data/app/views/spree/shared/_no_product_available.html.erb +1 -1
  103. data/app/views/spree/shared/_order_details.html.erb +3 -3
  104. data/app/views/spree/shared/_product_added_modal.html.erb +2 -2
  105. data/app/views/spree/shared/_user_form.html.erb +3 -3
  106. data/app/views/spree/taxons/_header.html.erb +1 -1
  107. data/app/views/spree/taxons/_subcategories.html.erb +1 -1
  108. data/app/views/spree/taxons/product_carousel.html.erb +1 -1
  109. data/app/views/spree/users/edit.html.erb +1 -1
  110. data/app/views/spree/users/show.html.erb +1 -1
  111. data/config/importmap.rb +2 -0
  112. data/config/locales/en.yml +37 -0
  113. data/lib/generators/spree/frontend/install/install_generator.rb +0 -2
  114. data/lib/spree/frontend/configuration.rb +1 -1
  115. data/lib/spree/frontend/engine.rb +9 -5
  116. data/lib/spree/frontend/version.rb +3 -3
  117. data/lib/spree/frontend.rb +3 -1
  118. data/spree_frontend.gemspec +12 -10
  119. metadata +65 -50
  120. data/.deepsource.toml +0 -19
  121. data/.eslintignore +0 -7
  122. data/.eslintrc +0 -36
  123. data/.solargraph.yml +0 -20
  124. data/.stylelintignore +0 -4
  125. data/.stylelintrc +0 -6
  126. data/app/assets/images/logo-spree.png +0 -0
  127. data/app/assets/images/logo.png +0 -0
  128. data/app/assets/images/logo.svg +0 -10
  129. data/app/assets/images/logo@2x.png +0 -0
  130. data/app/assets/images/logo@3x.png +0 -0
  131. data/app/assets/images/noimage/plp.png +0 -0
  132. data/app/assets/images/noimage/plp.svg +0 -16
  133. data/app/views/spree/shared/_get_started.html.erb +0 -32
  134. data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +0 -2
  135. data/license.md +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66ee07c39f3973037fba8e3d5c16f5de80d7cf7152051058b7138ea98b1e0160
4
- data.tar.gz: 8413f7984b0dca8fbc785c36d958bf409d7d635dadf997861ed3db8c2f9949c2
3
+ metadata.gz: caad5de0edbc610a11d2fcf5a66ccd2f7b72df02586c6ecbbcd44361c723a8d0
4
+ data.tar.gz: 0a827e9e0b7c0b105d5f607053ddca0b32b121407307071f68339b3a96815601
5
5
  SHA512:
6
- metadata.gz: 4276034e9e0892d040c79e0ddbb31753c926d0e1d2d7a7f43a378d23224e2418ec41480b95be79ac84bce9da899b2f6951a7dabbdfdf367b430464084230363c
7
- data.tar.gz: 67a583cbbf0c984f0b297b4a258a3391bcef391a54683fa5b7c4bbaaeab5897b37a837e655cba233cfa4835315b908402e5e18fcb6b3371e19bdcd39204f20a3
6
+ metadata.gz: 107a0e3580ffc8e63d16158fba7d886cedf4fd765cac03497281ab09ee141355cf75905f75b1824a8e1496f1ae8e657f9ea12c90973a31aa586d0fe3aa243b6f
7
+ data.tar.gz: 4fa6f2841ebe6b61515542b98386f66d62f56bd8a124db6d5771143d7d33f9f554359276f6a9a3adf63f4eb6b89f2325850593607e87e3b9a08db53dcfc6e4e7
data/.circleci/config.yml CHANGED
@@ -1,4 +1,4 @@
1
- version: 2.1 # use CircleCI 2.0
1
+ version: 2.1
2
2
 
3
3
  defaults: &defaults
4
4
  environment: &environment
@@ -7,21 +7,19 @@ defaults: &defaults
7
7
  BUNDLE_JOBS: 4
8
8
  BUNDLE_RETRY: 3
9
9
  BUNDLE_PATH: ~/spree/vendor/bundle
10
- RAILS_VERSION: '~> 7.1.0'
11
10
  working_directory: ~/spree
12
11
  docker:
13
- - image: &ruby_3_2_image circleci/ruby:3.0-node-browsers
14
- - image: &redis_image circleci/redis:6.2-alpine
12
+ - image: &ruby_image cimg/ruby:3.3.0-browsers
15
13
 
16
- run_tests_3_2: &run_tests_3_2
14
+ run_tests: &run_tests
17
15
  <<: *defaults
18
16
  parallelism: 8
19
17
  steps:
20
18
  - checkout
21
19
  - restore_cache:
22
20
  keys:
23
- - spree-storefront-old-bundle-v10-ruby-3-2-{{ .Branch }}
24
- - spree-storefront-old-bundle-v10-ruby-3-2
21
+ - spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
22
+ - spree-storefront-bundle-{{ checksum ".ruby-version" }}
25
23
  - run:
26
24
  name: Add keyserver
27
25
  command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
@@ -29,12 +27,12 @@ run_tests_3_2: &run_tests_3_2
29
27
  name: Install libvips
30
28
  command: sudo apt-get update && sudo apt-get install libvips
31
29
  - run:
32
- name: Set bundle path
33
- command: bundle config --local path vendor/bundle
30
+ name: Set bundle path
31
+ command: bundle config --local path vendor/bundle
34
32
  - run:
35
- name: Ensure bundle Install
36
- command: |
37
- bundle check || bundle install
33
+ name: Ensure Bundle Install
34
+ command: |
35
+ bundle check || bundle install
38
36
  - run:
39
37
  name: Create test app
40
38
  command: |
@@ -53,14 +51,14 @@ run_tests_3_2: &run_tests_3_2
53
51
  path: tmp/capybara
54
52
 
55
53
  jobs:
56
- bundle_ruby_3_2:
54
+ bundle:
57
55
  <<: *defaults
58
56
  steps:
59
57
  - checkout
60
58
  - restore_cache:
61
59
  keys:
62
- - spree-storefront-old-bundle-v10-ruby-3-2-{{ .Branch }}
63
- - spree-storefront-old-bundle-v10-ruby-3-2
60
+ - spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
61
+ - spree-storefront-bundle-{{ checksum ".ruby-version" }}
64
62
  - run:
65
63
  name: Add keyserver
66
64
  command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
@@ -77,25 +75,11 @@ jobs:
77
75
  - save_cache:
78
76
  paths:
79
77
  - vendor/bundle
80
- key: spree-storefront-old-bundle-v10-ruby-3-2-{{ checksum "Gemfile.lock" }}
78
+ key: spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
81
79
 
82
- tests_ruby_3_2_rails_7_1_postgres:
83
- <<: *run_tests_3_2
84
- environment: &postgres_environment
85
- <<: *environment
86
- DB: postgres
87
- DB_HOST: localhost
88
- DB_USERNAME: postgres
89
- docker:
90
- - image: *ruby_3_2_image
91
- - image: &postgres_image circleci/postgres:12-alpine
92
- environment:
93
- POSTGRES_USER: postgres
94
- - image: *redis_image
95
-
96
- tests_ruby_3_2_rails_7_1_mysql:
97
- <<: *run_tests_3_2
98
- environment: &mysql_environment
80
+ tests_mysql:
81
+ <<: *run_tests
82
+ environment:
99
83
  <<: *environment
100
84
  DB: mysql
101
85
  DB_HOST: 127.0.0.1
@@ -103,18 +87,29 @@ jobs:
103
87
  COVERAGE: true
104
88
  COVERAGE_DIR: /tmp/workspace/simplecov
105
89
  docker:
106
- - image: *ruby_3_2_image
107
- - image: *redis_image
108
- - image: &mysql_image circleci/mysql:8-ram
90
+ - image: *ruby_image
91
+ - image: cimg/mysql:8.0
92
+
93
+ tests_postgres:
94
+ <<: *run_tests
95
+ environment:
96
+ <<: *environment
97
+ DB: postgres
98
+ DB_HOST: localhost
99
+ DB_USERNAME: postgres
100
+ docker:
101
+ - image: *ruby_image
102
+ - image: cimg/postgres:16.2
103
+ environment:
104
+ POSTGRES_USER: postgres
109
105
 
110
106
  workflows:
111
- version: 2
112
107
  main:
113
108
  jobs:
114
- - bundle_ruby_3_2
115
- - tests_ruby_3_2_rails_7_1_postgres:
109
+ - bundle
110
+ - tests_postgres:
116
111
  requires:
117
- - bundle_ruby_3_2
118
- - tests_ruby_3_2_rails_7_1_mysql:
112
+ - bundle
113
+ - tests_mysql:
119
114
  requires:
120
- - bundle_ruby_3_2
115
+ - bundle
data/.gem_release.yml CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  bump:
3
3
  recurse: false
4
- file: 'frontend/lib/spree/frontend/version.rb'
4
+ file: 'lib/spree/frontend/version.rb'
5
5
 
6
6
  release:
7
7
  recurse: true
@@ -1 +1 @@
1
- Please visit [Contributing section](https://dev-docs.spreecommerce.org/contributing/index) of Spree Guides. Thank you!
1
+ Please visit [Contributing section](https://docs.spreecommerce.org/developer/contributing/quickstart) of Spree Guides. Thank you!
@@ -1,32 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
1
6
  version: 2
2
7
  updates:
3
- - package-ecosystem: bundler
4
- directory: "/backend"
5
- schedule:
6
- interval: daily
7
- open-pull-requests-limit: 10
8
- - package-ecosystem: bundler
9
- directory: "/frontend"
10
- schedule:
11
- interval: daily
12
- open-pull-requests-limit: 10
13
- - package-ecosystem: bundler
14
- directory: "/core"
15
- schedule:
16
- interval: daily
17
- open-pull-requests-limit: 10
18
- - package-ecosystem: bundler
19
- directory: "/cli"
20
- schedule:
21
- interval: daily
22
- open-pull-requests-limit: 10
23
- - package-ecosystem: bundler
24
- directory: "/api"
25
- schedule:
26
- interval: daily
27
- open-pull-requests-limit: 10
28
- - package-ecosystem: bundler
29
- directory: "/sample"
30
- schedule:
31
- interval: daily
32
- open-pull-requests-limit: 10
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
data/.rubocop.yml CHANGED
@@ -1,197 +1,24 @@
1
- require: rubocop-rspec
2
-
3
1
  AllCops:
2
+ DisplayCopNames: true
4
3
  TargetRubyVersion: 3.0
5
- Exclude:
6
- - '**/sandbox/**/*'
7
- - '**/db/migrate/*'
4
+ Include:
8
5
  - '**/Gemfile'
9
- - '**/Gemfile.lock'
10
6
  - '**/Rakefile'
11
- - '**/rails'
12
- - '**/*.gemspec'
13
- - '**/dummy/**/*'
14
- - '**/vendor/**/*'
15
- - '**/spec_helper.rb'
16
- - '**/templates/**/*'
17
-
18
- Layout/MultilineOperationIndentation:
19
- EnforcedStyle: indented
7
+ - '**/Appraisals'
8
+ Exclude:
9
+ - 'spec/dummy/**/*'
10
+ - 'lib/generators/**/*'
20
11
 
21
- Layout/ParameterAlignment:
22
- Enabled: false
12
+ Rails:
13
+ Enabled: true
23
14
 
24
- Metrics/ClassLength:
25
- CountComments: false
15
+ Metrics/LineLength:
26
16
  Max: 150
27
17
 
28
- Metrics/ModuleLength:
29
- CountComments: false
30
- Max: 250
31
- Exclude:
32
- - '**/spec/**/*'
18
+ # DISABLED
33
19
 
34
20
  Style/Documentation:
35
21
  Enabled: false
36
22
 
37
- Layout/LineLength:
38
- Max: 150
39
- Exclude:
40
- - '**/spec/**/*'
41
-
42
- Metrics/MethodLength:
43
- CountComments: false
44
- Max: 50
45
-
46
- Metrics/BlockLength:
47
- CountComments: false
48
- Max: 50
49
- Exclude:
50
- - '**/spec/**/*'
51
- - '**/*.rake'
52
- - '**/factories/**/*'
53
- - '**/config/routes.rb'
54
-
55
- Metrics/AbcSize:
56
- Max: 45
57
-
58
- Style/StringLiterals:
59
- EnforcedStyle: single_quotes
60
-
61
- Layout/DotPosition:
62
- EnforcedStyle: trailing
63
- Enabled: true
64
-
65
- Layout/SpaceInsideArrayLiteralBrackets:
66
- Exclude:
67
- - 'api/spec/integration/**/*.rb'
68
- - 'api/lib/spree/api/testing_support/v2/platform_contexts.rb'
69
-
70
23
  Style/FrozenStringLiteralComment:
71
24
  Enabled: false
72
-
73
- Style/RegexpLiteral:
74
- Enabled: false
75
-
76
- Style/WordArray:
77
- Enabled: false
78
-
79
- Style/SymbolArray:
80
- Enabled: false
81
-
82
- Style/SymbolProc:
83
- Exclude:
84
- - '**/app/serializers/**/*'
85
-
86
- Style/GuardClause:
87
- Enabled: false
88
-
89
- Style/TrailingCommaInArrayLiteral:
90
- Enabled: false
91
-
92
- Style/TrailingCommaInHashLiteral:
93
- Enabled: false
94
-
95
- Style/BarePercentLiterals:
96
- Enabled: false
97
-
98
- Style/MutableConstant:
99
- Enabled: false
100
-
101
- Style/PercentLiteralDelimiters:
102
- Enabled: false
103
-
104
- Style/IfUnlessModifier:
105
- Enabled: false
106
-
107
- Naming/VariableNumber:
108
- Enabled: false
109
-
110
- Style/RedundantPercentQ:
111
- Enabled: false
112
-
113
- Lint/ParenthesesAsGroupedExpression:
114
- Enabled: false
115
-
116
- Style/NumericPredicate:
117
- Enabled: false
118
-
119
- Metrics/PerceivedComplexity:
120
- Max: 10
121
-
122
- Metrics/CyclomaticComplexity:
123
- Max: 10
124
-
125
- Style/ClassAndModuleChildren:
126
- Enabled: false
127
-
128
- Style/AndOr:
129
- Exclude:
130
- - '**/*controller.rb'
131
-
132
- Style/HashEachMethods:
133
- Enabled: false
134
-
135
- Style/HashTransformKeys:
136
- Enabled: false
137
-
138
- Style/HashTransformValues:
139
- Enabled: false
140
-
141
- RSpec/NestedGroups:
142
- Max: 7
143
-
144
- Lint/AmbiguousBlockAssociation:
145
- Exclude:
146
- - '**/spec/**/*'
147
-
148
- Style/NumericLiterals:
149
- Enabled: false
150
-
151
- RSpec/DescribeClass:
152
- Enabled: false
153
-
154
- RSpec/VerifiedDoubles:
155
- Enabled: false
156
-
157
- RSpec/MessageChain:
158
- Enabled: false
159
-
160
- RSpec/AnyInstance:
161
- Enabled: false
162
-
163
- RSpec/InstanceVariable:
164
- Enabled: false
165
-
166
- RSpec/ContextWording:
167
- Enabled: false
168
-
169
- RSpec/ExpectInHook:
170
- Enabled: false
171
-
172
- RSpec/ExampleLength:
173
- Enabled: false
174
-
175
- RSpec/MessageSpies:
176
- Enabled: false
177
-
178
- RSpec/NamedSubject:
179
- Enabled: false
180
-
181
- RSpec/MultipleExpectations:
182
- Enabled: false
183
-
184
- RSpec/FilePath:
185
- Enabled: false
186
-
187
- RSpec/LetSetup:
188
- Enabled: false
189
-
190
- RSpec/SubjectStub:
191
- Enabled: false
192
-
193
- RSpec/VoidExpect:
194
- Enabled: false
195
-
196
- RSpec/BeforeAfterAll:
197
- Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.0
data/Gemfile CHANGED
@@ -16,8 +16,10 @@ end
16
16
  platforms :ruby do
17
17
  if ENV['DB'] == 'mysql'
18
18
  gem 'mysql2'
19
+ elsif ENV['DB'] == 'postgres'
20
+ gem 'pg'
19
21
  else
20
- gem 'pg', '~> 1.1'
22
+ gem 'sqlite3', '~> 1.4'
21
23
  end
22
24
  end
23
25
 
@@ -26,7 +28,6 @@ group :test do
26
28
  gem 'capybara-screenshot'
27
29
  gem 'capybara-select-2'
28
30
  gem 'database_cleaner', '~> 2.0'
29
- gem 'email_spec'
30
31
  gem 'factory_bot_rails', '~> 6.0'
31
32
  gem 'multi_json'
32
33
  gem 'rspec-activemodel-mocks'
@@ -35,7 +36,7 @@ group :test do
35
36
  gem 'rspec_junit_formatter'
36
37
  gem 'rswag-specs'
37
38
  gem 'jsonapi-rspec'
38
- gem 'simplecov', '0.17.1'
39
+ gem 'simplecov'
39
40
  gem 'webmock'
40
41
  gem 'timecop'
41
42
  gem 'rails-controller-testing'
@@ -44,7 +45,6 @@ end
44
45
  group :test, :development do
45
46
  gem 'awesome_print'
46
47
  gem 'gem-release'
47
- gem 'redis'
48
48
  gem 'rubocop', '~> 1.22.3', require: false # bumped
49
49
  gem 'rubocop-rspec', require: false
50
50
  gem 'pry-byebug'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2021, Spree Commerce, Inc., Spark Solutions Sp. z o.o. and other contributors
1
+ Copyright (c) 2007-2024, Spree Commerce, Inc., Spark Solutions Sp. z o.o. and other contributors
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
data/README.md CHANGED
@@ -1,48 +1,53 @@
1
- # Spree (Legacy) Frontend
1
+ # Spree Rails Frontend
2
2
 
3
- This is the old Spree Storefront extracted from Spree < 4.3 which was upgraded to Turbo/Hotwire.
3
+ This is the Spree Storefront extracted from Spree < 4.3 which was upgraded to Turbo and Hotwire.
4
+ It is based on Bootstrap 4. It is battle tested and is used in production by many stores.
5
+
6
+ This storefront includes also Checkout and Cart functionality providing a complete shopping experience.
4
7
 
5
8
  ## Developed by
6
9
 
7
- [![Vendo](https://assets-global.website-files.com/6230c485f2c32ea1b0daa438/623372f40a8c54ca9aea34e8_vendo%202.svg)](https://getvendo.com?utm_source=spree_frontend_github)
10
+ <a href="https://getvendo.com?utm_source=spree_auth_github"><img src="https://cdn.getvendo.com/assets/vendo-logo-4bda02af8c99bc2ecc5a400120f0ebe4eafcd385e02e25f198a8c355ab75d1ff.png" height=50 alt="Vendo - Start your own multi-brand marketplace" /></a>
8
11
 
9
- > All-in-one platform for all your Marketplace and B2B eCommerce needs. [Start your 30-day free trial](https://e98esoirr8c.typeform.com/contactvendo?typeform-source=spree_sdk_github)
12
+ <a href="http://sparksolutions.co?utm_source=github"><img src="https://sparksolutions.co/wp-content/themes/sparksolutions/images/logo.svg" height=50 alt="Spark Solutions - Ruby on Rails and Spree Commerce developers"></a>
10
13
 
11
14
  ## Installation
12
15
 
13
- Add
16
+ Run
14
17
 
15
- ```ruby
16
- gem 'spree_frontend'
18
+ ```bash
19
+ bundle add 'spree_frontend'
17
20
  ```
18
21
 
19
- to your `Gemfile`, making sure that the `spree_frontend` gem is before `spree_auth_devise`.
20
-
21
- Make sure both `gem 'jsbundling-rails'` and `gem 'turbo-rails'` are added as well.
22
+ Make sure that the `spree_frontend` gem is before `spree_auth_devise`.
22
23
 
23
24
  Run:
24
25
 
25
26
  ```bash
26
27
  bundle install
27
- bin/rails javascript:install:esbuild
28
- bin/rails turbo:install
29
28
  bin/rails g spree:frontend:install
30
- yarn build
31
29
  ```
32
30
 
31
+ ### Development
32
+
33
+ You can easily import all storefront templates to your application by running:
34
+
35
+ ```bash
36
+ bin/rails g spree:frontend:copy_storefront
37
+ ```
38
+
39
+ This will allow you to easily customize the look and feel of your storefront.
40
+
33
41
  ### Troubleshooting
34
42
 
35
43
  #### Disabled 'Add to Cart' Button Issue
36
44
 
37
45
  If you notice that the 'Add to Cart' button is disabled on product pages, try the following:
38
- * run `yarn build` again in your main repo
39
- * if that doesn't fix the issue, try running the following setup commands again:
40
- ```
41
- bin/rails javascript:install:esbuild
46
+
47
+ ```bash
42
48
  bin/rails turbo:install
43
49
  bin/rails g spree:frontend:install
44
- yarn build
45
- rake assets:clean assets:precompile
50
+ bundle exec rake assets:clean assets:precompile
46
51
  ```
47
52
 
48
53
  This issue may come up if you switch the source of your `spree_frontend` in your Gemfile, e.g. from github to a local path, etc.
@@ -55,35 +60,23 @@ This error results from the routes defined in `spree_frontend` and `spree_auth_d
55
60
 
56
61
  ## Running Tests
57
62
 
58
- In order to generate the dummy app required for running tests, you’ll need to have the following installed on your machine:
59
- * node v16.13.1 (npm v8.1.2)
60
- * yarn ≥ v1.22.15
61
- * ruby v3.0.3
62
-
63
63
  To run tests locally, first run `bundle exec rake test_app`, then `bundle exec rspec`.
64
64
 
65
65
  ### Troubleshooting
66
+
66
67
  If you are running on a Mac with an M1 processor, you may run into the following error when running tests:
67
- ```
68
+
69
+ ```bash
68
70
  Webdrivers::NetworkError:
69
71
  Net::HTTPServerException: 404 "Not Found"
70
72
  ```
73
+
71
74
  If so, update your gemfile locally to get version 5.0 or higher for the web drivers gem:
72
- ```
75
+
76
+ ```bash
73
77
  gem 'webdrivers', '~> 5.0'
74
78
  ```
75
79
 
76
- ## Maintanence policy
77
-
78
- This gem is in maintainence mode.
79
-
80
- We only accept bug fixes, Spree/Rails compatibility improvements & security patches.
81
-
82
- For new project we recommend using [Storefront API](https://api.spreecommerce.org/) to create your own unique storefront or use one of the pre-built starters:
83
-
84
- * [Next.js](https://dev-docs.spreecommerce.org/storefronts/next.js-commerce)
85
- * [Vue Storefront](https://dev-docs.spreecommerce.org/storefronts/vue-storefront)
86
-
87
80
  ## Customization
88
81
 
89
- [Developer documentation](https://dev-docs.spreecommerce.org/customization/storefront)
82
+ [Developer documentation](https://docs.spreecommerce.org/customization/storefront)
data/SECURITY.md CHANGED
@@ -1 +1 @@
1
- Please see [Spree Guides Security section](https://dev-docs.spreecommerce.org/security/index).
1
+ Please see [Spree Guides Security section](https://docs.spreecommerce.org/developer/security/quickstart).
@@ -1,5 +1,6 @@
1
+ //= link_directory ../../javascript/spree/frontend .js
2
+
1
3
  //= link_tree ../images
2
4
  //
3
5
  //= link spree/frontend/all.js
4
6
  //= link spree/frontend/all.css
5
- //= link application.js
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,12 +1,9 @@
1
- Spree.fetchAccount = function () {
1
+ const fetchAccount = () => {
2
2
  return $.ajax({
3
3
  url: Spree.localizedPathFor('account_link')
4
4
  }).done(function (data) {
5
- Spree.accountFetched = true
6
5
  return $('#link-to-account').html(data)
7
6
  })
8
7
  }
9
8
 
10
- Spree.ready(function () {
11
- if (!Spree.accountFetched) Spree.fetchAccount()
12
- })
9
+ document.addEventListener("turbo:load", fetchAccount)
@@ -1,4 +1,4 @@
1
- Spree.fetchApiTokens = function () {
1
+ const fetchApiTokens = () => {
2
2
  fetch(Spree.routes.api_tokens, {
3
3
  method: 'GET',
4
4
  credentials: 'same-origin'
@@ -8,13 +8,10 @@ Spree.fetchApiTokens = function () {
8
8
  response.json().then(function (json) {
9
9
  SpreeAPI.orderToken = json.order_token
10
10
  SpreeAPI.oauthToken = json.oauth_token
11
- Spree.apiTokensFetched = true
12
11
  })
13
12
  break
14
13
  }
15
14
  })
16
15
  }
17
16
 
18
- Spree.ready(function () {
19
- if (!Spree.apiTokensFetched) Spree.fetchApiTokens()
20
- })
17
+ document.addEventListener("turbo:load", fetchApiTokens)
@@ -1,6 +1,6 @@
1
1
  //= require spree/frontend/coupon_manager
2
2
 
3
- Spree.ready(function ($) {
3
+ document.addEventListener("turbo:load", function() {
4
4
  var formUpdateCart = $('form#update-cart')
5
5
 
6
6
  function buildEventTriggerObject(dataset, quantity) {
@@ -1,4 +1,4 @@
1
- Spree.ready(function($) {
1
+ document.addEventListener("turbo:load", function() {
2
2
  Spree.onAddress = function() {
3
3
  if ($('#checkout_form_address').length) {
4
4
  Spree.updateState = function(region) {
@@ -1,4 +1,4 @@
1
- Spree.ready(function ($) {
1
+ document.addEventListener("turbo:load", function() {
2
2
  if ($('.select_address').length > 0) {
3
3
  $('input#order_use_billing').unbind('change');
4
4
 
@@ -4,7 +4,7 @@ var CARD_EXPIRATION_SELECTOR = '.cardExpiry'
4
4
  var CARD_CODE_SELECTOR = '.cardCode'
5
5
 
6
6
  //= require spree/frontend/coupon_manager
7
- Spree.ready(function ($) {
7
+ document.addEventListener("turbo:load", function() {
8
8
  Spree.onPayment = function () {
9
9
  if ($('#checkout_form_payment').length) {
10
10
  if ($('#existing_cards').length) {