require "#{File.dirname(__FILE__)}/manifests/rules_view_install.rb" module RulesView module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path(File.dirname(__FILE__) + "/manifests/templates") def initialize(runtime_args, *runtime_options) super end def install RulesViewInstallManifest.populate_record(self, "rules_view") puts InstallGenerator.description_all end def self.description_all <<-DESCRIPTION ******************************************************************* To add the rules view to you application > script/rails generate rules_view:install > mkdir public/javascripts/jquery > curl http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js > curl http://code.jquery.com/jquery-1.4.3.min.js > public/javascripts/jquery/jquery-1.4.3.min.js > curl http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.31 > public/javascripts/jquery/jquery.blockUI.js > curl http://fancybox.googlecode.com/files/jquery.fancybox-1.3.1.zip > public/javascripts/jquery/jquery.fancybox-1.3.1.zip > unzip public/javascripts/jquery/jquery.fancybox-1.3.1.zip -d public/javascripts/jquery > rm public/javascripts/jquery/jquery.fancybox-1.3.1.zip > mkdir public/stylesheets/blueprint > mkdir public/stylesheets/blueprint/src > curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/ie.css > public/stylesheets/blueprint/ie.css > curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/print.css > public/stylesheets/blueprint/print.css > curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/screen.css > public/stylesheets/blueprint/screen.css > curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/src/grid.png > public/stylesheets/blueprint/src/grid.png Then set the layout to use in the controller class MyCoolController < ApplicationController layout 'rules_view' ... To install and modify the rules_view layout > script/rails generate rules_view:layout [layout_name] See doc/README.rules_view for usage and instructions ******************************************************************* DESCRIPTION end desc(description_all) end end end