lib/hoe.rb in hoe-2.3.3 vs lib/hoe.rb in hoe-2.4.0

- old
+ new

@@ -1,11 +1,10 @@ # -*- ruby -*- require 'rubygems' require 'rake' require 'rake/testtask' -require 'rubyforge' require 'yaml' require 'hoe/rake' ## @@ -57,14 +56,14 @@ # end # end class Hoe # duh - VERSION = '2.3.3' + VERSION = '2.4.0' - @@plugins = [:clean, :debug, :deps, :flay, :flog, :package, :publish, - :rcov, :signing, :test] + @@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'] @@ -304,11 +303,11 @@ # Add standard and user defined dependencies to the spec. def add_dependencies hoe_deps = { 'rake' => ">= #{RAKEVERSION}", - 'rubyforge' => ">= #{::RubyForge::VERSION}", + 'rubyforge' => ">= #{::RubyForge::VERSION}", # TODO: push down } self.extra_deps = normalize_deps extra_deps self.extra_dev_deps = normalize_deps extra_dev_deps @@ -366,15 +365,16 @@ s.extra_rdoc_files += @extra_rdoc_files end unless self.version then - version = nil + version = nil + version_re = /VERSION += +([\"\'])([\d][\d\w\.]+)\1/ spec.files.each do |file| next unless File.exist? file - version = File.read(file)[/VERSION += +([\"\'])([\d][\d\w\.]+)\1/, 2] + version = File.read_utf(file)[version_re, 2] break if version end spec.version = self.version = version if version @@ -479,10 +479,10 @@ bad = [] $plugin_max = self.class.plugins.map { |s| s.to_s.size }.max self.class.plugins.each do |plugin| - warn plugin if $DEBUG + warn "define: #{plugin}" if $DEBUG old_tasks = Rake::Task.tasks.dup begin send "define_#{plugin}_tasks"