spree_frontend 4.3.0.rc3 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +191 -0
  3. data/.codeclimate.yml +36 -0
  4. data/.deepsource.toml +19 -0
  5. data/.editorconfig +22 -0
  6. data/.eslintignore +7 -0
  7. data/.eslintrc +36 -0
  8. data/.gem_release.yml +7 -0
  9. data/.github/CONTRIBUTING.md +1 -0
  10. data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
  11. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  12. data/.github/ISSUE_TEMPLATE.md +39 -0
  13. data/.github/dependabot.yml +32 -0
  14. data/.gitignore +58 -0
  15. data/.rubocop.yml +197 -0
  16. data/.solargraph.yml +20 -0
  17. data/.stylelintignore +4 -0
  18. data/.stylelintrc +6 -0
  19. data/CODE_OF_CONDUCT.md +22 -0
  20. data/Gemfile +62 -3
  21. data/LICENSE +1 -1
  22. data/README.md +35 -0
  23. data/SECURITY.md +1 -0
  24. data/app/controllers/spree/addresses_controller.rb +2 -6
  25. data/app/controllers/spree/locale_controller.rb +1 -1
  26. data/app/controllers/spree/store_controller.rb +42 -1
  27. data/app/helpers/spree/frontend_helper.rb +19 -1
  28. data/app/helpers/spree/navigation_helper.rb +1 -1
  29. data/app/helpers/spree/store_helper.rb +1 -1
  30. data/app/models/spree/frontend_configuration.rb +7 -1
  31. data/app/services/spree/build_localized_redirect_url.rb +101 -0
  32. data/app/views/spree/checkout/_delivery.html.erb +1 -1
  33. data/app/views/spree/products/_description.html.erb +1 -1
  34. data/app/views/spree/shared/_link_to_account.html.erb +3 -1
  35. data/app/views/spree/shared/_paths.html.erb +1 -1
  36. data/config/routes.rb +5 -5
  37. data/lib/spree/frontend/engine.rb +2 -1
  38. data/lib/spree/frontend/version.rb +9 -0
  39. data/license.md +13 -0
  40. data/spree_frontend.gemspec +2 -2
  41. metadata +34 -12
  42. data/app/views/spree/shared/_taxonomies.html.erb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb4a74b1b7115b80405f1a3b20f297a7b5ee01900623b7e24d029e821ba3958b
4
- data.tar.gz: 55960bbd275a107d009029ebd20321a42bc6e0c46e0b8c863955cdcc42898075
3
+ metadata.gz: 8869ebc4be30c0c2bf7e2527048cadda71ec5cc14891b4e74cd00304e64f7faa
4
+ data.tar.gz: 4ab3f2fb4fe452d35ee0fd63c5a5c915555f0afbfd97020a9bac37691dc21cf3
5
5
  SHA512:
6
- metadata.gz: a30ac40767917cdd7257f7a613d9d51275383adfc89a20d1fd4bc32741da1cb5d94f8f07f93ce35774d2f111a8903ae296846046cb29e5c19fb021d5c396bea9
7
- data.tar.gz: 7247f2d98a0064f09da880554dd390d255aa6008228701169701b1d2b9b8c0c1c0f274647ff0bea0b05c41d20e2337bd0faba5831233b2df27f4255bf9001525
6
+ metadata.gz: 10ddbe145b8b328d4545e64538785ef5990cd745b873c217f8a571d820f2e5499a1c333f2d86867a3eaab3b756a07b33311342981e35c747f7ac5ae3636e9b00
7
+ data.tar.gz: b39decf33e2597c9b6dfca8647b514c000033b758cad9fb900a8be7c41231b8abca2918389d25adccbc373a6d5f1a88f9906a2f537d2f95ee299a715c50ff757
@@ -0,0 +1,191 @@
1
+ version: 2.1 # use CircleCI 2.0
2
+
3
+ defaults: &defaults
4
+ environment: &environment
5
+ CIRCLE_TEST_REPORTS: /tmp/test-results
6
+ CIRCLE_ARTIFACTS: /tmp/test-artifacts
7
+ BUNDLE_JOBS: 4
8
+ BUNDLE_RETRY: 3
9
+ BUNDLE_PATH: ~/spree/vendor/bundle
10
+ working_directory: ~/spree
11
+ docker:
12
+ - image: &ruby_image circleci/ruby:2.7-node-browsers
13
+ - image: &redis_image circleci/redis:6.2-alpine
14
+
15
+ defaults_3_0: &defaults_3_0
16
+ <<: *defaults
17
+ docker:
18
+ - image: &ruby_3_0_image circleci/ruby:3.0-node-browsers
19
+ - image: *redis_image
20
+
21
+ run_tests: &run_tests
22
+ <<: *defaults
23
+ parallelism: 8
24
+ steps:
25
+ - checkout
26
+ - restore_cache:
27
+ keys:
28
+ - spree-storefront-old-bundle-v10-ruby-2-7-{{ .Branch }}
29
+ - spree-storefront-old-bundle-v10-ruby-2-7
30
+ - run:
31
+ name: Install libvips
32
+ command: sudo apt-get install libvips
33
+ - run:
34
+ name: Set bundle path
35
+ command: bundle config --local path vendor/bundle
36
+ - run:
37
+ name: Ensure bundle Install
38
+ command: |
39
+ bundle check || bundle install
40
+ - run:
41
+ name: Create test app
42
+ command: |
43
+ bundle exec rake test_app
44
+ - run:
45
+ name: Run Rspec
46
+ command: |
47
+ TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
48
+ bundle exec rspec --format documentation \
49
+ --format RspecJunitFormatter \
50
+ -o ~/rspec/rspec.xml \
51
+ -- ${TESTFILES}
52
+ - store_test_results:
53
+ path: ~/rspec
54
+ - store_artifacts:
55
+ path: tmp/capybara
56
+
57
+ run_tests_3_0: &run_tests_3_0
58
+ <<: *defaults_3_0
59
+ parallelism: 8
60
+ steps:
61
+ - checkout
62
+ - restore_cache:
63
+ keys:
64
+ - spree-storefront-old-bundle-v10-ruby-3-0-{{ .Branch }}
65
+ - spree-storefront-old-bundle-v10-ruby-3-0
66
+ - run:
67
+ name: Install libvips
68
+ command: sudo apt-get install libvips
69
+ - run:
70
+ name: Set bundle path
71
+ command: bundle config --local path vendor/bundle
72
+ - run:
73
+ name: Ensure bundle Install
74
+ command: |
75
+ bundle check || bundle install
76
+ - run:
77
+ name: Create test app
78
+ command: |
79
+ bundle exec rake test_app
80
+ - run:
81
+ name: Run Rspec
82
+ command: |
83
+ TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
84
+ bundle exec rspec --format documentation \
85
+ --format RspecJunitFormatter \
86
+ -o ~/rspec/rspec.xml \
87
+ -- ${TESTFILES}
88
+ - store_test_results:
89
+ path: ~/rspec
90
+ - store_artifacts:
91
+ path: tmp/capybara
92
+
93
+ jobs:
94
+ bundle:
95
+ <<: *defaults
96
+ steps:
97
+ - checkout
98
+ - restore_cache:
99
+ keys:
100
+ - spree-storefront-old-bundle-v10-ruby-2-7-{{ .Branch }}
101
+ - spree-storefront-old-bundle-v10-ruby-2-7
102
+ - run:
103
+ name: Install libvips
104
+ command: sudo apt-get install libvips
105
+ - run:
106
+ name: Set bundle path
107
+ command: bundle config --local path vendor/bundle
108
+ - run:
109
+ name: Bundle Install
110
+ command: |
111
+ bundle check || bundle install
112
+ - save_cache:
113
+ paths:
114
+ - vendor/bundle
115
+ key: spree-storefront-old-bundle-v10-ruby-2-7-{{ checksum "Gemfile.lock" }}
116
+
117
+ bundle_ruby_3_0:
118
+ <<: *defaults_3_0
119
+ steps:
120
+ - checkout
121
+ - restore_cache:
122
+ keys:
123
+ - spree-storefront-old-bundle-v10-ruby-3-0-{{ .Branch }}
124
+ - spree-storefront-old-bundle-v10-ruby-3-0
125
+ - run:
126
+ name: Install libvips
127
+ command: sudo apt-get install libvips
128
+ - run:
129
+ name: Set bundle path
130
+ command: bundle config --local path vendor/bundle
131
+ - run:
132
+ name: Bundle Install
133
+ command: |
134
+ bundle check || bundle install
135
+ - save_cache:
136
+ paths:
137
+ - vendor/bundle
138
+ key: spree-storefront-old-bundle-v10-ruby-3-0-{{ checksum "Gemfile.lock" }}
139
+
140
+ tests_postgres: &tests_postgres
141
+ <<: *run_tests
142
+ environment: &postgres_environment
143
+ <<: *environment
144
+ DB: postgres
145
+ DB_HOST: localhost
146
+ DB_USERNAME: postgres
147
+ docker:
148
+ - image: *ruby_image
149
+ - image: *redis_image
150
+ - image: &postgres_image circleci/postgres:12-alpine
151
+ environment:
152
+ POSTGRES_USER: postgres
153
+
154
+ tests_postgres_ruby_3_0: &tests_postgres_ruby_3_0
155
+ <<: *run_tests_3_0
156
+ environment:
157
+ <<: *postgres_environment
158
+ docker:
159
+ - image: *ruby_3_0_image
160
+ - image: *postgres_image
161
+ - image: *redis_image
162
+
163
+ tests_mysql: &tests_mysql
164
+ <<: *run_tests
165
+ environment: &mysql_environment
166
+ <<: *environment
167
+ DB: mysql
168
+ DB_HOST: 127.0.0.1
169
+ DB_USERNAME: root
170
+ COVERAGE: true
171
+ COVERAGE_DIR: /tmp/workspace/simplecov
172
+ docker:
173
+ - image: *ruby_image
174
+ - image: *redis_image
175
+ - image: &mysql_image circleci/mysql:8-ram
176
+
177
+ workflows:
178
+ version: 2
179
+ main:
180
+ jobs:
181
+ - bundle
182
+ - bundle_ruby_3_0
183
+ - tests_postgres:
184
+ requires:
185
+ - bundle
186
+ - tests_postgres_ruby_3_0:
187
+ requires:
188
+ - bundle_ruby_3_0
189
+ - tests_mysql:
190
+ requires:
191
+ - bundle
data/.codeclimate.yml ADDED
@@ -0,0 +1,36 @@
1
+ version: "2"
2
+ plugins:
3
+ rubocop:
4
+ enabled: true
5
+ checks:
6
+ Rubocop/Naming/RescuedExceptionsVariableName:
7
+ enabled: false
8
+ Rubocop/Layout/AlignArguments:
9
+ enabled: false
10
+ Rubocop/Style/MultilineWhenThen:
11
+ enabled: false
12
+ Rubocop/Layout/SpaceAroundOperators:
13
+ enabled: false
14
+ Rubocop/Style/FormatStringToken:
15
+ enabled: false
16
+ config:
17
+ file: .rubocop.yml
18
+ channel: "rubocop-0-80" # 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
+ eslint:
21
+ enabled: true
22
+ config:
23
+ extensions:
24
+ - .es6
25
+ - .js
26
+ channel: "eslint-7" # need to keep this value the same as eslint version
27
+ # https://docs.codeclimate.com/v1.0/docs/eslint#section-eslint-versions
28
+ stylelint:
29
+ enabled: true
30
+ exclude_patterns:
31
+ - "**/bin/"
32
+ - "**/script/"
33
+ - "**/vendor/"
34
+ - "**/spec/"
35
+ - "public/"
36
+ - "sample/db/samples"
data/.deepsource.toml ADDED
@@ -0,0 +1,19 @@
1
+ version = 1
2
+
3
+ exclude_patterns = [
4
+ "**/sandbox/**/*",
5
+ "**/db/migrate/*",
6
+ "**/Gemfile",
7
+ "**/Gemfile.lock",
8
+ "**/Rakefile",
9
+ "**/rails",
10
+ "**/*.gemspec",
11
+ "**/dummy/**/*",
12
+ "**/vendor/**/*",
13
+ "**/spec_helper.rb",
14
+ "**/templates/**/*"
15
+ ]
16
+
17
+ [[analyzers]]
18
+ name = "ruby"
19
+ enabled = true
data/.editorconfig ADDED
@@ -0,0 +1,22 @@
1
+ # http://EditorConfig.org
2
+ # https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
3
+
4
+ root = true
5
+
6
+ [*]
7
+ charset = utf-8
8
+ end_of_line = lf
9
+ indent_size = 2
10
+ indent_style = space
11
+ insert_final_newline = true
12
+ trim_trailing_whitespace = true
13
+ tab_width = 2
14
+
15
+ [**.rb]
16
+ max_line_length = 150
17
+
18
+ [**.js, **.coffee]
19
+ max_line_length = 150
20
+
21
+ [*.md]
22
+ trim_trailing_whitespace = false
data/.eslintignore ADDED
@@ -0,0 +1,7 @@
1
+ **/vendor/**
2
+ **/dummy/**
3
+ **/sandbox/**
4
+ *-min.js
5
+ *.min.js
6
+ jquery*.js
7
+ /cli/lib/spree_cli/templates/**
data/.eslintrc ADDED
@@ -0,0 +1,36 @@
1
+ ---
2
+ extends: standard
3
+
4
+ globals:
5
+ Spree: true
6
+ analytics: true
7
+ DOMPurify: true
8
+ flatpickr: true
9
+ Sortable: true
10
+ ga: true
11
+ _: true
12
+ Select2: true
13
+ Handlebars: true
14
+ Raphael: true
15
+ SpreeAPI: true
16
+ SpreePaths: true
17
+ CouponManager: true
18
+ ThumbnailsCarousel: true
19
+ Turbolinks: true
20
+ ADDRESS_FIELDS: true
21
+ AUTH_TOKEN: true
22
+ SPREE_LOCALE: true
23
+ SPREE_CURRENCY: true
24
+ SPREE_DEFAULT_CURRENCY: true
25
+ SPREE_DEFAULT_LOCALE: true
26
+ OAUTH_TOKEN: true
27
+ updateAddressState: true
28
+ formatSelect2Options: true
29
+
30
+ env:
31
+ browser: true
32
+ jquery: true
33
+
34
+ rules:
35
+ space-before-function-paren: off
36
+ semi: off
data/.gem_release.yml ADDED
@@ -0,0 +1,7 @@
1
+
2
+ bump:
3
+ recurse: false
4
+ file: 'frontend/lib/spree/frontend/version.rb'
5
+
6
+ release:
7
+ recurse: true
@@ -0,0 +1 @@
1
+ Please visit [Contributing section](https://dev-docs.spreecommerce.org/contributing/index) of Spree Guides. Thank you!
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: Needs Confirmation
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!--- Provide a general summary of the issue in the Title above -->
11
+
12
+ ## Context
13
+ <!--- Provide a more detailed introduction to the issue itself -->
14
+ <!--- How has this issue affected you? What were you trying to accomplish? -->
15
+
16
+ ## Expected Behavior
17
+ <!--- Tell us what should happen -->
18
+
19
+ ## Actual Behavior
20
+ <!--- Tell us what happens instead -->
21
+
22
+ ## Possible Fix
23
+ <!--- Not obligatory, but suggest a fix or reason for the issue -->
24
+
25
+ ## Steps to Reproduce
26
+ <!--- Provide a link to a live example, or an unambiguous set of steps to -->
27
+ <!--- reproduce this issue include code to reproduce, if relevant -->
28
+ 1.
29
+ 2.
30
+ 3.
31
+ 4.
32
+
33
+ ## Your Environment
34
+ <!--- Include as many relevant details about the environment you experienced the issue in -->
35
+ * Version used:
36
+ * Gemfile and Gemfile.lock as text in a Gist:
37
+ * Any relevant stack traces ("Full trace" preferred):
38
+
39
+ <!--- Please remember to format code using triple backticks (`)
40
+ so that it is neatly formatted when the issue is posted. -->
41
+
42
+ <!--- In 99% of cases, this information is enough to determine the cause and
43
+ solution to the problem that is being described.
44
+
45
+ Any issue that is open for 14 days without actionable information or
46
+ activity will be marked as "stalled" and then closed. Stalled issues
47
+ can be re-opened if the information requested is provided. -->
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: 'New Feature :tada:'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,39 @@
1
+
2
+ <!--- Provide a general summary of the issue in the Title above -->
3
+
4
+ ## Context
5
+ <!--- Provide a more detailed introduction to the issue itself -->
6
+ <!--- How has this issue affected you? What were you trying to accomplish? -->
7
+
8
+ ## Expected Behavior
9
+ <!--- Tell us what should happen -->
10
+
11
+ ## Actual Behavior
12
+ <!--- Tell us what happens instead -->
13
+
14
+ ## Possible Fix
15
+ <!--- Not obligatory, but suggest a fix or reason for the issue -->
16
+
17
+ ## Steps to Reproduce
18
+ <!--- Provide a link to a live example, or an unambiguous set of steps to -->
19
+ <!--- reproduce this issue include code to reproduce, if relevant -->
20
+ 1.
21
+ 2.
22
+ 3.
23
+ 4.
24
+
25
+ ## Your Environment
26
+ <!--- Include as many relevant details about the environment you experienced the issue in -->
27
+ * Version used:
28
+ * Gemfile and Gemfile.lock as text in a Gist:
29
+ * Any relevant stack traces ("Full trace" preferred):
30
+
31
+ <!--- Please remember to format code using triple backticks (`)
32
+ so that it is neatly formatted when the issue is posted. -->
33
+
34
+ <!--- In 99% of cases, this information is enough to determine the cause and
35
+ solution to the problem that is being described.
36
+
37
+ Any issue that is open for 14 days without actionable information or
38
+ activity will be marked as "stalled" and then closed. Stalled issues
39
+ can be re-opened if the information requested is provided. -->
@@ -0,0 +1,32 @@
1
+ version: 2
2
+ 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
data/.gitignore ADDED
@@ -0,0 +1,58 @@
1
+ \#*
2
+ **/*.db
3
+ **/*.log
4
+ **/*.byebug_history
5
+ *~
6
+ .#*
7
+ .DS_Store
8
+ .bundle
9
+ .dotest
10
+ .idea
11
+ .loadpath
12
+ .project
13
+ .vscode
14
+ public/dispatch.cgi
15
+ public/dispatch.fcgi
16
+ public/dispatch.rb
17
+ httpd
18
+ pgsql
19
+ config/*-public.asc
20
+ config/database.yml
21
+ config/mongrel_cluster.yml
22
+ db/*.sql
23
+ db/*.sqlite3*
24
+ db/schema.rb
25
+ doc/**/*
26
+ Gemfile.lock
27
+ */Gemfile.lock
28
+ lib/products_index_profiler.rb
29
+ log/*.log
30
+ pkg
31
+ public/assets
32
+ public/attachments
33
+ public/blank_iframe.html
34
+ public/ckeditora
35
+ sandbox/*
36
+ spree_dev
37
+ spree_test
38
+ testapp
39
+ **/spec/dummy
40
+ tmp
41
+ public/google_base.xml
42
+ public/template_google_base.xml
43
+ coverage/*
44
+ var
45
+ nbproject
46
+ ./vendor
47
+ *.swp
48
+ rerun.txt
49
+ test_app
50
+ .rvmrc
51
+ **/coverage
52
+ */.sass-cache
53
+ .localeapp
54
+ .ruby-gemset
55
+ vendor/bundle
56
+ */vendor/bundle
57
+ .ignore
58
+ TODO