Class: Lungojs::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Lungojs::Generators::InstallGenerator
- Defined in:
- lib/generators/lungojs/install/install_generator.rb,
lib/generators/lungojs/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_app ⇒ Object
23 24 25 26 |
# File 'lib/generators/lungojs/install/install_generator.rb', line 23 def copy_app say_status("copying", "app (#{Lungojs::Rails::LUNGO_JS_VERSION})", :green) directory 'app', 'public/javascripts/app' end |
#copy_lungojs ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/generators/lungojs/install/install_generator.rb', line 15 def copy_lungojs say_status("copying", "Lungo.js (#{Lungojs::Rails::LUNGO_JS_VERSION})", :green) copy_file "../../../../vendor/assets/javascripts/lungo-1.2.js", "public/javascripts/lungo-1.2.js" copy_file "../../../../vendor/assets/stylesheets/lungo-1.2.css", "public/stylesheets/lungo-1.2.js" copy_file "../../../../vendor/assets/stylesheets/lungo.theme.default.css", "public/stylesheets/lungo.theme.default.js" copy_file "../../../../vendor/assets/stylesheets/lungo.theme.default.font.css", "public/stylesheets/lungo.theme.default.font.js" end |
#do_nothing ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/generators/lungojs/install/install_generator.rb', line 37 def do_nothing say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.") say_status("", "The necessary files are already in your asset pipeline.") say_status("", "Just add `//= require lungojs` to your app/assets/javascripts/application.js") say_status("", "If you upgraded your app from Rails 3.0 and still have lungo.js in your javascripts, be sure to remove them.") say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.") # ok, nothing end |