summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-11-02 00:20:21 +0000
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-11-02 00:20:21 +0000
commit27049b848dd48eca4df160e6024d66215230d260 (patch)
tree5fdc0eaedd653da2a4148cbad7814afefad7489c /script
parentbed79f523bd64d900a4e615efe7eb3e0cfc0abd8 (diff)
downloadredmine-27049b848dd48eca4df160e6024d66215230d260.tar.gz
redmine-27049b848dd48eca4df160e6024d66215230d260.zip
Use File#expand_path for require's in script/* for Ruby 1.9.2 compatibility. #4050
Since Ruby 1.9.2, LOAD_PATH does not include "." directory anymore, so we should use absolute paths instead to ensure both 1.8.x and 1.9.x compatibility. It has been included in railties 2.3.x branch since july 2009, see http://github.com/rails/rails/commit/7a427a83ca4da92c70760007aaf313638a5d8374 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4359 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'script')
-rwxr-xr-xscript/about2
-rwxr-xr-xscript/breakpointer4
-rwxr-xr-xscript/console4
-rw-r--r--script/dbconsole2
-rwxr-xr-xscript/destroy4
-rwxr-xr-xscript/generate4
-rwxr-xr-xscript/performance/benchmarker2
-rwxr-xr-xscript/performance/profiler2
-rw-r--r--script/performance/request2
-rwxr-xr-xscript/plugin4
-rw-r--r--script/process/inspector2
-rwxr-xr-xscript/process/reaper2
-rwxr-xr-xscript/process/spawner2
-rwxr-xr-xscript/process/spinner2
-rwxr-xr-xscript/runner4
-rwxr-xr-xscript/server4
16 files changed, 23 insertions, 23 deletions
diff --git a/script/about b/script/about
index 00ae734e3..61112a015 100755
--- a/script/about
+++ b/script/about
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
require 'commands/about'
diff --git a/script/breakpointer b/script/breakpointer
index 64af76edd..d7db15af9 100755
--- a/script/breakpointer
+++ b/script/breakpointer
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/breakpointer' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/breakpointer'
diff --git a/script/console b/script/console
index 42f28f7d6..235a1f278 100755
--- a/script/console
+++ b/script/console
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/console' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/console'
diff --git a/script/dbconsole b/script/dbconsole
index caa60ce82..83c8436a9 100644
--- a/script/dbconsole
+++ b/script/dbconsole
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/dbconsole'
diff --git a/script/destroy b/script/destroy
index fa0e6fcd0..88d295f7a 100755
--- a/script/destroy
+++ b/script/destroy
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/destroy' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/destroy'
diff --git a/script/generate b/script/generate
index ef976e09f..62a8a4c0c 100755
--- a/script/generate
+++ b/script/generate
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/generate' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/generate'
diff --git a/script/performance/benchmarker b/script/performance/benchmarker
index c842d35d3..3bff809fb 100755
--- a/script/performance/benchmarker
+++ b/script/performance/benchmarker
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/benchmarker'
diff --git a/script/performance/profiler b/script/performance/profiler
index d855ac8b1..07640575c 100755
--- a/script/performance/profiler
+++ b/script/performance/profiler
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/profiler'
diff --git a/script/performance/request b/script/performance/request
index ae3f38c74..489e568e6 100644
--- a/script/performance/request
+++ b/script/performance/request
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/performance/request'
diff --git a/script/plugin b/script/plugin
index 26ca64c06..b82201fa8 100755
--- a/script/plugin
+++ b/script/plugin
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/plugin' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/plugin'
diff --git a/script/process/inspector b/script/process/inspector
index bf25ad86d..8bcabb052 100644
--- a/script/process/inspector
+++ b/script/process/inspector
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/inspector'
diff --git a/script/process/reaper b/script/process/reaper
index c77f04535..aa7c1a053 100755
--- a/script/process/reaper
+++ b/script/process/reaper
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/reaper'
diff --git a/script/process/spawner b/script/process/spawner
index 7118f3983..69b33594d 100755
--- a/script/process/spawner
+++ b/script/process/spawner
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/spawner'
diff --git a/script/process/spinner b/script/process/spinner
index 6816b32ef..190c2bec7 100755
--- a/script/process/spinner
+++ b/script/process/spinner
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/spinner'
diff --git a/script/runner b/script/runner
index ccc30f9d2..be4c5d457 100755
--- a/script/runner
+++ b/script/runner
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/runner' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/runner'
diff --git a/script/server b/script/server
index dfabcb881..b9fcb7179 100755
--- a/script/server
+++ b/script/server
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/server' \ No newline at end of file
+require File.expand_path('../../config/boot', __FILE__)
+require 'commands/server'