class Mercury::Generators::InstallGenerator
Public Instance Methods
add_routes()
click to toggle source
# File lib/generators/mercury/install/install_generator.rb, line 18 def add_routes route %Q{Mercury::Engine.routes} end
copy_authentication_overrides()
click to toggle source
# File lib/generators/mercury/install/install_generator.rb, line 37 def copy_authentication_overrides if options[:full] || yes?("Install the authentication file so you can restrict access to editing? [yN]") copy_file 'lib/mercury/authentication.rb' end end
copy_config()
click to toggle source
# File lib/generators/mercury/install/install_generator.rb, line 14 def copy_config copy_file 'vendor/assets/javascripts/mercury.js', 'app/assets/javascripts/mercury.js' end
copy_layout_and_css_overrides()
click to toggle source
# File lib/generators/mercury/install/install_generator.rb, line 30 def copy_layout_and_css_overrides if options[:full] || yes?("Install the layout and CSS overrides files? [yN]") copy_file 'app/views/layouts/mercury.html.erb', 'app/views/layouts/mercury.html.erb' copy_file 'vendor/assets/stylesheets/mercury_overrides.css', 'app/assets/stylesheets/mercury_overrides.css' end end
copy_models()
click to toggle source
# File lib/generators/mercury/install/install_generator.rb, line 22 def copy_models if options[:orm] == 'mongoid' copy_file 'lib/generators/mercury/install/templates/mongoid_paperclip_image.rb', 'app/models/mercury/image.rb' else copy_file 'app/models/mercury/image.rb' if options[:full] end end
display_readme()
click to toggle source
# File lib/generators/mercury/install/install_generator.rb, line 43 def display_readme readme 'POST_INSTALL' if behavior == :invoke end