Class: SolidusTaxCloud::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SolidusTaxCloud::Generators::InstallGenerator
- Defined in:
- lib/generators/solidus_tax_cloud/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_migrations ⇒ Object
15 16 17 |
# File 'lib/generators/solidus_tax_cloud/install/install_generator.rb', line 15 def add_migrations run 'bin/rails railties:install:migrations FROM=solidus_tax_cloud' end |
#copy_initializer_file ⇒ Object
11 12 13 |
# File 'lib/generators/solidus_tax_cloud/install/install_generator.rb', line 11 def copy_initializer_file template 'ca-bundle.crt', "#{file_name}/lib/ca-bundle.crt" end |
#run_migrations ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/generators/solidus_tax_cloud/install/install_generator.rb', line 19 def run_migrations run_migrations = [:auto_run_migrations] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]')) # rubocop:disable Metrics/LineLength if run_migrations run 'bin/rails db:migrate' else puts 'Skipping bin/rails db:migrate, don\'t forget to run it!' # rubocop:disable Rails/Output end end |