Skip to content
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

Rename the installation generator to solidus:install #3538

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Mar 3, 2020

Description

With this change, we can provide a better experience to first-time users and avoid some confusion in the initial steps of onboarding.

This is not a breaking change since the install process is done only when installing Solidus and existing users won't re-run this command again. Also, the old generator has been kept, and it prints a deprecation warning if ran.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • [ ] I have added tests to cover this change (if needed)
  • [ ] I have attached screenshots to this PR for visual changes (if needed)

@kennyadsl kennyadsl self-assigned this Mar 3, 2020
With this change we can provide a better experience to first-time
users and avoid some confusion in the initial steps of onboarding.

This is not a breaking change since the install process is done
only when installing Solidus and existing users won't re-run this
command again.
This allows the old generator to continue working and
it will print a deprecation warning at the end of the
process to inform users that they need to switch to the
new generator.

I think that currently this is only used into other extensions
or support gems, like solidus_dev_support.
@kennyadsl kennyadsl force-pushed the kennyadsl/solidus-install branch from f670032 to 854e51c Compare March 4, 2020 10:21
@kennyadsl kennyadsl marked this pull request as ready for review March 4, 2020 10:23
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kennyadsl thanks!

@kennyadsl kennyadsl merged commit b62fed3 into solidusio:master Mar 5, 2020
@kennyadsl kennyadsl deleted the kennyadsl/solidus-install branch March 5, 2020 09:10
@imgarylai
Copy link

imgarylai commented May 20, 2020

I'm using 2.10.1 but the generator could not be found. It is not really painful because I use the old command to install and everything works fine.

Here is my config.

I just init a Rails app and put gem 'solidus in the Gemfile.

$ rails g solidus:install 
Running via Spring preloader in process 22925
Could not find generator 'solidus:install'. 
Run `rails generate --help` for more options.

Here is my Gemfile

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.6'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '~> 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'solidus'

Ruby and Rails version

$ rails -v
Rails 6.0.3.1
$ ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]

Generators I have(looks like it still uses the old one)

$ rails generate --help
Running via Spring preloader in process 22816
Usage: rails generate GENERATOR [args] [options]

General options:
  -h, [--help]     # Print generator's options and usage
  -p, [--pretend]  # Run but do not make any changes
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -q, [--quiet]    # Suppress status output

Please choose a generator below.

Rails:
  application_record
  assets
  channel
  controller
  generator
  helper
  integration_test
  jbuilder
  job
  mailbox
  mailer
  migration
  model
  resource
  responders_controller
  scaffold
  scaffold_controller
  system_test
  task

ActiveRecord:
  active_record:application_record

Cancan:
  cancan:ability

CanonicalRails:
  canonical_rails:install

Coffee:
  coffee:assets

FriendlyId:
  friendly_id

Kaminari:
  kaminari:config
  kaminari:views

Paperclip:
  paperclip

Responders:
  responders:install

Solidus:
  solidus:views:override

Spree:
  spree:custom_user
  spree:dummy
  spree:install

TestUnit:
  test_unit:channel
  test_unit:generator
  test_unit:mailbox
  test_unit:plugin

@kennyadsl
Copy link
Member Author

Hey there, for solidus <= 2.10 the generator is called spree:install, see #3562.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants