-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Fix the standard generator alias and remove interactivity from seeds #233
Fix the standard generator alias and remove interactivity from seeds #233
Conversation
7fac630
to
e928671
Compare
Only install the browser we actually use and save time.
0260e6a
to
19cdeae
Compare
This generator is here for anyone trying to run th standard `bin/rails g solidus_auth_devise:install`. Turns out that assigning to another constant is not enough and we need to proxy it more explicitly.
bd6772a
to
8e4db0b
Compare
@jarednorman I sent another review-request your way as I had to heavily change a couple of things chasing a green CI for older solidus versions 🙏 |
@@ -1,7 +1,3 @@ | |||
# frozen_string_literal: true | |||
|
|||
require 'spree/auth/engine' | |||
|
|||
module SolidusAuthDevise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember the exact error/context, but defining it in different files didn't always worked, keeping everything in one place instead ensures a more consistent experience.
Overtime, once we start to move tools to the new namespace we might be able to switch the two and finally deprecate Spree::Auth
.
db/default/users.rb
Outdated
puts "Creating admin user with:" | ||
puts " - email: #{email}" | ||
puts " - password: #{password}" | ||
puts "(please use the ADMIN_EMAIL and ADMIN_PASSWORD environment variables to control how the default admin user is create)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create
-> created
. But at this point, isn't too late to control that? I think that this message might be confusing also if people might think that they should change it after the installer runs.
db/default/users.rb
Outdated
else | ||
puts 'No admin user created.' | ||
end | ||
warn "There were some problems with persisting a new admin user:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use creating
instead of persisting
. It could be new to some less experienced users.
- Stop asking for input when running seeds - Ask for everything upfront in the installer - Add options for setting the admin email/password
8e4db0b
to
720907e
Compare
This generator is here for anyone trying to run th standard
bin/rails g solidus_auth_devise:install
. Turns out that assigning to another constant is not enough and we need to proxy it more explicitly.