Class: MagickPen::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- MagickPen::InstallGenerator
- Defined in:
- lib/generators/magick_pen/install_generator.rb
Instance Method Summary collapse
- #check_paper_trail ⇒ Object
- #finished ⇒ Object
- #install_migrations ⇒ Object
- #install_npm ⇒ Object
- #run_migrations ⇒ Object
- #start ⇒ Object
Instance Method Details
#check_paper_trail ⇒ Object
12 13 14 15 16 17 |
# File 'lib/generators/magick_pen/install_generator.rb', line 12 def check_paper_trail puts "Paper Trail Install...." Dir.chdir(Rails.root) do `bundle exec rails generate paper_trail:install` end end |
#finished ⇒ Object
37 38 39 40 |
# File 'lib/generators/magick_pen/install_generator.rb', line 37 def finished puts "\n" + ("*" * 80) puts "Done! Magick Pen has been successfully installed." end |
#install_migrations ⇒ Object
19 20 21 22 23 24 |
# File 'lib/generators/magick_pen/install_generator.rb', line 19 def install_migrations puts "Copying over Magick Pen migrations..." Dir.chdir(Rails.root) do `bundle exec rake magick_pen_engine:install:migrations` end end |
#install_npm ⇒ Object
32 33 34 35 |
# File 'lib/generators/magick_pen/install_generator.rb', line 32 def install_npm puts "Running npm install vue_magick_pen" `npm install vue-magick-pen` end |
#run_migrations ⇒ Object
26 27 28 29 30 |
# File 'lib/generators/magick_pen/install_generator.rb', line 26 def run_migrations return unless ["with-migrate"] puts "Running rake db:migrate" `bundle exec rake db:migrate` end |
#start ⇒ Object
7 8 9 10 |
# File 'lib/generators/magick_pen/install_generator.rb', line 7 def start puts "Start installing Magick Pen..." puts "*" * 80 + "\n" end |