public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Added an easier way of starting a IRB session on the environment

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@48 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Mon Dec 06 10:18:29 -0800 2004
commit  0366e6a614ba8922267572192a49892df8a4ec6b
tree    a46fccac6af9f3e486555c8e299af734540e9382
parent  6c975dc6432ba3edefa1b8f4a30cfba6d23ce9d4
...
110
111
112
113
114
 
 
115
116
117
...
110
111
112
 
 
113
114
115
116
117
0
@@ -110,8 +110,8 @@
0
 
0
   cp "dispatches/dispatch.servlet", "#{PKG_DESTINATION}/public/dispatch.servlet"
0
 
0
- cp "dispatches/start_server", "#{PKG_DESTINATION}/start_server"
0
- chmod 0755, "#{PKG_DESTINATION}/start_server"
0
+ cp "bin/envcon", "#{PKG_DESTINATION}/script/envcon"
0
+ chmod 0755, "#{PKG_DESTINATION}/script/envcon"
0
 end
0
 
0
 task :copy_html_files do
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -1 +1,31 @@
0
+#!/usr/local/bin/ruby
0
+
0
+if ARGV[0]
0
+ ENV['RAILS_ENV'] = ARGV[0]
0
+ puts "Loading environment..."
0
+ exec "irb -r config/environment.rb -r irb/completion --noinspect"
0
+else
0
+ puts <<-HELP
0
+
0
+NAME
0
+ envcon - interact with the domain model through a environment console (on IRB)
0
+
0
+SYNOPSIS
0
+ envcon [environment]
0
+
0
+DESCRIPTION
0
+ Starts an environment console using IRB that lets you manipulate and interrogate
0
+ the domain model or even trigger controller actions. The database connection and
0
+ configuration available to the web application is already setup.
0
+
0
+ Tab completion is available to see classes and methods on individual objects.
0
+
0
+EXAMPLE
0
+ envcon production
0
+
0
+ This will initialize the production environment (as setup in config/database.yml
0
+ and config/environments/production.rb). You would now be ready to start requiring
0
+ models using require_dependency.
0
+HELP
0
+end

Comments

    No one has commented yet.