summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2012-03-12 12:39:18 -0800
committerRyan Davis <ryand@zenspider.com>2012-03-12 12:39:18 -0800
commit85f512edf2cd2fe8f31400e866f85fd4be0e84b9 (patch)
treef46f30ccdf88f15b764d946d707547d239cc6d9f /lib
parent49e79c9a0967cb8f1806c05e451ad2abcced3b79 (diff)
downloadhoe-85f512edf2cd2fe8f31400e866f85fd4be0e84b9.tar.gz
more cleanup because eric is a jerk... pfft
[git-p4: depot-paths = "//src/hoe/dev/": change = 7180]
Diffstat (limited to 'lib')
-rw-r--r--lib/hoe.rb2
-rw-r--r--lib/hoe/publish.rb20
-rw-r--r--lib/hoe/rcov.rb8
3 files changed, 14 insertions, 16 deletions
diff --git a/lib/hoe.rb b/lib/hoe.rb
index b084724..0db79ea 100644
--- a/lib/hoe.rb
+++ b/lib/hoe.rb
@@ -823,5 +823,5 @@ class File
end
def Gem.bin_wrapper name # HACK
- File.join Gem.dir, "bin", Gem.default_exec_format % name
+ File.join Gem.bindir, Gem.default_exec_format % name
end unless Gem.respond_to? :bin_wrapper
diff --git a/lib/hoe/publish.rb b/lib/hoe/publish.rb
index 7abea77..397e673 100644
--- a/lib/hoe/publish.rb
+++ b/lib/hoe/publish.rb
@@ -96,21 +96,19 @@ module Hoe::Publish
self.rsync_args ||= '-av --delete'
end
- def make_rdoc_cmd extra_args = nil
+ def make_rdoc_cmd(*extra_args)
title = "#{name}-#{version} Documentation"
title = "#{rubyforge_name}'s #{title}" if rubyforge_name != name
- rdoc = Gem.bin_path "rdoc", "rdoc"
+ rdoc = Gem.bin_wrapper "rdoc"
- cmd = %W[#{rdoc}
- --title #{title}
- -o #{local_rdoc_dir}
- ] +
+ %W[#{rdoc}
+ --title #{title}
+ -o #{local_rdoc_dir}
+ ] +
spec.rdoc_options +
- Array(extra_args) +
+ extra_args +
spec.require_paths +
spec.extra_rdoc_files
-
- cmd
end
##
@@ -124,12 +122,12 @@ module Hoe::Publish
desc "Generate rdoc"
task :docs => [:clobber_docs, :isolate] do
- ruby(*make_rdoc_cmd)
+ sh(*make_rdoc_cmd)
end
desc "Generate rdoc coverage report"
task :dcov => :isolate do
- ruby make_rdoc_cmd '-C'
+ sh(*make_rdoc_cmd('-C'))
end
desc "Remove RDoc files"
diff --git a/lib/hoe/rcov.rb b/lib/hoe/rcov.rb
index 607414e..8fe9c37 100644
--- a/lib/hoe/rcov.rb
+++ b/lib/hoe/rcov.rb
@@ -18,7 +18,7 @@ module Hoe::RCov
task :isolate # ensure it exists
task :rcov => :isolate do
- ruby make_rcov_cmd
+ sh(*make_rcov_cmd)
end
task :clobber_rcov do
@@ -42,7 +42,7 @@ module Hoe::RCov
end
end
- def make_rcov_cmd extra_args = nil
+ def make_rcov_cmd
rcov = Gem.bin_wrapper "rcov"
tests = test_globs.sort.map { |g| Dir.glob(g) }.flatten.map(&:inspect)
@@ -55,10 +55,10 @@ module Hoe::RCov
-x tmp/isolate
--sort coverage
--sort-reverse
- -o "coverage"
+ -o coverage
] + tests
- cmd.join " "
+ cmd
end
end