Class: ChronoForge::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration, Generators::MigrationActions
Defined in:
lib/generators/chrono_forge/install/install_generator.rb

Overview

Installs all ChronoForge migrations into a new application. Idempotent: migrations that already exist are skipped, so re-running is safe.

Constant Summary

Constants included from Generators::MigrationActions

Generators::MigrationActions::MIGRATIONS

Instance Method Summary collapse

Methods included from Generators::MigrationActions

#chrono_forge_migration_exists?, #copy_chrono_forge_migrations

Instance Method Details

#startObject



15
16
17
18
19
20
# File 'lib/generators/chrono_forge/install/install_generator.rb', line 15

def start
  copy_chrono_forge_migrations
rescue => err
  say "#{err.class}: #{err}\n#{err.backtrace.join("\n")}", :red
  exit 1
end