Class: Jobshop::Generators::CanaryGenerator
- Inherits:
-
AppGenerator
- Object
- Rails::Generators::AppGenerator
- AppGenerator
- Jobshop::Generators::CanaryGenerator
show all
- Defined in:
- lib/generators/jobshop/canary/canary_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#create_root_files, #initialize, #remove_session_store_initializer_until_rails_5_1, source_root
Instance Method Details
#create_boot_file ⇒ Object
73
74
75
|
# File 'lib/generators/jobshop/canary/canary_generator.rb', line 73
def create_boot_file
template "config/boot.rb.tt"
end
|
#finish_template ⇒ Object
77
78
79
80
81
82
83
84
85
|
# File 'lib/generators/jobshop/canary/canary_generator.rb', line 77
def finish_template
build :bin_jobshop
build :config_database_yml
build :db_migrate
build :expose_mailer_previews
build :localhost_tld_length
build :dev_cert
super
end
|
#run_bundle ⇒ Object
87
88
89
90
91
92
93
|
# File 'lib/generators/jobshop/canary/canary_generator.rb', line 87
def run_bundle
super
return if options[:pretend]
bundle_command("exec rails db:drop:all")
bundle_command("exec rails db:create")
bundle_command("exec rails db:migrate")
end
|