diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-03 19:30:35 +0100 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-03 19:30:35 +0100 |
commit | ccb96f2297e8783165cba764e9b5d51e1a15ff87 (patch) | |
tree | 3229e6fdddc42054615514d843c555e341003033 /railties/Rakefile | |
parent | fb2325e35855d62abd2c76ce03feaa3ca7992e4f (diff) | |
parent | 761a633a9c0a45d76ef3ed10da97e3696c3ded79 (diff) | |
download | rails-ccb96f2297e8783165cba764e9b5d51e1a15ff87.tar.gz rails-ccb96f2297e8783165cba764e9b5d51e1a15ff87.tar.bz2 rails-ccb96f2297e8783165cba764e9b5d51e1a15ff87.zip |
Merge commit 'origin/master' into savepoints
Conflicts:
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/defaults_test.rb
Diffstat (limited to 'railties/Rakefile')
-rw-r--r-- | railties/Rakefile | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index 872ea83ec2..f812b42f1d 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -44,7 +44,7 @@ BASE_DIRS = %w( app config/environments config/initializers - components + config/locales db doc log @@ -53,7 +53,6 @@ BASE_DIRS = %w( public script script/performance - script/process test vendor vendor/plugins @@ -71,7 +70,7 @@ LOG_FILES = %w( server.log development.log test.log production.log ) HTML_FILES = %w( 422.html 404.html 500.html index.html robots.txt favicon.ico images/rails.png javascripts/prototype.js javascripts/application.js javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js ) -BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/inspector runner server plugin ) +BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler runner server plugin ) VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport activeresource railties ) @@ -174,9 +173,6 @@ task :copy_dispatches do copy_with_rewritten_ruby_path("dispatches/dispatch.fcgi", "#{PKG_DESTINATION}/public/dispatch.fcgi") chmod 0755, "#{PKG_DESTINATION}/public/dispatch.fcgi" - - # copy_with_rewritten_ruby_path("dispatches/gateway.cgi", "#{PKG_DESTINATION}/public/gateway.cgi") - # chmod 0755, "#{PKG_DESTINATION}/public/gateway.cgi" end task :copy_html_files do @@ -184,7 +180,7 @@ task :copy_html_files do end task :copy_application do - cp "helpers/application.rb", "#{PKG_DESTINATION}/app/controllers/application.rb" + cp "helpers/application_controller.rb", "#{PKG_DESTINATION}/app/controllers/application_controller.rb" cp "helpers/application_helper.rb", "#{PKG_DESTINATION}/app/helpers/application_helper.rb" end @@ -196,8 +192,12 @@ task :copy_configs do cp "configs/routes.rb", "#{PKG_DESTINATION}/config/routes.rb" - cp "configs/initializers/inflections.rb", "#{PKG_DESTINATION}/config/initializers/inflections.rb" - cp "configs/initializers/mime_types.rb", "#{PKG_DESTINATION}/config/initializers/mime_types.rb" + cp "configs/initializers/backtrace_silencers.rb", "#{PKG_DESTINATION}/config/initializers/backtrace_silencers.rb" + cp "configs/initializers/inflections.rb", "#{PKG_DESTINATION}/config/initializers/inflections.rb" + cp "configs/initializers/mime_types.rb", "#{PKG_DESTINATION}/config/initializers/mime_types.rb" + cp "configs/initializers/new_rails_defaults.rb", "#{PKG_DESTINATION}/config/initializers/new_rails_defaults.rb" + + cp "configs/locales/en.yml", "#{PKG_DESTINATION}/config/locales/en.yml" cp "environments/boot.rb", "#{PKG_DESTINATION}/config/boot.rb" cp "environments/environment.rb", "#{PKG_DESTINATION}/config/environment.rb" @@ -283,26 +283,35 @@ task :guides do template = File.expand_path("doc/guides/source/templates/guides.html.erb") - ignore = ['icons', 'images', 'templates', 'stylesheets'] + ignore = ['..', 'icons', 'images', 'templates', 'stylesheets'] ignore << 'active_record_basics.txt' indexless = ['index.txt', 'authors.txt'] - Dir.entries(source)[2..-1].each do |entry| + # Traverse all entries in doc/guides/source/ + Dir.entries(source).each do |entry| next if ignore.include?(entry) if File.directory?(File.join(source, entry)) - input = File.join(source, entry, 'index.txt') - output = File.join(html, entry) + # If the current entry is a directory, then we will want to compile + # the 'index.txt' file inside this directory. + if entry == '.' + input = File.join(source, 'index.txt') + output = File.join(html, "index.html") + else + input = File.join(source, entry, 'index.txt') + output = File.join(html, "#{entry}.html") + end else + # If the current entry is a file, then we will want to compile this file. input = File.join(source, entry) - output = File.join(html, entry).sub(/\.txt$/, '') + output = File.join(html, entry).sub(/\.txt$/, '.html') end begin puts "GENERATING => #{output}" ENV['MANUALSONRAILS_TOC'] = 'no' if indexless.include?(entry) - Mizuho::Generator.new(input, output, template).start + Mizuho::Generator.new(input, :output => output, :template => template).start rescue Mizuho::GenerationError STDERR.puts "*** ERROR" exit 2 @@ -349,11 +358,11 @@ spec = Gem::Specification.new do |s| EOF s.add_dependency('rake', '>= 0.8.3') - s.add_dependency('activesupport', '= 2.2.0' + PKG_BUILD) - s.add_dependency('activerecord', '= 2.2.0' + PKG_BUILD) - s.add_dependency('actionpack', '= 2.2.0' + PKG_BUILD) - s.add_dependency('actionmailer', '= 2.2.0' + PKG_BUILD) - s.add_dependency('activeresource', '= 2.2.0' + PKG_BUILD) + s.add_dependency('activesupport', '= 2.3.0' + PKG_BUILD) + s.add_dependency('activerecord', '= 2.3.0' + PKG_BUILD) + s.add_dependency('actionpack', '= 2.3.0' + PKG_BUILD) + s.add_dependency('actionmailer', '= 2.3.0' + PKG_BUILD) + s.add_dependency('activeresource', '= 2.3.0' + PKG_BUILD) s.rdoc_options << '--exclude' << '.' s.has_rdoc = false |