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

Fix the standard generator alias and remove interactivity from seeds #233

Merged
merged 5 commits into from
Oct 25, 2022

Conversation

elia
Copy link
Member

@elia elia commented Oct 3, 2022

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.

@elia elia force-pushed the elia/fix-the-standard-generator branch from 7fac630 to e928671 Compare October 10, 2022 16:19
Only install the browser we actually use and save time.
@elia elia force-pushed the elia/fix-the-standard-generator branch 2 times, most recently from 0260e6a to 19cdeae Compare October 17, 2022 17:44
elia added 2 commits October 18, 2022 15:52
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.
@elia elia force-pushed the elia/fix-the-standard-generator branch 2 times, most recently from bd6772a to 8e4db0b Compare October 19, 2022 09:02
@elia elia changed the title Fix the standard generator alias Fix the standard generator alias and remove interactivity from seeds Oct 19, 2022
@elia elia requested a review from jarednorman October 19, 2022 09:13
@elia
Copy link
Member Author

elia commented Oct 19, 2022

@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
Copy link
Member

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?

Copy link
Member Author

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.

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)"
Copy link
Member

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.

else
puts 'No admin user created.'
end
warn "There were some problems with persisting a new admin user:"
Copy link
Member

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.

elia added 2 commits October 20, 2022 13:09
- Stop asking for input when running seeds
- Ask for everything upfront in the installer
- Add options for setting the admin email/password
@elia elia force-pushed the elia/fix-the-standard-generator branch from 8e4db0b to 720907e Compare October 20, 2022 11:09
@elia elia requested a review from kennyadsl October 20, 2022 11:09
@kennyadsl kennyadsl merged commit f82140f into solidusio:master Oct 25, 2022
@kennyadsl kennyadsl deleted the elia/fix-the-standard-generator branch October 25, 2022 15:03
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.

3 participants