lib/helper.rb in narou-1.5.4 vs lib/helper.rb in narou-1.5.5
- old
+ new
@@ -6,34 +6,32 @@
require "open3"
#
# 雑多なお助けメソッド群
#
-# MacOSX 関連は確認してないので動作するか不明
-#
module Helper
extend self
def os_windows?
@@os_is_windows ||= RUBY_PLATFORM =~ /mswin(?!ce)|mingw|bccwin/i
end
- def os_cygwin?
- @@os_is_cygwin ||= RUBY_PLATFORM =~ /cygwin/i
- end
-
def os_mac?
@@os_is_mac ||= RUBY_PLATFORM =~ /darwin/
end
+ def os_cygwin?
+ @@os_is_cygwin ||= RUBY_PLATFORM =~ /cygwin/i
+ end
+
def determine_os
case
when os_windows?
:windows
- when os_cygwin?
- :cygwin
when os_mac?
:mac
+ when os_cygwin?
+ :cygwin
else
:other
end
end