lib/hoe.rb in hoe-1.8.0 vs lib/hoe.rb in hoe-1.8.1
- old
+ new
@@ -122,11 +122,11 @@
# This will set the +Gem::Specification+ platform to the one indicated in
# +FORCE_PLATFORM+ (instead of default Gem::Platform::CURRENT)
#
class Hoe
- VERSION = '1.8.0'
+ VERSION = '1.8.1'
GEMURL = URI.parse 'http://gems.rubyforge.org' # for namespace :deps below
ruby_prefix = Config::CONFIG['prefix']
sitelibdir = Config::CONFIG['sitelibdir']
@@ -161,11 +161,11 @@
File.join(PREFIX, sitelibdir[ruby_prefix.size..-1])
end
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'
else
if system("gdiff", __FILE__, __FILE__)
@@ -327,11 +327,12 @@
# Add extra dirs to both $: and RUBY_FLAGS (for test runs)
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
Array(deps).map { |o| String === o ? [o] : o }
end
@@ -449,12 +450,15 @@
desc 'Show which test files fail when run alone.'
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
end
@@ -618,10 +622,11 @@
############################################################
# Doco
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']
rd.rdoc_files.push(*files)