Class: QaServer::AssetsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- QaServer::AssetsGenerator
- Defined in:
- lib/generators/qa_server/assets_generator.rb
Instance Method Summary collapse
Instance Method Details
#banner ⇒ Object
11 12 13 |
# File 'lib/generators/qa_server/assets_generator.rb', line 11 def say_status('info', 'GENERATING QA_SERVER ASSETS', :blue) end |
#inject_css ⇒ Object
15 16 17 18 |
# File 'lib/generators/qa_server/assets_generator.rb', line 15 def inject_css say_status('info', ' -- adding qa_server css', :blue) copy_file "qa_server.scss", "app/assets/stylesheets/qa_server.scss" end |
#inject_js ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/generators/qa_server/assets_generator.rb', line 20 def inject_js return if qa_server_javascript_installed? say_status('info', ' -- adding qa_server javascript', :blue) insert_into_file 'app/assets/javascripts/application.js', after: '//= require_tree .' do <<-JS.strip_heredoc //= require qa_server JS end end |