Class: Fullstack::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Fullstack::InstallGenerator
- Defined in:
- lib/generators/fullstack/install_generator.rb
Instance Method Summary collapse
- #action_mailer ⇒ Object
- #avoid_assets_included_twice_in_development ⇒ Object
-
#fullstack_templates ⇒ Object
Copy fullstack templates.
- #gitignore ⇒ Object
- #install_devise ⇒ Object
Instance Method Details
#action_mailer ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/generators/fullstack/install_generator.rb', line 38 def action_mailer inject_into_file("config/environments/production.rb", :after => "Application.configure do\n") do <<-eos config.action_mailer.default_url_options = { :host => Settings.app.host } config.action_mailer.delivery_method = :sendmail config.action_mailer.raise_delivery_errors = false eos end end |
#avoid_assets_included_twice_in_development ⇒ Object
50 51 52 |
# File 'lib/generators/fullstack/install_generator.rb', line 50 def avoid_assets_included_twice_in_development gsub_file("config/environments/development.rb", "config.assets.debug = true", "config.assets.debug = false") end |
#fullstack_templates ⇒ Object
Copy fullstack templates
13 14 15 16 |
# File 'lib/generators/fullstack/install_generator.rb', line 13 def fullstack_templates directory "config", Rails.root.join("config") empty_directory Rails.root.join("lib/support") end |
#gitignore ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/generators/fullstack/install_generator.rb', line 24 def gitignore append_to_file '.gitignore' do <<-eos .DS_Store /public/uploads /public/attachments /public/assets *.tmproj tmtags eos end end |
#install_devise ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/fullstack/install_generator.rb', line 18 def install_devise generate "devise:install" gsub_file('config/initializers/devise.rb', "\"[email protected]\"", "Settings.app.email") generate "remoting:install --host='#{host}' --user='#{user}'" end |