Skip to content

Commit

Permalink
Merge pull request #4494 from nebulab/waiting-for-dev/remove_paypal_f…
Browse files Browse the repository at this point in the history
…rom_the_installer

Remove PayPal as an option during the installation process
waiting-for-dev authored Aug 9, 2022

Verified

This commit was signed with the committer’s verified signature.
Mamaduka George Mamadashvili
2 parents 4e9b6f3 + 1bf1963 commit 4abe9f6
Showing 2 changed files with 1 addition and 31 deletions.
3 changes: 1 addition & 2 deletions bin/sandbox
Original file line number Diff line number Diff line change
@@ -92,8 +92,7 @@ unbundled bin/rails generate solidus:install \
--auto-accept \
--user_class=Spree::User \
--enforce_available_locales=true \
--with_authentication=false \
--payment-method=none
--with_authentication=false
$@

unbundled bin/rails generate solidus:auth:install \
29 changes: 0 additions & 29 deletions core/lib/generators/solidus/install/install_generator.rb
Original file line number Diff line number Diff line change
@@ -8,11 +8,6 @@ module Solidus
class InstallGenerator < Rails::Generators::Base
CORE_MOUNT_ROUTE = "mount Spree::Core::Engine"

PAYMENT_METHODS = {
'paypal' => 'solidus_paypal_commerce_platform',
'none' => nil,
}

class_option :migrate, type: :boolean, default: true, banner: 'Run Solidus migrations'
class_option :seed, type: :boolean, default: true, banner: 'Load seed data (migrations must be run)'
class_option :sample, type: :boolean, default: true, banner: 'Load sample data (migrations must be run)'
@@ -24,11 +19,6 @@ class InstallGenerator < Rails::Generators::Base
class_option :lib_name, type: :string, default: 'spree'
class_option :with_authentication, type: :boolean, default: true
class_option :enforce_available_locales, type: :boolean, default: nil
class_option :payment_method,
type: :string,
enum: PAYMENT_METHODS.keys,
default: PAYMENT_METHODS.keys.first,
desc: "Indicates which payment method to install."

def self.source_paths
paths = superclass.source_paths
@@ -129,25 +119,6 @@ def install_auth_plugin
end
end

def install_payment_method
name = options[:payment_method]

unless options[:auto_accept]
available_names = PAYMENT_METHODS.keys

name = ask("
You can select a payment method to be included in the installation process.
Please select a payment method name:", limited_to: available_names, default: available_names.first)
end

gem_name = PAYMENT_METHODS.fetch(name)

if gem_name
@plugins_to_be_installed << gem_name
@plugin_generators_to_run << "#{gem_name}:install"
end
end

def include_seed_data
append_file "db/seeds.rb", <<-RUBY.strip_heredoc

0 comments on commit 4abe9f6

Please sign in to comment.