Added script/runner which can be used to run code inside the environment by eval'ing the first parameter
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
16287608bb
commit
2afb8a8cc0
@ -1,12 +1,19 @@
|
||||
*SVN*
|
||||
|
||||
* Added script/runner which can be used to run code inside the environment by eval'ing the first parameter. Examples:
|
||||
|
||||
./script/runner 'ReminderService.deliver'
|
||||
./script/runner 'Mailer.receive(STDIN.read)'
|
||||
|
||||
This makes it easier to do CRON and postfix scripts without actually making a script just to trigger 1 line of code.
|
||||
|
||||
* Fixed webrick_server cookie handling to allow multiple cookes to be set at once #800, #813 [dave@cherryville.org]
|
||||
|
||||
* Fixed the Rakefile's interaction with postgresql to:
|
||||
|
||||
1. Use PGPASSWORD and PGHOST in the environment to fix prompting for
|
||||
passwords when connecting to a remote db and local socket connections.
|
||||
2. Added a '-x' flag to pg_dump which stops it dumping privileges #807 [rasputnik]
|
||||
2. Add a '-x' flag to pg_dump which stops it dumping privileges #807 [rasputnik]
|
||||
3. Quote the user name and use template0 when dumping so the functions doesn't get dumped too #855 [pburleson]
|
||||
4. Use the port if available #875 [madrobby]
|
||||
|
||||
|
@ -21,7 +21,7 @@ TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
|
||||
|
||||
LOG_FILES = %w( server.log development.log test.log production.log )
|
||||
HTML_FILES = %w( 404.html 500.html index.html favicon.ico )
|
||||
BIN_FILES = %w( generate destroy breakpointer console server update )
|
||||
BIN_FILES = %w( generate destroy breakpointer console server update runner )
|
||||
|
||||
VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )
|
||||
|
||||
|
4
railties/bin/runner
Normal file
4
railties/bin/runner
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/local/bin/ruby
|
||||
|
||||
require File.dirname(__FILE__) + '/../config/environment'
|
||||
eval(ARGV.first)
|
@ -47,7 +47,7 @@ def manifest
|
||||
m.file "environments/test.rb", "config/environments/test.rb"
|
||||
|
||||
# Scripts
|
||||
%w(console console_sandbox.rb destroy generate server).each do |file|
|
||||
%w(console console_sandbox.rb destroy generate server runner).each do |file|
|
||||
m.file "bin/#{file}", "script/#{file}", script_options
|
||||
end
|
||||
if options[:gem]
|
||||
|
Loading…
Reference in New Issue
Block a user