diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:22:07 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:22:07 +0000 |
commit | 8dfe5b78fa4525d2d3c6167e9aea29d7756b5eb7 (patch) | |
tree | e2285428760d0669dbe4867ad228051fad3188db /railties/lib | |
parent | e17df19b86a2ad0ed8c5657ef046c3e82cf6d63b (diff) | |
download | rails-8dfe5b78fa4525d2d3c6167e9aea29d7756b5eb7.tar.gz rails-8dfe5b78fa4525d2d3c6167e9aea29d7756b5eb7.tar.bz2 rails-8dfe5b78fa4525d2d3c6167e9aea29d7756b5eb7.zip |
Windows: include MinGW in RUBY_PLATFORM check. Closes #2982.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/commands/console.rb | 2 | ||||
-rw-r--r-- | railties/lib/commands/process/inspector.rb | 4 | ||||
-rw-r--r-- | railties/lib/commands/process/reaper.rb | 2 | ||||
-rw-r--r-- | railties/lib/commands/process/spawner.rb | 4 | ||||
-rw-r--r-- | railties/lib/commands/server.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/tasks/testing.rake | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/railties/lib/commands/console.rb b/railties/lib/commands/console.rb index 5abdb49273..dab84c5de3 100644 --- a/railties/lib/commands/console.rb +++ b/railties/lib/commands/console.rb @@ -1,4 +1,4 @@ -irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb' +irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' require 'optparse' options = { :sandbox => false, :irb => irb } diff --git a/railties/lib/commands/process/inspector.rb b/railties/lib/commands/process/inspector.rb index 79e1cf9a61..8a6437e715 100644 --- a/railties/lib/commands/process/inspector.rb +++ b/railties/lib/commands/process/inspector.rb @@ -1,6 +1,6 @@ require 'optparse' -if RUBY_PLATFORM =~ /mswin32/ then abort("Inspector is only for Unix") end +if RUBY_PLATFORM =~ /(:?mswin|mingw)/ then abort("Inspector is only for Unix") end OPTIONS = { :pid_path => File.expand_path(RAILS_ROOT + '/tmp/pids'), @@ -65,4 +65,4 @@ ARGV.options do |opts| opts.parse! end -Inspector.inspect(OPTIONS[:pid_path], OPTIONS[:pattern])
\ No newline at end of file +Inspector.inspect(OPTIONS[:pid_path], OPTIONS[:pattern]) diff --git a/railties/lib/commands/process/reaper.rb b/railties/lib/commands/process/reaper.rb index 4402b57faf..95175d41e0 100644 --- a/railties/lib/commands/process/reaper.rb +++ b/railties/lib/commands/process/reaper.rb @@ -2,7 +2,7 @@ require 'optparse' require 'net/http' require 'uri' -if RUBY_PLATFORM =~ /mswin32/ then abort("Reaper is only for Unix") end +if RUBY_PLATFORM =~ /(:?mswin|mingw)/ then abort("Reaper is only for Unix") end class Killer class << self diff --git a/railties/lib/commands/process/spawner.rb b/railties/lib/commands/process/spawner.rb index c8ca1d04a2..0a34bd6e4b 100644 --- a/railties/lib/commands/process/spawner.rb +++ b/railties/lib/commands/process/spawner.rb @@ -92,7 +92,7 @@ server = case ARGV.first else if defined?(Mongrel) "mongrel" - elsif RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `spawn-fcgi -version` }.blank? && defined?(FCGI) + elsif RUBY_PLATFORM !~ /(:?mswin|mingw)/ && !silence_stderr { `spawn-fcgi -version` }.blank? && defined?(FCGI) "fcgi" end end @@ -206,4 +206,4 @@ if OPTIONS[:repeat] end else spawner_class.spawn_all -end
\ No newline at end of file +end diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 23ad9de324..f84db9c049 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -19,7 +19,7 @@ server = case ARGV.first else if defined?(Mongrel) "mongrel" - elsif RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI) + elsif RUBY_PLATFORM !~ /(:?mswin|mingw)/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI) "lighttpd" else "webrick" diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 06c4b0ce28..742a56e843 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -123,7 +123,7 @@ class AppGenerator < Rails::Generator::Base end def mysql_socket_location - RUBY_PLATFORM =~ /mswin32/ ? MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } : nil + MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } unless RUBY_PLATFORM =~ /(:?mswin|mingw)/ end diff --git a/railties/lib/tasks/testing.rake b/railties/lib/tasks/testing.rake index ba50a365c3..b9df35c6b4 100644 --- a/railties/lib/tasks/testing.rake +++ b/railties/lib/tasks/testing.rake @@ -30,7 +30,7 @@ end module Kernel def silence_stderr old_stderr = STDERR.dup - STDERR.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null') + STDERR.reopen(RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'NUL:' : '/dev/null') STDERR.sync = true yield ensure |