# File lib/rails_generator/generators/applications/app/app_generator.rb, line 17 def initialize(runtime_args, runtime_options = {}) super usage if args.empty? usage("Databases supported for preconfiguration are: #{DATABASES.join(", ")}") if (options[:db] && !DATABASES.include?(options[:db])) @destination_root = args.shift @app_name = File.basename(File.expand_path(@destination_root)) end
# File lib/rails_generator/generators/applications/app/app_generator.rb, line 41 def after_generate if options[:template] Rails::TemplateRunner.new(options[:template], @destination_root) end end
# File lib/rails_generator/generators/applications/app/app_generator.rb, line 27 def manifest record do |m| create_directories(m) create_root_files(m) create_app_files(m) create_config_files(m) create_script_files(m) create_test_files(m) create_public_files(m) create_documentation_file(m) create_log_files(m) end end
# File lib/rails_generator/generators/applications/app/app_generator.rb, line 52 def add_options!(opt) opt.separator '' opt.separator 'Options:' opt.on("-r", "--ruby=path", String, "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).", "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v } opt.on("-d", "--database=name", String, "Preconfigure for selected database (options: #{DATABASES.join('/')}).", "Default: #{DEFAULT_DATABASE}") { |v| options[:db] = v } opt.on("-D", "--with-dispatchers", "Add CGI/FastCGI/mod_ruby dispatches code to generated application skeleton", "Default: false") { |v| options[:with_dispatchers] = v } opt.on("-f", "--freeze", "Freeze Rails in vendor/rails from the gems generating the skeleton", "Default: false") { |v| options[:freeze] = v } opt.on("-m", "--template=path", String, "Use an application template that lives at path (can be a filesystem path or URL).", "Default: (none)") { |v| options[:template] = v } end
Generated with the Darkfish Rdoc Generator 2.