Class: Spree::Auth::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Spree::Auth::Generators::InstallGenerator
- Defined in:
- lib/generators/spree/auth/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_paths ⇒ Object
7 8 9 10 11 |
# File 'lib/generators/spree/auth/install/install_generator.rb', line 7 def self.source_paths paths = superclass.source_paths paths << File.('../templates', __FILE__) paths.flatten end |
Instance Method Details
#add_migrations ⇒ Object
18 19 20 |
# File 'lib/generators/spree/auth/install/install_generator.rb', line 18 def add_migrations run 'bundle exec rake railties:install:migrations FROM=spree_auth' end |
#generate_devise_key ⇒ Object
13 14 15 16 |
# File 'lib/generators/spree/auth/install/install_generator.rb', line 13 def generate_devise_key return if ENV['CI'] template 'config/initializers/devise.rb', 'config/initializers/devise.rb' end |
#run_migrations ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/generators/spree/auth/install/install_generator.rb', line 22 def run_migrations if [:migrate] run 'bundle exec rake db:migrate VERBOSE=false' else puts "Skiping rake db:migrate, don't forget to run it!" end end |