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

Remove automatic propagation of generators options #5011

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
bundle_command 'add solidus_bolt'
end

generate 'solidus_bolt:install'
generate "solidus_bolt:install --auto-run-migrations=#{options[:migrate]}"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
bundle_command 'add solidus_braintree --version "~> 3.0"'
end

generate 'solidus_braintree:install'
generate "solidus_braintree:install --migrate=#{options[:migrate]}"
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
say_status :warning, "Support for frontends other than `solidus_frontend` by `solidus_paypal_commerce_platform` is still in progress.", :yellow
end

if @selected_frontend == 'classic'
version = '< 1'
migrations_flag = options[:migrate] ? '--auto-run-migrations' : '--skip-migrations'
else
version = '~> 1.0'
migrations_flag = "--migrate=#{options[:migrate]}"
end

unless Bundler.locked_gems.dependencies['solidus_paypal_commerce_platform']
version = @selected_frontend == 'classic' ? '< 1' : '~> 1.0'
bundle_command "add solidus_paypal_commerce_platform --version='#{version}'"
end

generate 'solidus_paypal_commerce_platform:install'
generate "solidus_paypal_commerce_platform:install #{migrations_flag}"
6 changes: 0 additions & 6 deletions core/lib/generators/solidus/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,6 @@ def complete

private

def generate(what, *args, abort_on_failure: true)
args << '--auto-accept' if options[:auto_accept]
args << '--auto-run-migrations' if options[:migrate]
super(what, *args, abort_on_failure: abort_on_failure)
end

def bundle_command(command, env = {})
# Make `bundle install` less verbose by skipping the "Using ..." messages
super(command, env.reverse_merge('BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES' => 'true'))
Expand Down