Class: Mozart::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/mozart/install/install_generator.rb,
lib/generators/mozart/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_mozartObject



12
13
14
15
16
17
18
# File 'lib/generators/mozart/install/install_generator.rb', line 12

def copy_mozart
  say_status("copying", "Mozart (#{Mozart::Rails::MOZART_VERSION})", :green)
  copy_file "mozart.js", "public/javascripts/mozart.js"
  copy_file "handlebars.runtime.js", "public/javascripts/handlebars.runtime.js"
  copy_file "jquery.js", "public/javascripts/jquery.js"
  copy_file "underscore.js", "public/javascripts/underscore.js"
end

#do_nothingObject



29
30
31
32
33
34
35
36
# File 'lib/generators/mozart/install/install_generator.rb', line 29

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 the following to your app/assets/javascripts/application.js")
  say_status("", "//= require mozart-all")
  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