Class: Quilt::RailsSetupGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Quilt::RailsSetupGenerator
- Defined in:
- lib/generators/quilt/rails_setup/rails_setup_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_procfile_entry ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/quilt/rails_setup/rails_setup_generator.rb', line 9 def create_procfile_entry procfile_path = "Procfile" if File.exist?(procfile_path) append_file(procfile_path, File.read(File.(find_in_source_paths(procfile_path)))) else copy_file(procfile_path) end end |
#create_route_file ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/generators/quilt/rails_setup/rails_setup_generator.rb', line 19 def create_route_file routes_path = "config/routes.rb" if File.exist?(routes_path) route("mount Quilt::Engine, at: '/'") else copy_file("routes.rb", routes_path) end say("Added Quilt engine mount") end |