Class: Solidus::InstallGenerator::SupportSolidusFrontendExtraction

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/solidus/install/install_generator/support_solidus_frontend_extraction.rb

Overview

Helper for extracting solidus_frontend from solidus meta-gem

We’re recommending users use newer solidus_starter_frontend. However, we’re still shipping solidus_frontend as part of the solidus meta-gem. The reason is that we don’t want users updating previous versions to see its storefront gone suddenly.

In future solidus releases, solidus_frontend won’t be a component anymore. However, until that happens:

  • For users of the new frontend, we need to prevent pulling

solidus_frontend.

  • For users of the legacy frontend, we need to prevent Bundler from

resolving it from the mono-repo while it’s still there.

This class is a needed companion during the deprecation path. It’ll modify the user’s Gemfile, breaking the solidus gem down into its components but solidus_frontend.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bundler_context:) ⇒ SupportSolidusFrontendExtraction

Returns a new instance of SupportSolidusFrontendExtraction.



26
27
28
# File 'lib/generators/solidus/install/install_generator/support_solidus_frontend_extraction.rb', line 26

def initialize(bundler_context:)
  @bundler_context = bundler_context
end

Instance Attribute Details

#bundler_contextObject (readonly)

Returns the value of attribute bundler_context.



24
25
26
# File 'lib/generators/solidus/install/install_generator/support_solidus_frontend_extraction.rb', line 24

def bundler_context
  @bundler_context
end

Instance Method Details

#callObject



30
31
32
33
34
# File 'lib/generators/solidus/install/install_generator/support_solidus_frontend_extraction.rb', line 30

def call
  return unless needs_to_break_down_solidus_meta_gem?

  break_down_solidus_meta_gem
end