Class: Kaal::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Kaal::Generators::InstallGenerator
- Defined in:
- lib/generators/kaal/install_generator.rb
Overview
Installs Kaal scheduler config and Active Record migrations into a Rails app.
Instance Method Summary collapse
Instance Method Details
#install_kaal ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/generators/kaal/install_generator.rb', line 15 def install_kaal results = Kaal::Rails.install!(root: destination_root, backend: selected_backend) scheduler_config = results.fetch(:scheduler_config) say_status(scheduler_config.fetch(:status), scheduler_config.fetch(:path)) results.fetch(:migrations).each do |migration| say_status(migration.fetch(:status), migration.fetch(:path)) end end |