lib/hoe.rb in hoe-3.17.2 vs lib/hoe.rb in hoe-3.18.0
- old
+ new
@@ -89,11 +89,11 @@
class Hoe
include Rake::DSL if defined?(Rake::DSL)
# duh
- VERSION = "3.17.2"
+ VERSION = "3.18.0"
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
:publish, :gemcutter, :signing, :test]
@bad_plugins = []
@@ -273,14 +273,25 @@
##
# *MANDATORY*: The version. Don't hardcode! use a constant in the project.
attr_accessor :version
+ @include_dirs = []
+
+ mc = (class << self; self; end)
+
##
+ # Optional: Extra directories to use (eg for test runs). See
+ # +Hoe.add_include_dirs+.
+
+ mc.send :attr_accessor, :include_dirs
+
+ ##
# Add extra dirs to both $: and RUBY_FLAGS (for test runs and rakefile deps)
def self.add_include_dirs(*dirs)
dirs = dirs.flatten
+ include_dirs.concat dirs
$:.unshift(*dirs)
s = File::PATH_SEPARATOR
RUBY_FLAGS.sub!(/-I/, "-I#{dirs.join(s)}#{s}")
end