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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +37 -42
- data/.gem_release.yml +1 -1
- data/.github/CONTRIBUTING.md +1 -1
- data/.github/dependabot.yml +9 -30
- data/.rubocop.yml +10 -183
- data/.ruby-version +1 -0
- data/Gemfile +4 -4
- 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 +1 -1
- data/app/helpers/spree/navigation_helper.rb +1 -1
- data/app/helpers/spree/products_filters_helper.rb +3 -3
- data/app/javascript/spree/frontend/application.js +2 -0
- 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/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 +12 -10
- metadata +65 -50
- 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,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: &
|
14
|
-
- image: &redis_image circleci/redis:6.2-alpine
|
12
|
+
- image: &ruby_image cimg/ruby:3.3.0-browsers
|
15
13
|
|
16
|
-
|
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-
|
24
|
-
- spree-storefront-
|
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
|
-
|
33
|
-
|
30
|
+
name: Set bundle path
|
31
|
+
command: bundle config --local path vendor/bundle
|
34
32
|
- run:
|
35
|
-
|
36
|
-
|
37
|
-
|
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
|
-
|
54
|
+
bundle:
|
57
55
|
<<: *defaults
|
58
56
|
steps:
|
59
57
|
- checkout
|
60
58
|
- restore_cache:
|
61
59
|
keys:
|
62
|
-
- spree-storefront-
|
63
|
-
- spree-storefront-
|
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-
|
78
|
+
key: spree-storefront-bundle-{{ checksum ".ruby-version" }}-{{ .Branch }}
|
81
79
|
|
82
|
-
|
83
|
-
<<: *
|
84
|
-
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: *
|
107
|
-
- image:
|
108
|
-
|
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
|
-
-
|
115
|
-
-
|
109
|
+
- bundle
|
110
|
+
- tests_postgres:
|
116
111
|
requires:
|
117
|
-
-
|
118
|
-
-
|
112
|
+
- bundle
|
113
|
+
- tests_mysql:
|
119
114
|
requires:
|
120
|
-
-
|
115
|
+
- bundle
|
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:
|
2
|
+
DisplayCopNames: true
|
4
3
|
TargetRubyVersion: 3.0
|
5
|
-
|
6
|
-
- '**/sandbox/**/*'
|
7
|
-
- '**/db/migrate/*'
|
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
@@ -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 '
|
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'
|
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-
|
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)
|
data/SECURITY.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Please see [Spree Guides Security section](https://
|
1
|
+
Please see [Spree Guides Security section](https://docs.spreecommerce.org/developer/security/quickstart).
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,12 +1,9 @@
|
|
1
|
-
|
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
|
-
|
11
|
-
if (!Spree.accountFetched) Spree.fetchAccount()
|
12
|
-
})
|
9
|
+
document.addEventListener("turbo:load", fetchAccount)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
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
|
-
|
19
|
-
if (!Spree.apiTokensFetched) Spree.fetchApiTokens()
|
20
|
-
})
|
17
|
+
document.addEventListener("turbo:load", fetchApiTokens)
|
@@ -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
|
-
|
7
|
+
document.addEventListener("turbo:load", function() {
|
8
8
|
Spree.onPayment = function () {
|
9
9
|
if ($('#checkout_form_payment').length) {
|
10
10
|
if ($('#existing_cards').length) {
|