mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 05:05:18 +01:00
Initial import
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@1 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
commit
ec3ee77797
83 changed files with 3361 additions and 0 deletions
30
tracks/script/console
Executable file
30
tracks/script/console
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/local/bin/ruby
|
||||
|
||||
if ARGV[0]
|
||||
ENV['RAILS_ENV'] = ARGV[0]
|
||||
puts "Loading environment..."
|
||||
exec "irb -r config/environment.rb -r irb/completion --noinspect"
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue