Rails 2.1
Update to Rails 2.1 final.
This commit is contained in:
parent
fd554cce90
commit
516d6dfac0
257 changed files with 4058 additions and 1933 deletions
|
@ -24,9 +24,9 @@ ENV['RAILS_ENV'] = case ARGV.first
|
|||
end
|
||||
|
||||
if options[:sandbox]
|
||||
puts "Loading #{ENV['RAILS_ENV']} environment in sandbox (Rails #{Rails::VERSION::STRING})"
|
||||
puts "Loading #{ENV['RAILS_ENV']} environment in sandbox (Rails #{Rails.version})"
|
||||
puts "Any modifications you make will be rolled back on exit"
|
||||
else
|
||||
puts "Loading #{ENV['RAILS_ENV']} environment (Rails #{Rails::VERSION::STRING})"
|
||||
puts "Loading #{ENV['RAILS_ENV']} environment (Rails #{Rails.version})"
|
||||
end
|
||||
exec "#{options[:irb]} #{libs} --simple-prompt"
|
||||
|
|
17
vendor/rails/railties/lib/commands/dbconsole.rb
vendored
17
vendor/rails/railties/lib/commands/dbconsole.rb
vendored
|
@ -2,8 +2,13 @@ require 'erb'
|
|||
require 'yaml'
|
||||
require 'optparse'
|
||||
|
||||
include_password = false
|
||||
|
||||
OptionParser.new do |opt|
|
||||
opt.banner = "Usage: dbconsole [environment]"
|
||||
opt.banner = "Usage: dbconsole [options] [environment]"
|
||||
opt.on("-p", "--include-password", "Automatically provide the database from database.yml") do |v|
|
||||
include_password = true
|
||||
end
|
||||
opt.parse!(ARGV)
|
||||
abort opt.to_s unless (0..1).include?(ARGV.size)
|
||||
end
|
||||
|
@ -31,19 +36,23 @@ when "mysql"
|
|||
'port' => '--port',
|
||||
'socket' => '--socket',
|
||||
'username' => '--user',
|
||||
'password' => '--password',
|
||||
'encoding' => '--default-character-set'
|
||||
}.map { |opt, arg| "#{arg}=#{config[opt]}" if config[opt] }.compact
|
||||
|
||||
if config['password'] && include_password
|
||||
args << "--password=#{config['password']}"
|
||||
end
|
||||
|
||||
args << config['database']
|
||||
|
||||
exec(find_cmd('mysql5', 'mysql'), *args)
|
||||
|
||||
when "postgresql"
|
||||
ENV['PGUSER'] = config["username"] if config["username"]
|
||||
ENV['PGHOST'] = config["host"] if config["host"]
|
||||
ENV['PGPORT'] = config["port"].to_s if config["port"]
|
||||
ENV['PGPASSWORD'] = config["password"].to_s if config["password"]
|
||||
exec(find_cmd('psql'), '-U', config["username"], config["database"])
|
||||
ENV['PGPASSWORD'] = config["password"].to_s if config["password"] && include_password
|
||||
exec(find_cmd('psql'), config["database"])
|
||||
|
||||
when "sqlite"
|
||||
exec(find_cmd('sqlite'), config["database"])
|
||||
|
|
2
vendor/rails/railties/lib/commands/plugin.rb
vendored
2
vendor/rails/railties/lib/commands/plugin.rb
vendored
|
@ -163,7 +163,7 @@ class Plugin
|
|||
end
|
||||
|
||||
def git_url?
|
||||
@uri =~ /^git:\/\// || @url =~ /\.git$/
|
||||
@uri =~ /^git:\/\// || @uri =~ /\.git$/
|
||||
end
|
||||
|
||||
def installed?
|
||||
|
|
|
@ -62,7 +62,7 @@ config = IO.read(config_file)
|
|||
default_port, default_ip = 3000, '0.0.0.0'
|
||||
port = config.scan(/^\s*server.port\s*=\s*(\d+)/).first rescue default_port
|
||||
ip = config.scan(/^\s*server.bind\s*=\s*"([^"]+)"/).first rescue default_ip
|
||||
puts "=> Rails application starting on http://#{ip || default_ip}:#{port || default_port}"
|
||||
puts "=> Rails #{Rails.version} application starting on http://#{ip || default_ip}:#{port || default_port}"
|
||||
|
||||
tail_thread = nil
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ ARGV.clone.options do |opts|
|
|||
opts.parse!
|
||||
end
|
||||
|
||||
puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
puts "=> Rails #{Rails.version} application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
|
||||
parameters = [
|
||||
"start",
|
||||
|
|
|
@ -61,6 +61,6 @@ require 'webrick_server'
|
|||
|
||||
OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT)
|
||||
|
||||
puts "=> Rails application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
puts "=> Rails #{Rails.version} application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
|
||||
puts "=> Ctrl-C to shutdown server; call with --help for options" if OPTIONS[:server_type] == WEBrick::SimpleServer
|
||||
DispatchServlet.dispatch(OPTIONS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue