From f8f22dac8e08656f1798d6bf2aa8accc534b077d Mon Sep 17 00:00:00 2001 From: Christopher Currie Date: Sat, 25 Oct 2008 21:39:49 -0700 Subject: Update non-gems distributions to use sqlite3 as the default, matching the "rails" command default [#1270 status:committed] Signed-off-by: David Heinemeier Hansson --- railties/Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/Rakefile') diff --git a/railties/Rakefile b/railties/Rakefile index adb6db0b64..872ea83ec2 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -192,7 +192,7 @@ task :copy_configs do app_name = "rails" socket = nil require 'erb' - File.open("#{PKG_DESTINATION}/config/database.yml", 'w') {|f| f.write ERB.new(IO.read("configs/databases/mysql.yml"), nil, '-').result(binding)} + File.open("#{PKG_DESTINATION}/config/database.yml", 'w') {|f| f.write ERB.new(IO.read("configs/databases/sqlite3.yml"), nil, '-').result(binding)} cp "configs/routes.rb", "#{PKG_DESTINATION}/config/routes.rb" -- cgit v1.2.3 From f22458ef85eb2d7bdf25943395baf9335e0805ce Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Tue, 4 Nov 2008 15:32:28 +0100 Subject: Update guides generation task: make it compatible with the latest changes in Mizuho. --- railties/Rakefile | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'railties/Rakefile') diff --git a/railties/Rakefile b/railties/Rakefile index 872ea83ec2..52357a09c5 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -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 -- cgit v1.2.3