Class: GeoMock::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_geomockObject



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

def copy_geomock
  say_status("copying", "GeoMock", :green)
  copy_file "geomock.js", "public/javascripts/geomock.js"
  copy_file "geomock.min.js", "public/javascripts/geomock.min.js"
end

#do_nothingObject



26
27
28
29
30
31
32
# File 'lib/generators/geomock/install/install_generator.rb', line 26

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 geomock` to your app/assets/javascripts/application.js")
  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