lib/hoe.rb in hoe-3.5.3 vs lib/hoe.rb in hoe-3.6.0
- old
+ new
@@ -89,11 +89,11 @@
class Hoe
include Rake::DSL if defined?(Rake::DSL)
# duh
- VERSION = "3.5.3"
+ VERSION = "3.6.0"
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
:publish, :gemcutter, :signing, :test]
@bad_plugins = []
@@ -203,14 +203,17 @@
# Optional: The filename for the project readme. [default: README.txt]
attr_accessor :readme_file
##
- # Optional: The name of the rubyforge project. [default: name.downcase]
+ # Optional: The name of the group authoring the project. [default: name.downcase]
- attr_accessor :rubyforge_name
+ attr_accessor :group_name
+ alias :rubyforge_name :group_name # Deprecated. Use #group_name.
+ alias :rubyforge_name= :group_name= # Deprecated. Use #group_name=.
+
##
# The Gem::Specification.
attr_accessor :spec # :nodoc:
@@ -526,11 +529,11 @@
when Array then
urls.first
else
raise "unknown urls format: #{urls.inspect}"
end
- s.rubyforge_project = rubyforge_name
+ s.rubyforge_project = group_name
s.description = description
s.files = manifest
s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
s.bindir = "bin"
s.require_paths = dirs unless dirs.empty?
@@ -545,11 +548,11 @@
s.authors = author
else
s.author = author
end
- s.extra_rdoc_files += s.files.grep(/(txt|rdoc)$/)
+ s.extra_rdoc_files += s.files.grep(/\.(txt|rdoc|md)$/)
s.extra_rdoc_files.reject! { |f| f =~ %r%^(test|spec|vendor|template|data|tmp)/% }
s.extra_rdoc_files += @extra_rdoc_files
end
unless self.version then
@@ -617,11 +620,11 @@
self.extra_deps = []
self.extra_dev_deps = []
self.extra_rdoc_files = []
self.licenses = []
self.post_install_message = nil
- self.rubyforge_name = name.downcase
+ self.group_name = name.downcase
self.spec = nil
self.spec_extras = {}
self.summary = nil
self.summary_sentences = 1
self.test_globs = ['test/**/{test,spec}_*.rb',
@@ -630,12 +633,12 @@
if manifest = read_manifest then
self.readme_file = manifest.grep(/^README\./).first
self.history_file = manifest.grep(/^History\./).first
end
- self.history_file ||= "History.txt"
- self.readme_file ||= "README.txt"
+ self.history_file ||= Dir.glob("History.{txt,md}").first
+ self.readme_file ||= Dir.glob("README.{txt,md}").first
abort "Hoe.new {...} removed. Switch to Hoe.spec." if block_given?
end
##
@@ -686,10 +689,12 @@
# The hash format is preferred as it will be used to populate gem
# metadata. The array format will work, but will warn that you
# should update the readme.
def parse_urls text
- lines = text.gsub(/^\* /, '').split(/\n/).grep(/\S+/)
+
+ lines = text.gsub(/^\* /, '').delete("<>").split(/\n/).grep(/\S+/)
+
if lines.first =~ /::/ then
Hash[lines.map { |line| line.split(/\s*::\s*/) }]
else
lines
end