lib/hoe.rb in hoe-2.5.0 vs lib/hoe.rb in hoe-2.6.0
- old
+ new
@@ -56,21 +56,21 @@
# end
# end
class Hoe
# duh
- VERSION = '2.5.0'
+ VERSION = '2.6.0'
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
:publish, :rcov, :rubyforge, :gemcutter, :signing, :test]
##
# Used to add extra flags to RUBY_FLAGS.
RUBY_DEBUG = ENV['RUBY_DEBUG']
- default_ruby_flags = "-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}" +
+ default_ruby_flags = "-w -I#{%w(lib bin test .).join(File::PATH_SEPARATOR)}" +
(RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
##
# Used to specify flags to ruby [has smart default].
@@ -341,11 +341,11 @@
##
# Define the Gem::Specification.
def define_spec
self.spec = Gem::Specification.new do |s|
- dirs = Dir['{lib,ext}']
+ dirs = Dir['lib']
s.name = name
s.version = version if version
s.summary = summary
s.email = email
@@ -550,14 +550,17 @@
File.read_utf(path).delete("\r").split(/\n\n+/).values_at(*paragraphs)
end
##
# Tell the world you're a pluggable package (ie you require rubygems 1.3.1+)
+ #
+ # This uses require_rubygems_version. Last one wins. Make sure you
+ # account for that.
def pluggable!
abort "update rubygems to >= 1.3.1" unless Gem.respond_to? :find_files
- spec_extras[:required_rubygems_version] = '>= 1.3.1'
+ require_rubygems_version '>= 1.3.1'
end
##
# Finalize configuration
@@ -565,9 +568,23 @@
intuit_values
validate_fields
add_dependencies
define_spec
load_plugin_tasks
+ end
+
+ ##
+ # Declare that your gem requires a specific rubygems version. Last one wins.
+
+ def require_rubygems_version version
+ spec_extras[:required_rubygems_version] = version
+ end
+
+ ##
+ # Declare that your gem requires a specific ruby version. Last one wins.
+
+ def require_ruby_version version
+ spec_extras[:required_ruby_version] = version
end
##
# Provide a linear degrading value from n to m over start to finis dates.