diff --git a/Gemfile b/Gemfile index a5e16d2f255..352590f8bc4 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem 'puma', '< 6', require: false gem 'i18n-tasks', '~> 0.9', require: false gem 'rspec_junit_formatter', require: false gem 'yard', require: false +gem 'solidus_sample' # Ensure the requirement is also updated in core/lib/spree/testing_support/factory_bot.rb gem 'factory_bot_rails', '>= 4.8', require: false diff --git a/README.md b/README.md index de8e31294a0..7ee828347d1 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,9 @@ bin/rails db:seed bin/rails spree_sample:load ``` +`solidus_sample` is a development dependency, if you need to run `spree_sample:load` +in production environments, then you have to add it to your local Gemfile `gem 'solidus_sample'`. + There are also options and rake tasks provided by [solidus\_auth\_devise](https://github.com/solidusio/solidus_auth_devise). diff --git a/core/lib/generators/solidus/install/install_generator.rb b/core/lib/generators/solidus/install/install_generator.rb index 937bd5c85b9..59c698808e2 100644 --- a/core/lib/generators/solidus/install/install_generator.rb +++ b/core/lib/generators/solidus/install/install_generator.rb @@ -183,6 +183,11 @@ def install_solidus_admin generate 'solidus_admin:install' end + def install_solidus_sample + say_status :installing, "SolidusSample", :blue + bundle_command 'add solidus_sample --group=development' + end + def install_subcomponents apply_template_for :authentication, @selected_authentication apply_template_for :frontend, @selected_frontend diff --git a/lib/solidus.rb b/lib/solidus.rb index d405536fde3..94d920f944d 100644 --- a/lib/solidus.rb +++ b/lib/solidus.rb @@ -3,4 +3,3 @@ require 'solidus_core' require 'solidus_api' require 'solidus_backend' -require 'solidus_sample' diff --git a/solidus.gemspec b/solidus.gemspec index 4a040ee6acb..82bc4fcb859 100644 --- a/solidus.gemspec +++ b/solidus.gemspec @@ -24,5 +24,6 @@ Gem::Specification.new do |s| s.add_dependency 'solidus_api', s.version s.add_dependency 'solidus_backend', s.version s.add_dependency 'solidus_core', s.version - s.add_dependency 'solidus_sample', s.version + + s.add_development_dependency 'solidus_sample', s.version end