Merge solidus_starter_frontend into the monorepo#6468
Conversation
In the order details page shown for the confirmation step and the order complete page the billing address should be more visually related to the payment.
Also show the payment state, near the payment.
Code readability and (basic) UX improvements
Probably a legacy of an older layout.
For parity with the new card / payment method partials in which the radio buttons are external to the partials provided by the payment methods.
In a real world scenario this would probably hold instructions on where to send the check. This work both as a placeholder and to visually balance the check with other payment methods.
Only useful to remember how the numbers are distributed while testing.
The triple level of radio buttons that was previously used was very confusing and broken. Instead of trying to fix it seems better to present the customer a single list of options for making the payment. The list gives precedence to wallet payments as they require less clicks. If no wallet payments are available the first payment method is selected. Whenever a radio is selected elements from the other list are deselected, giving the illusion of having a single list. Each existing and new payment method have clear and distinct areas for the input label and for the details. This gives more symmetry between existing and new payments partial implementations and a cleaner visual layout.
…anup Payment step cleanup
enable localizing shopping cart review page
feat: localizing cart review page
Otherwise, payment iframes will still be clickable Co-authored-by: Elia Schito <elia@schito.me> Co-authored-by: Francesco Aiello <francesco.aiello@hey.com>
…ointer-events-none-to-disabled-fields Block clicks on disabled form elements
- Only render the currency microdata when the price is present - Keep the cache block in the products grid - Add specs for rendering with/without a taxon Co-Authored-By: Safa <aballaghsafa@gmail.com>
Useful for newly created stores and for testing extensions. Only track coverage on Ruby 3.2 which supports ERB files.
Track spec coverage with codecov
They were commented out for quickly trying out an alternative configuration but never removed before the merge of solidusio#329.
Restore commented out CI jobs
This makes it more consistent and recognizable.
…d-component Turn the product-card partial into a component
Rename spec_helper and allow using the debugger with bin/dev
The specs on `solidus_starter_frontend` were failing due to recent improvements with taxon/taxonomy factories made in the solidus repository, specifically related to: solidusio#4851 This commit updates the specs to be compatible with the latest changes and ensures that the test suite passes successfully.
This attempts to setup code coverage through simplecov when running the storefront specs. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Sofia Besenski <sofia@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
Co-authored-by: Alistair Norman <alistair@super.gd>
If a shipment's inventory units have been destroyed, by some means, then the expression `inventory_units.all?(&:canceled?)` vacuously returns true, since there are no elements to call #canceled? on. Following the logic in the comment at line 217, we can ensure shipments are not considered cancelled unless the order has been cancelled, or all the inventory units exist _and_ have been explicitly cancelled. Comment at time of commit: > Assigns the appropriate +state+ according to the following logic: > > canceled if order is canceled > pending unless order is complete and +order.payment_state+ is +paid+ > shipped if already shipped (ie. does not change the state) > ready all other cases
The previous behaviour would mark these empty shipments as `ready` if the order has been paid. This may cause issues because a shipment is being marked as `ready`, but would never actually be shipped in without inventory units associated. Co-authored-by: Adam Mueller <adam@super.gd>
The method signature of the InMemoryOrderUpdater changed to include the `persist` flag. This would previously raise an ArgumentError after configuring the app to use the InMemoryOrderUpdater, and passing an explicit argument for persist. Co-authored-by: Adam Mueller <adam@super.gd>
We want to support additional keyword arguments to this class and a positional argument interferes with this. Co-authored-by: Jared Norman <jared@super.gd> Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
This association is autosaved, and Rails knows not to retouch things when autosaving associated records. I did a test to confirm that removing this doesn't change whether the field is persisted.
This condition adds a promotion condition that allows store owners to trigger a benefit if the revenue from a defined set of taxons exceeds some value. For example, with this condition we can do things like: If you spend 150 USD on pants, you get a free belt.
This fixes an edge case, a taxon condition without any taxons defined. Prior to this commit, that would error on MySQL and Postgres.
SimpleCov must start before the app is loaded (Ruby's Coverage only tracks files required after Coverage.start), so we load it from the top of the generated spec_helper.rb rather than from spec/support, which is required after rails_helper has already (eager-)loaded the app.
None of the paypal controllers in this extension had tests, which is causing the code coverage to be under the solidus required limit. This should get us to the minimum 89% code coverage to get the build green. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Alistair Norman <alistair@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
6044fa3 to
61a70e8
Compare
|
|
||
| if (termsCheckbox) { | ||
| const form = termsCheckbox.closest('form'); | ||
| const submitButton = form.querySelector('[type="submit"]'); |
There was a problem hiding this comment.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
| const termsCheckbox = document.getElementById('accept_terms_and_conditions'); | ||
|
|
||
| if (termsCheckbox) { | ||
| const form = termsCheckbox.closest('form'); |
There was a problem hiding this comment.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
| }; | ||
|
|
||
| window.addEventListener('DOMContentLoaded', () => { | ||
| const termsCheckbox = document.getElementById('accept_terms_and_conditions'); |
There was a problem hiding this comment.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
| }); | ||
| }; | ||
|
|
||
| window.addEventListener('DOMContentLoaded', () => { |
There was a problem hiding this comment.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
| const form = document.querySelector('form.edit_order'); | ||
| form.addEventListener('submit', () => { | ||
| const elements = form.querySelectorAll('[type="submit"], [type="image"]'); | ||
| elements.forEach(element => { |
There was a problem hiding this comment.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
| def load_log_entries | ||
| @all_log_entries = Spree::LogEntry | ||
| .where(source: @payment) | ||
| .or(Spree::LogEntry.where(source: @payment.refunds)) |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .or with Spree::LogEntry on line 107.
|
|
||
| def load_log_entries | ||
| @all_log_entries = Spree::LogEntry | ||
| .where(source: @payment) |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .where with Spree::LogEntry on line 107.
| if gem_version && !gem_version.prerelease? | ||
| "v#{gem_version.segments[0, 2].join(".")}" | ||
| else | ||
| "main" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| ref = | ||
| if gem_version && !gem_version.prerelease? | ||
| "v#{gem_version.segments[0, 2].join(".")}" |
There was a problem hiding this comment.
Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
| template = | ||
| ENV["SOLIDUS_STOREFRONT_TEMPLATE"] || | ||
| begin | ||
| version = Spree.solidus_version if defined?(Spree) && Spree.respond_to?(:solidus_version) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [93/80]
| # frozen_string_literal: true | ||
|
|
||
| template = | ||
| ENV["SOLIDUS_STOREFRONT_TEMPLATE"] || |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| shipments = Spree::Config.stock.coordinator_class.new(@order, @reimbursement_objects.map(&:build_exchange_inventory_unit)).shipments | ||
| shipments = Spree::Config.stock.coordinator_class.new( | ||
| @order, | ||
| inventory_units: @reimbursement_objects.map(&:build_exchange_inventory_unit) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [86/80]
| inventory_units = Spree::Config.stock.inventory_unit_builder_class.new(self).missing_units_for_line_item(line_item) | ||
|
|
||
| Spree::Config.stock.coordinator_class.new(self, units).shipments.each do |shipment| | ||
| Spree::Config.stock.coordinator_class.new(self, inventory_units:).shipments.each do |shipment| |
There was a problem hiding this comment.
Lint/Syntax: unexpected token tRPAREN
| (line_item.variant.product.classifications.map(&:taxon_id) & taxon_and_descendant_ids).any? | ||
| end | ||
| end | ||
| matching.sum(&:discounted_amount).public_send(OPERATORS.fetch(preferred_operator), preferred_amount) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [108/80]
| def order_eligible?(order, _options = {}) | ||
| matching = order.line_items.select do |line_item| | ||
| taxon_ids_with_children.any? do |taxon_and_descendant_ids| | ||
| (line_item.variant.product.classifications.map(&:taxon_id) & taxon_and_descendant_ids).any? |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [103/80]
| module SolidusPromotions | ||
| module InMemoryOrderUpdaterPatch | ||
| # This is only needed for stores upgrading from the legacy promotion system. | ||
| # Once we've removed support for the legacy promotion system, we can remove this. |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [85/80]
| # frozen_string_literal: true | ||
|
|
||
| module SolidusPromotions | ||
| module InMemoryOrderUpdaterPatch |
There was a problem hiding this comment.
Style/Documentation: Missing top-level module documentation comment.
| "SolidusPromotions::Conditions::PriceTaxon", | ||
| "SolidusPromotions::Conditions::PriceOptionValue" | ||
| "SolidusPromotions::Conditions::PriceOptionValue", | ||
| "SolidusPromotions::Conditions::TaxonRevenue" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| "SolidusPromotions::Conditions::PriceProduct", | ||
| "SolidusPromotions::Conditions::PriceTaxon", | ||
| "SolidusPromotions::Conditions::PriceOptionValue" | ||
| "SolidusPromotions::Conditions::PriceOptionValue", |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| require "rails_helper" | ||
|
|
||
| RSpec.describe SolidusPromotions::Conditions::TaxonRevenue do | ||
| subject(:condition) { described_class.new(preferred_amount:, taxons: [matching_taxon]) } |
There was a problem hiding this comment.
Lint/Syntax: unexpected token tCOMMA
Lint/Syntax: unexpected token tRPAREN
| gem "guard-shell" | ||
|
|
||
| gem "codecov" | ||
| gem "simplecov", "~> 0.22" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "guard" | ||
| gem "guard-shell" | ||
|
|
||
| gem "codecov" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false | ||
| gem "guard" | ||
| gem "guard-shell" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false | ||
| gem "guard" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "state_machines", "<= 0.6" | ||
|
|
||
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| next unless path.end_with?(".erb") | ||
|
|
||
| # Remove the extra trailing lines added by ERB | ||
| coverage[:lines] = coverage[:lines][...File.read(path).lines.size] |
There was a problem hiding this comment.
Lint/Syntax: unexpected token tDOT3
Lint/Syntax: unexpected token tRBRACK
| out https://solidus.io/security. | ||
| TEXT | ||
|
|
||
| say_status :RECOMMENDED, set_color(message.tr("\n", " "), :yellow), :yellow |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| generate "rspec:install" | ||
| end | ||
|
|
||
| with_log["security advisory"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| with_log["setting up rspec"] do | ||
| generate "rspec:install" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gsub_file "app/assets/stylesheets/application.css", "*= require_tree", "* OFF require_tree" | ||
| end | ||
|
|
||
| with_log["setting up rspec"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "guard-shell" | ||
|
|
||
| gem "codecov" | ||
| gem "simplecov", "~> 0.22" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "guard" | ||
| gem "guard-shell" | ||
|
|
||
| gem "codecov" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false | ||
| gem "guard" | ||
| gem "guard-shell" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false | ||
| gem "guard" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "state_machines", "<= 0.6" | ||
|
|
||
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| next unless path.end_with?(".erb") | ||
|
|
||
| # Remove the extra trailing lines added by ERB | ||
| coverage[:lines] = coverage[:lines][...File.read(path).lines.size] |
There was a problem hiding this comment.
Lint/Syntax: unexpected token tDOT3
Lint/Syntax: unexpected token tRBRACK
| out https://solidus.io/security. | ||
| TEXT | ||
|
|
||
| say_status :RECOMMENDED, set_color(message.tr("\n", " "), :yellow), :yellow |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| generate "rspec:install" | ||
| end | ||
|
|
||
| with_log["security advisory"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| with_log["setting up rspec"] do | ||
| generate "rspec:install" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gsub_file "app/assets/stylesheets/application.css", "*= require_tree", "* OFF require_tree" | ||
| end | ||
|
|
||
| with_log["setting up rspec"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "guard-shell" | ||
|
|
||
| gem "codecov" | ||
| gem "simplecov", "~> 0.22" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "guard" | ||
| gem "guard-shell" | ||
|
|
||
| gem "codecov" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false | ||
| gem "guard" | ||
| gem "guard-shell" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false | ||
| gem "guard" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "state_machines", "<= 0.6" | ||
|
|
||
| group :development do | ||
| gem "benchmark", "~> 0.5", require: false |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| next unless path.end_with?(".erb") | ||
|
|
||
| # Remove the extra trailing lines added by ERB | ||
| coverage[:lines] = coverage[:lines][...File.read(path).lines.size] |
There was a problem hiding this comment.
Lint/Syntax: unexpected token tDOT3
Lint/Syntax: unexpected token tRBRACK
| out https://solidus.io/security. | ||
| TEXT | ||
|
|
||
| say_status :RECOMMENDED, set_color(message.tr("\n", " "), :yellow), :yellow |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| generate "rspec:install" | ||
| end | ||
|
|
||
| with_log["security advisory"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| with_log["setting up rspec"] do | ||
| generate "rspec:install" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gsub_file "app/assets/stylesheets/application.css", "*= require_tree", "* OFF require_tree" | ||
| end | ||
|
|
||
| with_log["setting up rspec"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| with_log["patching asset files"] do | ||
| append_file "config/initializers/assets.rb", "Rails.application.config.assets.precompile += ['solidus_storefront_manifest.js']" | ||
| append_file "config/initializers/assets.rb", "\nRails.application.config.assets.paths << Rails.root.join('app', 'assets', 'stylesheets', 'fonts')" | ||
| gsub_file "app/assets/stylesheets/application.css", "*= require_tree", "* OFF require_tree" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [93/80]
|
|
||
| with_log["patching asset files"] do | ||
| append_file "config/initializers/assets.rb", "Rails.application.config.assets.precompile += ['solidus_storefront_manifest.js']" | ||
| append_file "config/initializers/assets.rb", "\nRails.application.config.assets.paths << Rails.root.join('app', 'assets', 'stylesheets', 'fonts')" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [148/80]
| end | ||
|
|
||
| with_log["patching asset files"] do | ||
| append_file "config/initializers/assets.rb", "Rails.application.config.assets.precompile += ['solidus_storefront_manifest.js']" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [129/80]
| ROBOTS | ||
| end | ||
|
|
||
| with_log["patching asset files"] do |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| RUBY | ||
| end | ||
|
|
||
| append_file "public/robots.txt", <<-ROBOTS.strip_heredoc |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| # Allows to skip frontend specs generation from extensions CI pipelines | ||
| if ENV.fetch("FRONTEND_SPECS", "all") == "all" | ||
| directory "spec", verbose: false |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| RUBY | ||
|
|
||
| # Allows to skip frontend specs generation from extensions CI pipelines | ||
| if ENV.fetch("FRONTEND_SPECS", "all") == "all" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| insert_into_file "config/environments/test.rb", "\n config.assets.css_compressor = nil\n", after: "config.active_support.deprecation = :stderr" | ||
| insert_into_file "config/environments/development.rb", "\n config.assets.css_compressor = nil\n", after: "config.active_support.deprecation = :log" | ||
|
|
||
| append_file "config/initializers/devise.rb", <<~RUBY |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| rake "tailwindcss:install" | ||
|
|
||
| insert_into_file "config/environments/test.rb", "\n config.assets.css_compressor = nil\n", after: "config.active_support.deprecation = :stderr" | ||
| insert_into_file "config/environments/development.rb", "\n config.assets.css_compressor = nil\n", after: "config.active_support.deprecation = :log" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [150/80]
| create_file "app/assets/builds/tailwind.css" | ||
| rake "tailwindcss:install" | ||
|
|
||
| insert_into_file "config/environments/test.rb", "\n config.assets.css_compressor = nil\n", after: "config.active_support.deprecation = :stderr" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [146/80]
This will allow us to run feature specs headless by just overriding the CAPYBARA_DRIVER ENV variable by passing `selenium_chrome` as the driver. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Alistair Norman <alistair@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
The specs we copied didn't really add any coverage to the PayPal controllers in the extension, so this change starts work on actually testing the PayPal flow.
9601a86 to
b7f4ad6
Compare
| copy_file "config/routes/storefront.rb" | ||
| copy_file "config/tailwind.config.js" | ||
| create_file "app/assets/builds/tailwind.css" | ||
| rake "tailwindcss:install" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| copy_file "config/initializers/solidus_auth_devise_unauthorized_redirect.rb" | ||
| copy_file "config/routes/storefront.rb" | ||
| copy_file "config/tailwind.config.js" | ||
| create_file "app/assets/builds/tailwind.css" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| copy_file "config/importmap.rb" | ||
| copy_file "config/initializers/solidus_auth_devise_unauthorized_redirect.rb" | ||
| copy_file "config/routes/storefront.rb" | ||
| copy_file "config/tailwind.config.js" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| copy_file "config/importmap.rb" | ||
| copy_file "config/initializers/solidus_auth_devise_unauthorized_redirect.rb" | ||
| copy_file "config/routes/storefront.rb" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| directory "public", "public" | ||
|
|
||
| copy_file "config/importmap.rb" | ||
| copy_file "config/initializers/solidus_auth_devise_unauthorized_redirect.rb" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "ffaker", "~> 2.13" | ||
| gem "rubocop", "~> 1.0" | ||
| gem "rubocop-performance", "~> 1.5" | ||
| gem "rubocop-rails", "~> 2.3" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "factory_bot_rails" | ||
| gem "ffaker", "~> 2.13" | ||
| gem "rubocop", "~> 1.0" | ||
| gem "rubocop-performance", "~> 1.5" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "factory_bot", ">= 4.8" | ||
| gem "factory_bot_rails" | ||
| gem "ffaker", "~> 2.13" | ||
| gem "rubocop", "~> 1.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| gem "factory_bot", ">= 4.8" | ||
| gem "factory_bot_rails" | ||
| gem "ffaker", "~> 2.13" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "rspec-activemodel-mocks", "~> 1.1.0" | ||
|
|
||
| gem "factory_bot", ">= 4.8" | ||
| gem "factory_bot_rails" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "rails-controller-testing", "~> 1.0.5" | ||
| gem "rspec-activemodel-mocks", "~> 1.1.0" | ||
|
|
||
| gem "factory_bot", ">= 4.8" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem_group :development, :test do | ||
| gem "rspec-rails" | ||
| gem "rails-controller-testing", "~> 1.0.5" | ||
| gem "rspec-activemodel-mocks", "~> 1.1.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| gem_group :development, :test do | ||
| gem "rspec-rails" | ||
| gem "rails-controller-testing", "~> 1.0.5" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| gem_group :development, :test do | ||
| gem "rspec-rails" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "capybara-screenshot", "~> 1.0" | ||
|
|
||
| gem "simplecov", require: false | ||
| gem "simplecov-cobertura", require: false |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "tailwindcss-rails", "~> 3.0" | ||
|
|
||
| gem_group :test do | ||
| # We need to add capybara along with a javascript driver to support the provided system specs. |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [98/80]
| gem "responders" | ||
| gem "solidus_support", ">= 0.12.0" | ||
| gem "view_component", "~> 3.0" | ||
| gem "tailwindcss-rails", "~> 3.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| gem "responders" | ||
| gem "solidus_support", ">= 0.12.0" | ||
| gem "view_component", "~> 3.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| gem "responders" | ||
| gem "solidus_support", ">= 0.12.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| generate "solidus:auth:install" | ||
| end | ||
|
|
||
| gem "responders" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "rails-controller-testing", "~> 1.0.5" | ||
| gem "rspec-activemodel-mocks", "~> 1.1.0" | ||
|
|
||
| gem "factory_bot", ">= 4.8" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem_group :development, :test do | ||
| gem "rspec-rails" | ||
| gem "rails-controller-testing", "~> 1.0.5" | ||
| gem "rspec-activemodel-mocks", "~> 1.1.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| gem_group :development, :test do | ||
| gem "rspec-rails" | ||
| gem "rails-controller-testing", "~> 1.0.5" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| gem_group :development, :test do | ||
| gem "rspec-rails" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "capybara-screenshot", "~> 1.0" | ||
|
|
||
| gem "simplecov", require: false | ||
| gem "simplecov-cobertura", require: false |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| gem "tailwindcss-rails", "~> 3.0" | ||
|
|
||
| gem_group :test do | ||
| # We need to add capybara along with a javascript driver to support the provided system specs. |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [98/80]
| gem "responders" | ||
| gem "solidus_support", ">= 0.12.0" | ||
| gem "view_component", "~> 3.0" | ||
| gem "tailwindcss-rails", "~> 3.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| gem "responders" | ||
| gem "solidus_support", ">= 0.12.0" | ||
| gem "view_component", "~> 3.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| gem "responders" | ||
| gem "solidus_support", ">= 0.12.0" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| generate "solidus:auth:install" | ||
| end | ||
|
|
||
| gem "responders" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| with_log["installing gems"] do | ||
| unless Bundler.locked_gems.dependencies["solidus_auth_devise"] | ||
| bundle_command "add solidus_auth_devise" | ||
| generate "solidus:auth:install" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| with_log["installing gems"] do | ||
| unless Bundler.locked_gems.dependencies["solidus_auth_devise"] | ||
| bundle_command "add solidus_auth_devise" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| end | ||
|
|
||
| with_log["installing gems"] do | ||
| unless Bundler.locked_gems.dependencies["solidus_auth_devise"] |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| source_paths.unshift(templates_dir) | ||
| end | ||
|
|
||
| with_log["installing gems"] do |
There was a problem hiding this comment.
Metrics/BlockLength: Block has too many lines. [29/25]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| templates_dir = Pathname.new(repo_dir).join("storefront", "templates") | ||
| else | ||
| templates_dir = Pathname.new(File.dirname(__FILE__)).join("templates") |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| unless match | ||
| say_status :error, shell.set_color( | ||
| "Could not parse storefront template URL: #{__FILE__}\n" \ | ||
| "Expected shape: https://github.com/<owner>/<repo>/raw/<ref>/storefront/template.rb", |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [93/80]
| if __FILE__.match?(%r{\Ahttps?://}) | ||
| require "uri" | ||
| url_path = URI.parse(__FILE__).path | ||
| match = url_path.match(%r{\A/([^/]+)/([^/]+)/raw/(.+?)/starter_frontend/template\.rb\z}) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [92/80]
| require "securerandom" | ||
|
|
||
| if __FILE__.match?(%r{\Ahttps?://}) | ||
| require "uri" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| # In that case, use `git clone` to download them to a local temporary dir. | ||
| with_log["fetching remote templates"] do | ||
| require "shellwords" | ||
| require "securerandom" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| # invoked remotely via HTTP, that means the files are not present locally. | ||
| # In that case, use `git clone` to download them to a local temporary dir. | ||
| with_log["fetching remote templates"] do | ||
| require "shellwords" |
There was a problem hiding this comment.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Summary
As the Starter Frontend has replace solidus_frontend as the primary frontend of Solidus, we want to bring it into monorepo. This helps centralize the maintenance of the project and surface compatibility issues as early as possible.
I have chosen to preserve the whole history of the project, so the PR looks a little scary. In reality, only the merge commit that merges the other history in and subsequent commits need to be reviewed.