Skip to content

Commit

Permalink
Moving solidus_sample to be development dependency
Browse files Browse the repository at this point in the history
Solidus Sample gem includes seed data to setup local development in
an easy way, it includes catalogs for countries, states, products,
taxonomies/taxons and images. This gem itself needs about 10mb of disk
space and most of the times it is only needed in local development
or one time.
  • Loading branch information
softr8 committed Jan 11, 2024
1 parent 64f6a58 commit 6eb253e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
5 changes: 5 additions & 0 deletions core/lib/generators/solidus/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Check warning on line 188 in core/lib/generators/solidus/install/install_generator.rb

View check run for this annotation

Codecov / codecov/patch

core/lib/generators/solidus/install/install_generator.rb#L187-L188

Added lines #L187 - L188 were not covered by tests
end

def install_subcomponents
apply_template_for :authentication, @selected_authentication
apply_template_for :frontend, @selected_frontend
Expand Down
1 change: 0 additions & 1 deletion lib/solidus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
require 'solidus_core'
require 'solidus_api'
require 'solidus_backend'
require 'solidus_sample'
3 changes: 2 additions & 1 deletion solidus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6eb253e

Please sign in to comment.