summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--History.txt6
-rwxr-xr-xbin/sow3
-rw-r--r--lib/hoe.rb13
3 files changed, 16 insertions, 6 deletions
diff --git a/History.txt b/History.txt
index aa23b55..8ce9cbb 100644
--- a/History.txt
+++ b/History.txt
@@ -1,3 +1,9 @@
+=== 1.8.1 / 2008-10-22
+
+* 1 bug fix:
+
+ * Fixes for windows compatibility from Luis Lavena.
+
=== 1.8.0 / 2008-10-09
* 5 minor enhancements:
diff --git a/bin/sow b/bin/sow
index 27d5c65..42dbbc4 100755
--- a/bin/sow
+++ b/bin/sow
@@ -64,7 +64,7 @@ Dir.chdir project do
end
end
-WINDOZE = /win32/ =~ RUBY_PLATFORM
+WINDOZE = /mswin|mingw/ =~ RUBY_PLATFORM
puts "... done, now go fix all occurrences of '#{X}'"
if WINDOZE then
@@ -72,4 +72,3 @@ if WINDOZE then
else
puts `find #{project} -type f | xargs grep -n #{X}`.gsub(/\A|\n/, "\n ")
end
-
diff --git a/lib/hoe.rb b/lib/hoe.rb
index 0e44dfa..ab3314f 100644
--- a/lib/hoe.rb
+++ b/lib/hoe.rb
@@ -163,7 +163,7 @@ class Hoe
DLEXT = Config::CONFIG['DLEXT']
- WINDOZE = /djgpp|(cyg|ms|bcc)win|mingw/ =~ RUBY_PLATFORM unless defined? WINDOZE
+ WINDOZE = /mswin|mingw/ =~ RUBY_PLATFORM unless defined? WINDOZE
DIFF = if WINDOZE
'diff.exe'
@@ -329,7 +329,8 @@ class Hoe
def self.add_include_dirs(*dirs)
dirs = dirs.flatten
$:.unshift(*dirs)
- Hoe::RUBY_FLAGS.sub!(/-I/, "-I#{dirs.join(":")}:")
+ s = File::PATH_SEPARATOR
+ Hoe::RUBY_FLAGS.sub!(/-I/, "-I#{dirs.join(s)}#{s}")
end
def normalize_deps deps
@@ -451,8 +452,11 @@ class Hoe
task :test_deps do
tests = Dir["test/**/test_*.rb"] + Dir["test/**/*_test.rb"]
+ paths = ['bin', 'lib', 'test'].join(File::PATH_SEPARATOR)
+ null_dev = WINDOZE ? '> NUL 2>&1' : '&> /dev/null'
+
tests.each do |test|
- if not system "ruby -Ibin:lib:test #{test} &> /dev/null" then
+ if not system "ruby -I#{paths} #{test} #{null_dev}" then
puts "Dependency Issues: #{test}"
end
end
@@ -620,7 +624,8 @@ class Hoe
Rake::RDocTask.new(:docs) do |rd|
rd.main = "README.txt"
- rd.options << '-d' if RUBY_PLATFORM !~ /win32/ and `which dot` =~ /\/dot/ and not ENV['NODOT']
+ rd.options << '-d' if
+ `which dot` =~ /\/dot/ unless ENV['NODOT'] unless WINDOZE
rd.rdoc_dir = 'doc'
files = spec.files.grep(rdoc_pattern)
files -= ['Manifest.txt']