Class: GenevaDrive::Generators::InstallGenerator

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

Overview

Generator for installing GenevaDrive into a Rails application.

Examples:

Running the generator

bin/rails generate geneva_drive:install

Instance Method Summary collapse

Instance Method Details

#create_initializer ⇒ void

This method returns an undefined value.

Creates the initializer file.



78
79
80
# File 'lib/generators/geneva_drive/install/install_generator.rb', line 78

def create_initializer
  template "initializer.rb.tt", "config/initializers/geneva_drive.rb"
end

#create_migrations ⇒ void

This method returns an undefined value.

Creates the migration files for workflows and step executions.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/generators/geneva_drive/install/install_generator.rb', line 23

def create_migrations
  migration_template(
    "create_workflows_migration.rb",
    "db/migrate/create_geneva_drive_workflows.rb"
  )

  migration_template(
    "create_step_executions_migration.rb",
    "db/migrate/create_geneva_drive_step_executions.rb"
  )

  migration_template(
    "add_finished_at_to_step_executions.rb",
    "db/migrate/add_finished_at_to_geneva_drive_step_executions.rb"
  )

  migration_template(
    "add_error_class_name_to_step_executions.rb",
    "db/migrate/add_error_class_name_to_geneva_drive_step_executions.rb"
  )

  migration_template(
    "add_metadata_to_step_executions.rb",
    "db/migrate/add_metadata_to_geneva_drive_step_executions.rb"
  )

  migration_template(
    "add_metadata_to_workflows.rb",
    "db/migrate/add_metadata_to_geneva_drive_workflows.rb"
  )

  migration_template(
    "allow_null_hero_on_workflows.rb",
    "db/migrate/allow_null_hero_on_geneva_drive_workflows.rb"
  )

  migration_template(
    "add_started_at_index_to_step_executions.rb",
    "db/migrate/add_started_at_index_to_geneva_drive_step_executions.rb"
  )

  migration_template(
    "add_resumable_step_support.rb",
    "db/migrate/add_resumable_step_support_to_geneva_drive_step_executions.rb"
  )

  migration_template(
    "add_signals_support.rb",
    "db/migrate/add_signals_support_to_geneva_drive.rb"
  )
end