New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove frontend routes from core #8172

Merged
merged 4 commits into from Jul 27, 2017

Conversation

Projects
None yet
3 participants
@damianlegawiec
Member

damianlegawiec commented Jul 26, 2017

Frontend-specific routes should be part of the spree_frontend to not clash with any developer-defined routes when frontend isn't used.

This was introduced in f9c40b7 .

Also adding Spree::Core::Engine component specific chekers like frontend_available?, backend_available?, api_available?

@damianlegawiec damianlegawiec requested a review from symarys Jul 26, 2017

end
def self.frontend_available?
@@frontend_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Frontend::Engine')

This comment has been minimized.

@houndci-bot

houndci-bot Jul 26, 2017

Space missing to the left of {.
Line is too long. [135/120]

@houndci-bot

houndci-bot Jul 26, 2017

Space missing to the left of {.
Line is too long. [135/120]

end
def self.backend_available?
@@backend_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Backend::Engine')

This comment has been minimized.

@houndci-bot

houndci-bot Jul 26, 2017

Space missing to the left of {.
Line is too long. [133/120]

@houndci-bot

houndci-bot Jul 26, 2017

Space missing to the left of {.
Line is too long. [133/120]

module Core
class Engine < ::Rails::Engine
def self.api_available?
@@api_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Api::Engine')

This comment has been minimized.

@houndci-bot

houndci-bot Jul 26, 2017

Space missing to the left of {.
Line is too long. [125/120]

@houndci-bot

houndci-bot Jul 26, 2017

Space missing to the left of {.
Line is too long. [125/120]

@@ -0,0 +1,17 @@
module Spree

This comment has been minimized.

@houndci-bot

houndci-bot Jul 26, 2017

Missing magic comment # frozen_string_literal: true.

@houndci-bot

houndci-bot Jul 26, 2017

Missing magic comment # frozen_string_literal: true.

@@ -1,5 +1,9 @@
Spree::Core::Engine.add_routes do
root to: 'home#index'
resources :products, only: [:index, :show]

This comment has been minimized.

@houndci-bot

houndci-bot Jul 26, 2017

Use %i or %I for an array of symbols.

@houndci-bot

houndci-bot Jul 26, 2017

Use %i or %I for an array of symbols.

@symarys symarys merged commit a9f7ad3 into spree:master Jul 27, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
hound 8 violations found.

@symarys symarys deleted the spark-solutions:hotfix/frontend-routes-in-mailers branch Jul 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment