* Upgraded to use Rails 0.10.0

* Changed require of Redcloth to favour gem version of version 3.0.3 or greater
* Changed the way that URLs are generated for stylesheets and javascripts by using AssetTagHelper


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@28 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-02-24 22:48:21 +00:00
parent 2f182327e8
commit de31b57852
23 changed files with 804 additions and 185 deletions

View file

@ -1,30 +1,22 @@
#!/usr/local/bin/ruby
irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb'
if ARGV[0]
ENV['RAILS_ENV'] = ARGV[0]
puts "Loading environment..."
exec "irb -r config/environment.rb -r irb/completion --noinspect"
require 'optparse'
options = {}
OptionParser.new do |opt|
opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |options[:sandbox]| }
opt.parse!(ARGV)
end
libs = " -r #{File.dirname(__FILE__)}/../config/environment"
libs << " -r #{File.dirname(__FILE__)}/console_sandbox" if options[:sandbox]
libs << " -r irb/completion"
ENV['RAILS_ENV'] = ARGV.first || 'development'
if options[:sandbox]
puts "Loading #{ENV['RAILS_ENV']} environment in sandbox."
puts "Any modifications you make will be rolled back on exit."
else
puts <<-HELP
NAME
console - interact with the domain model through a environment console (on IRB)
SYNOPSIS
console [environment]
DESCRIPTION
Starts an environment console using IRB that lets you manipulate and interrogate
the domain model or even trigger controller actions. The database connection and
configuration available to the web application is already setup.
Tab completion is available to see classes and methods on individual objects.
EXAMPLE
console production
This will initialize the production environment (as setup in config/database.yml
and config/environments/production.rb). You would now be ready to start requiring
models using require_dependency.
HELP
end
puts "Loading #{ENV['RAILS_ENV']} environment."
end
exec "#{irb} #{libs}"