Flowdock
method

manifest

Importance_0
v1.0.0 - Show latest stable - 0 notes - Class: AppGenerator
manifest() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails_generator/generators/applications/app/app_generator.rb, line 18
  def manifest
    script_options     = { :chmod => 0755 }
    dispatcher_options = { :chmod => 0755, :shebang => options[:shebang] }

    record do |m|
      # Root directory and all subdirectories.
      m.directory ''
      BASEDIRS.each { |path| m.directory path }

      # Root
      m.file "fresh_rakefile", "Rakefile"
      m.file "README",         "README"

      # Application
      m.template "helpers/application.rb",        "app/controllers/application.rb"
      m.template "helpers/application_helper.rb", "app/helpers/application_helper.rb"
      m.template "helpers/test_helper.rb",        "test/test_helper.rb"

      # database.yml and .htaccess
      m.template "configs/database.yml", "config/database.yml", :assigns => {
        :app_name => File.basename(File.expand_path(@destination_root)),
        :socket => @socket
      }
      m.template "configs/routes.rb",     "config/routes.rb"
      m.template "configs/apache.conf",   "public/.htaccess"

      # Environments
      m.file "environments/boot.rb",        "config/boot.rb"
      m.file "environments/environment.rb", "config/environment.rb"
      m.file "environments/production.rb",  "config/environments/production.rb"
      m.file "environments/development.rb", "config/environments/development.rb"
      m.file "environments/test.rb",        "config/environments/test.rb"

      # Scripts
      %w( about breakpointer console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/spinner runner server plugin ).each do |file|
        m.file "bin/#{file}", "script/#{file}", script_options
      end

      # Dispatches
      m.file "dispatches/dispatch.rb",   "public/dispatch.rb", dispatcher_options
      m.file "dispatches/dispatch.rb",   "public/dispatch.cgi", dispatcher_options
      m.file "dispatches/dispatch.fcgi", "public/dispatch.fcgi", dispatcher_options

      # HTML files
      %w(404 500 index).each do |file|
        m.template "html/#{file}.html", "public/#{file}.html"
      end
      
      m.template "html/favicon.ico", "public/favicon.ico"
      m.template "html/robots.txt", "public/robots.txt"
      m.file "html/images/rails.png", "public/images/rails.png"

      # Javascripts
      m.file "html/javascripts/prototype.js",     "public/javascripts/prototype.js"
      m.file "html/javascripts/effects.js",       "public/javascripts/effects.js"
      m.file "html/javascripts/dragdrop.js",      "public/javascripts/dragdrop.js"
      m.file "html/javascripts/controls.js",      "public/javascripts/controls.js"

      # Docs
      m.file "doc/README_FOR_APP", "doc/README_FOR_APP"

      # Logs
      %w(server production development test).each { |file|
        m.file "configs/empty.log", "log/#{file}.log", :chmod => 0666
      }
    end
  end
Register or log in to add new notes.