Permalink
Browse files

Merge [6344] from trunk. Check for MinGW when testing for Windows pla…

…tform. References #2982.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent b1e1088 commit a9ed24c2dde18e6f6b86af834c3513f62883b645 @jeremy jeremy committed Mar 6, 2007
View
3 railties/CHANGELOG
@@ -1,7 +1,10 @@
*SVN*
+* Windows: include MinGW in RUBY_PLATFORM check. #2982 [okkez000@gmail.com, Kaspar Schiess]
+
* Stop swallowing errors during rake test [Koz]
+
*1.2.2* (February 5th, 2007)
* Fix gem deprecation warnings, which also means depending on RubyGems 0.9.0+ [Chad Fowler]
View
4 railties/environments/boot.rb
@@ -3,7 +3,7 @@
unless defined?(RAILS_ROOT)
root_path = File.join(File.dirname(__FILE__), '..')
- unless RUBY_PLATFORM =~ /mswin32/
+ unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
require 'pathname'
root_path = Pathname.new(root_path).cleanpath(true).to_s
end
@@ -42,4 +42,4 @@
end
Rails::Initializer.run(:set_load_path)
-end
+end
View
2 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 }
View
4 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 @@ def pid_files
opts.parse!
end
-Inspector.inspect(OPTIONS[:pid_path], OPTIONS[:pattern])
+Inspector.inspect(OPTIONS[:pid_path], OPTIONS[:pattern])
View
2 railties/lib/commands/process/reaper.rb
@@ -2,7 +2,7 @@
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
View
4 railties/lib/commands/process/spawner.rb
@@ -92,7 +92,7 @@ def self.can_bind_to_custom_address?
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 @@ def self.can_bind_to_custom_address?
end
else
spawner_class.spawn_all
-end
+end
View
2 railties/lib/commands/server.rb
@@ -19,7 +19,7 @@
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"
View
2 railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -109,7 +109,7 @@ def add_options!(opt)
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
View
2 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

0 comments on commit a9ed24c

Please sign in to comment.