Class: Ductwork::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_filesObject



12
13
14
15
16
17
18
19
20
21
22
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
# File 'lib/generators/ductwork/install/install_generator.rb', line 12

def create_files
  template "config/ductwork.yml"
  template "bin/ductwork"

  chmod "bin/ductwork", 0o755 & ~File.umask, verbose: false

  migration_template "db/create_ductwork_pipelines.rb",
                     "db/migrate/create_ductwork_pipelines.rb"
  migration_template "db/create_ductwork_runs.rb",
                     "db/migrate/create_ductwork_runs.rb"
  migration_template "db/create_ductwork_branches.rb",
                     "db/migrate/create_ductwork_branches.rb"
  migration_template "db/create_ductwork_branch_links.rb",
                     "db/migrate/create_ductwork_branch_links.rb"
  migration_template "db/create_ductwork_steps.rb",
                     "db/migrate/create_ductwork_steps.rb"
  migration_template "db/create_ductwork_jobs.rb",
                     "db/migrate/create_ductwork_jobs.rb"
  migration_template "db/create_ductwork_processes.rb",
                     "db/migrate/create_ductwork_processes.rb"
  migration_template "db/create_ductwork_executions.rb",
                     "db/migrate/create_ductwork_executions.rb"
  migration_template "db/create_ductwork_availabilities.rb",
                     "db/migrate/create_ductwork_availabilities.rb"
  migration_template "db/create_ductwork_attempts.rb",
                     "db/migrate/create_ductwork_attempts.rb"
  migration_template "db/create_ductwork_results.rb",
                     "db/migrate/create_ductwork_results.rb"
  migration_template "db/create_ductwork_transitions.rb",
                     "db/migrate/create_ductwork_transitions.rb"
  migration_template "db/create_ductwork_advancements.rb",
                     "db/migrate/create_ductwork_advancements.rb"
  migration_template "db/create_ductwork_tuples.rb",
                     "db/migrate/create_ductwork_tuples.rb"

  route <<~ROUTE
    # This mounts the web dashboard. It is recommended to add authentication around it.
    mount Ductwork::Engine, at: "/ductwork"
  ROUTE
end