spree_frontend 4.6.0 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +35 -124
- data/.codeclimate.yml +2 -2
- data/.gem_release.yml +1 -1
- data/.github/CONTRIBUTING.md +1 -1
- data/.github/dependabot.yml +9 -30
- data/.rubocop.yml +11 -184
- data/.ruby-version +1 -0
- data/Gemfile +12 -13
- data/LICENSE +1 -1
- data/README.md +31 -38
- data/SECURITY.md +1 -1
- data/app/assets/config/spree_frontend_manifest.js +2 -1
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/frontend/{account.js → account.es6} +2 -5
- data/app/assets/javascripts/spree/frontend/{api_tokens.js → api_tokens.es6} +2 -5
- data/app/assets/javascripts/spree/frontend/cart.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address_book.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
- data/app/assets/javascripts/spree/frontend/login.js +1 -1
- data/app/assets/javascripts/spree/frontend/main_nav_bar.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +9 -2
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/single.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/swipes.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/delete_address_popup.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/quantity_select.js +1 -1
- data/app/assets/javascripts/spree/lazysizes.config.js +1 -1
- data/app/assets/stylesheets/spree/frontend/components-custom/headers.scss +0 -2
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +4 -146
- data/app/assets/stylesheets/spree/frontend/fonts.scss +0 -136
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +21 -7
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +0 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/layouts/spree_application.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +0 -20
- data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +0 -20
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +0 -14
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss +0 -25
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss +0 -16
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +1 -8
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +1 -14
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/no_product_available.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/order_details.scss +0 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/taxons/show.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -28
- data/app/helpers/spree/addresses_helper.rb +6 -10
- data/app/helpers/spree/frontend_helper.rb +3 -3
- data/app/helpers/spree/navigation_helper.rb +3 -3
- data/app/helpers/spree/products_filters_helper.rb +3 -3
- data/app/helpers/spree/taxons_helper.rb +1 -1
- data/app/javascript/spree/frontend/application.js +2 -0
- data/app/services/spree/build_localized_redirect_url.rb +2 -2
- data/app/views/spree/addresses/_form.html.erb +4 -5
- data/app/views/spree/addresses/edit.html.erb +1 -1
- data/app/views/spree/addresses/new.html.erb +1 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +1 -1
- data/app/views/spree/checkout/edit.html.erb +1 -1
- data/app/views/spree/checkout/payment/_gateway.html.erb +4 -4
- data/app/views/spree/checkout/payment/_storecredit.html.erb +1 -1
- data/app/views/spree/checkout/registration.html.erb +1 -1
- data/app/views/spree/layouts/spree_application.html.erb +4 -1
- data/app/views/spree/orders/_line_item_data.html.erb +1 -1
- data/app/views/spree/orders/show.html.erb +1 -1
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_color_option_type.html.erb +1 -1
- data/app/views/spree/products/_description.html.erb +1 -1
- data/app/views/spree/products/_filters_desktop.html.erb +1 -1
- data/app/views/spree/products/_filters_mobile.html.erb +3 -3
- data/app/views/spree/products/_option_type.html.erb +1 -1
- data/app/views/spree/products/_promotions.html.erb +1 -1
- data/app/views/spree/products/_properties.html.erb +1 -1
- data/app/views/spree/products/_sort_desktop.html.erb +9 -24
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/products/related.html.erb +1 -1
- data/app/views/spree/shared/_checkout_header.html.erb +1 -1
- data/app/views/spree/shared/_currency_dropdown.html.erb +1 -1
- data/app/views/spree/shared/_delete_address_popup.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +3 -3
- data/app/views/spree/shared/_head.html.erb +2 -1
- data/app/views/spree/shared/_internationalization_options.html.erb +3 -3
- data/app/views/spree/shared/_line_item.html.erb +1 -1
- data/app/views/spree/shared/_locale_dropdown.html.erb +1 -1
- data/app/views/spree/shared/_login.html.erb +2 -2
- data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +1 -1
- data/app/views/spree/shared/_mobile_navigation.html.erb +1 -1
- data/app/views/spree/shared/_nav_bar.html.erb +5 -5
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +3 -3
- data/app/views/spree/shared/_product_added_modal.html.erb +2 -2
- data/app/views/spree/shared/_user_form.html.erb +3 -3
- data/app/views/spree/taxons/_header.html.erb +1 -1
- data/app/views/spree/taxons/_subcategories.html.erb +1 -1
- data/app/views/spree/taxons/product_carousel.html.erb +1 -1
- data/app/views/spree/users/edit.html.erb +1 -1
- data/app/views/spree/users/show.html.erb +1 -1
- data/config/importmap.rb +2 -0
- data/config/initializers/admin_actions.rb +18 -0
- data/config/locales/en.yml +37 -0
- data/lib/generators/spree/frontend/install/install_generator.rb +0 -2
- data/lib/spree/frontend/configuration.rb +1 -1
- data/lib/spree/frontend/engine.rb +9 -5
- data/lib/spree/frontend/version.rb +3 -3
- data/lib/spree/frontend.rb +3 -1
- data/spree_frontend.gemspec +13 -11
- metadata +67 -51
- data/.deepsource.toml +0 -19
- data/.eslintignore +0 -7
- data/.eslintrc +0 -36
- data/.solargraph.yml +0 -20
- data/.stylelintignore +0 -4
- data/.stylelintrc +0 -6
- data/app/assets/images/logo-spree.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo.svg +0 -10
- data/app/assets/images/logo@2x.png +0 -0
- data/app/assets/images/logo@3x.png +0 -0
- data/app/assets/images/noimage/plp.png +0 -0
- data/app/assets/images/noimage/plp.svg +0 -16
- data/app/views/spree/shared/_get_started.html.erb +0 -32
- data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +0 -2
- data/license.md +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caad5de0edbc610a11d2fcf5a66ccd2f7b72df02586c6ecbbcd44361c723a8d0
|
4
|
+
data.tar.gz: 0a827e9e0b7c0b105d5f607053ddca0b32b121407307071f68339b3a96815601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 107a0e3580ffc8e63d16158fba7d886cedf4fd765cac03497281ab09ee141355cf75905f75b1824a8e1496f1ae8e657f9ea12c90973a31aa586d0fe3aa243b6f
|
7
|
+
data.tar.gz: 4fa6f2841ebe6b61515542b98386f66d62f56bd8a124db6d5771143d7d33f9f554359276f6a9a3adf63f4eb6b89f2325850593607e87e3b9a08db53dcfc6e4e7
|
data/.circleci/config.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
version: 2.1
|
1
|
+
version: 2.1
|
2
2
|
|
3
3
|
defaults: &defaults
|
4
4
|
environment: &environment
|
@@ -7,27 +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.0'
|
11
10
|
working_directory: ~/spree
|
12
11
|
docker:
|
13
|
-
- image: &
|
14
|
-
- image: &redis_image circleci/redis:6.2-alpine
|
12
|
+
- image: &ruby_image cimg/ruby:3.3.0-browsers
|
15
13
|
|
16
|
-
|
17
|
-
<<: *defaults
|
18
|
-
docker:
|
19
|
-
- image: &ruby_3_2_image circleci/ruby:3.0-node-browsers
|
20
|
-
- image: *redis_image
|
21
|
-
|
22
|
-
run_tests_2_7: &run_tests_2_7
|
14
|
+
run_tests: &run_tests
|
23
15
|
<<: *defaults
|
24
16
|
parallelism: 8
|
25
17
|
steps:
|
26
18
|
- checkout
|
27
19
|
- restore_cache:
|
28
20
|
keys:
|
29
|
-
- spree-storefront-
|
30
|
-
- spree-storefront-
|
21
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
22
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}
|
31
23
|
- run:
|
32
24
|
name: Add keyserver
|
33
25
|
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
@@ -35,51 +27,12 @@ run_tests_2_7: &run_tests_2_7
|
|
35
27
|
name: Install libvips
|
36
28
|
command: sudo apt-get update && sudo apt-get install libvips
|
37
29
|
- run:
|
38
|
-
|
39
|
-
|
30
|
+
name: Set bundle path
|
31
|
+
command: bundle config --local path vendor/bundle
|
40
32
|
- run:
|
41
|
-
|
42
|
-
command: |
|
43
|
-
bundle check || bundle install
|
44
|
-
- run:
|
45
|
-
name: Create test app
|
33
|
+
name: Ensure Bundle Install
|
46
34
|
command: |
|
47
|
-
bundle
|
48
|
-
- run:
|
49
|
-
name: Run Rspec
|
50
|
-
command: |
|
51
|
-
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
52
|
-
bundle exec rspec --format documentation \
|
53
|
-
--format RspecJunitFormatter \
|
54
|
-
-o ~/rspec/rspec.xml \
|
55
|
-
-- ${TESTFILES}
|
56
|
-
- store_test_results:
|
57
|
-
path: ~/rspec
|
58
|
-
- store_artifacts:
|
59
|
-
path: tmp/capybara
|
60
|
-
|
61
|
-
run_tests_3_2: &run_tests_3_2
|
62
|
-
<<: *defaults_3_2
|
63
|
-
parallelism: 8
|
64
|
-
steps:
|
65
|
-
- checkout
|
66
|
-
- restore_cache:
|
67
|
-
keys:
|
68
|
-
- spree-storefront-old-bundle-v10-ruby-3-2-{{ .Branch }}
|
69
|
-
- spree-storefront-old-bundle-v10-ruby-3-2
|
70
|
-
- run:
|
71
|
-
name: Add keyserver
|
72
|
-
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
73
|
-
- run:
|
74
|
-
name: Install libvips
|
75
|
-
command: sudo apt-get update && sudo apt-get install libvips
|
76
|
-
- run:
|
77
|
-
name: Set bundle path
|
78
|
-
command: bundle config --local path vendor/bundle
|
79
|
-
- run:
|
80
|
-
name: Ensure bundle Install
|
81
|
-
command: |
|
82
|
-
bundle check || bundle install
|
35
|
+
bundle check || bundle install
|
83
36
|
- run:
|
84
37
|
name: Create test app
|
85
38
|
command: |
|
@@ -98,14 +51,14 @@ run_tests_3_2: &run_tests_3_2
|
|
98
51
|
path: tmp/capybara
|
99
52
|
|
100
53
|
jobs:
|
101
|
-
|
54
|
+
bundle:
|
102
55
|
<<: *defaults
|
103
56
|
steps:
|
104
57
|
- checkout
|
105
58
|
- restore_cache:
|
106
59
|
keys:
|
107
|
-
- spree-storefront-
|
108
|
-
- spree-storefront-
|
60
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
61
|
+
- spree-storefront-bundle-{{ checksum ".ruby-version" }}
|
109
62
|
- run:
|
110
63
|
name: Add keyserver
|
111
64
|
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
@@ -122,60 +75,11 @@ jobs:
|
|
122
75
|
- save_cache:
|
123
76
|
paths:
|
124
77
|
- vendor/bundle
|
125
|
-
key: spree-storefront-
|
78
|
+
key: spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
126
79
|
|
127
|
-
|
128
|
-
<<: *
|
129
|
-
steps:
|
130
|
-
- checkout
|
131
|
-
- restore_cache:
|
132
|
-
keys:
|
133
|
-
- spree-storefront-old-bundle-v10-ruby-3-2-{{ .Branch }}
|
134
|
-
- spree-storefront-old-bundle-v10-ruby-3-2
|
135
|
-
- run:
|
136
|
-
name: Add keyserver
|
137
|
-
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
138
|
-
- run:
|
139
|
-
name: Install libvips
|
140
|
-
command: sudo apt-get update && sudo apt-get install libvips
|
141
|
-
- run:
|
142
|
-
name: Set bundle path
|
143
|
-
command: bundle config --local path vendor/bundle
|
144
|
-
- run:
|
145
|
-
name: Bundle Install
|
146
|
-
command: |
|
147
|
-
bundle check || bundle install
|
148
|
-
- save_cache:
|
149
|
-
paths:
|
150
|
-
- vendor/bundle
|
151
|
-
key: spree-storefront-old-bundle-v10-ruby-3-2-{{ checksum "Gemfile.lock" }}
|
152
|
-
|
153
|
-
tests_ruby_2_7_rails_7_0_postgres:
|
154
|
-
<<: *run_tests_2_7
|
155
|
-
environment: &postgres_environment
|
156
|
-
<<: *environment
|
157
|
-
DB: postgres
|
158
|
-
DB_HOST: localhost
|
159
|
-
DB_USERNAME: postgres
|
160
|
-
docker:
|
161
|
-
- image: *ruby_2_7_image
|
162
|
-
- image: *redis_image
|
163
|
-
- image: &postgres_image circleci/postgres:12-alpine
|
164
|
-
environment:
|
165
|
-
POSTGRES_USER: postgres
|
166
|
-
|
167
|
-
tests_ruby_3_2_rails_7_0_postgres:
|
168
|
-
<<: *run_tests_3_2
|
80
|
+
tests_mysql:
|
81
|
+
<<: *run_tests
|
169
82
|
environment:
|
170
|
-
<<: *postgres_environment
|
171
|
-
docker:
|
172
|
-
- image: *ruby_3_2_image
|
173
|
-
- image: *postgres_image
|
174
|
-
- image: *redis_image
|
175
|
-
|
176
|
-
tests_ruby_2_7_rails_7_0_mysql:
|
177
|
-
<<: *run_tests_2_7
|
178
|
-
environment: &mysql_environment
|
179
83
|
<<: *environment
|
180
84
|
DB: mysql
|
181
85
|
DB_HOST: 127.0.0.1
|
@@ -183,22 +87,29 @@ jobs:
|
|
183
87
|
COVERAGE: true
|
184
88
|
COVERAGE_DIR: /tmp/workspace/simplecov
|
185
89
|
docker:
|
186
|
-
- image: *
|
187
|
-
- image:
|
188
|
-
|
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
|
189
105
|
|
190
106
|
workflows:
|
191
|
-
version: 2
|
192
107
|
main:
|
193
108
|
jobs:
|
194
|
-
-
|
195
|
-
-
|
196
|
-
- tests_ruby_3_2_rails_7_0_postgres:
|
197
|
-
requires:
|
198
|
-
- bundle_ruby_3_2
|
199
|
-
- tests_ruby_2_7_rails_7_0_postgres:
|
109
|
+
- bundle
|
110
|
+
- tests_postgres:
|
200
111
|
requires:
|
201
|
-
-
|
202
|
-
-
|
112
|
+
- bundle
|
113
|
+
- tests_mysql:
|
203
114
|
requires:
|
204
|
-
-
|
115
|
+
- bundle
|
data/.codeclimate.yml
CHANGED
@@ -15,8 +15,8 @@ plugins:
|
|
15
15
|
enabled: false
|
16
16
|
config:
|
17
17
|
file: .rubocop.yml
|
18
|
-
channel: "rubocop-
|
19
|
-
|
18
|
+
channel: "rubocop-1-50-3" # need to keep this value the same as rubocop version
|
19
|
+
# https://docs.codeclimate.com/v1.0/docs/rubocop#section-using-rubocop-s-newer-versions
|
20
20
|
eslint:
|
21
21
|
enabled: true
|
22
22
|
config:
|
data/.gem_release.yml
CHANGED
data/.github/CONTRIBUTING.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Please visit [Contributing section](https://
|
1
|
+
Please visit [Contributing section](https://docs.spreecommerce.org/developer/contributing/quickstart) of Spree Guides. Thank you!
|
data/.github/dependabot.yml
CHANGED
@@ -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
|
-
|
5
|
-
|
6
|
-
|
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:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
- '**/db/migrate/*'
|
2
|
+
DisplayCopNames: true
|
3
|
+
TargetRubyVersion: 3.0
|
4
|
+
Include:
|
8
5
|
- '**/Gemfile'
|
9
|
-
- '**/Gemfile.lock'
|
10
6
|
- '**/Rakefile'
|
11
|
-
- '**/
|
12
|
-
|
13
|
-
- '
|
14
|
-
- '
|
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
|
-
|
22
|
-
Enabled:
|
12
|
+
Rails:
|
13
|
+
Enabled: true
|
23
14
|
|
24
|
-
Metrics/
|
25
|
-
CountComments: false
|
15
|
+
Metrics/LineLength:
|
26
16
|
Max: 150
|
27
17
|
|
28
|
-
|
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
@@ -6,7 +6,7 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
|
|
6
6
|
actionmailer actionpack actionview activejob activemodel activerecord
|
7
7
|
activestorage activesupport railties
|
8
8
|
].each do |rails_gem|
|
9
|
-
gem rails_gem, ENV.fetch('RAILS_VERSION', '~> 7.
|
9
|
+
gem rails_gem, ENV.fetch('RAILS_VERSION', '~> 7.1.0'), require: false
|
10
10
|
end
|
11
11
|
|
12
12
|
platforms :jruby do
|
@@ -16,27 +16,28 @@ 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 '
|
22
|
+
gem 'sqlite3', '~> 1.4'
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
24
26
|
group :test do
|
25
|
-
gem 'capybara'
|
26
|
-
gem 'capybara-screenshot'
|
27
|
+
gem 'capybara'
|
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
|
-
gem 'rspec-activemodel-mocks'
|
33
|
-
gem 'rspec-rails'
|
33
|
+
gem 'rspec-activemodel-mocks'
|
34
|
+
gem 'rspec-rails'
|
34
35
|
gem 'rspec-retry'
|
35
36
|
gem 'rspec_junit_formatter'
|
36
37
|
gem 'rswag-specs'
|
37
38
|
gem 'jsonapi-rspec'
|
38
|
-
gem 'simplecov'
|
39
|
-
gem 'webmock'
|
39
|
+
gem 'simplecov'
|
40
|
+
gem 'webmock'
|
40
41
|
gem 'timecop'
|
41
42
|
gem 'rails-controller-testing'
|
42
43
|
end
|
@@ -44,13 +45,11 @@ 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'
|
51
|
-
gem 'webdrivers'
|
52
|
-
|
53
|
-
gem 'puma', '< 6.0'
|
51
|
+
gem 'webdrivers'
|
52
|
+
gem 'puma'
|
54
53
|
gem 'ffaker'
|
55
54
|
end
|
56
55
|
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2007-
|
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
|
1
|
+
# Spree Rails Frontend
|
2
2
|
|
3
|
-
This is the
|
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
|
-
|
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
|
-
|
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
|
-
|
16
|
+
Run
|
14
17
|
|
15
|
-
```
|
16
|
-
|
18
|
+
```bash
|
19
|
+
bundle add 'spree_frontend'
|
17
20
|
```
|
18
21
|
|
19
|
-
|
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
|
-
|
39
|
-
|
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
|
-
|
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://
|
82
|
+
[Developer documentation](https://docs.spreecommerce.org/customization/storefront)
|