class Hoe
def intuit_values
def intuit_values header_re = /^((?:=+|#+) .*)$/ readme = File.read_utf(readme_file).split(header_re)[1..-1] rescue '' unless readme.empty? then sections = Hash[*readme.map { |s| s =~ /^[=#]/ ? s.strip.downcase.chomp(':').split.last : s.strip }] desc = sections.values_at(*description_sections).join("\n\n") summ = desc.split(/\.\s+/).first(summary_sentences).join(". ") urls = parse_urls(readme[1]) self.urls ||= urls self.description ||= desc self.summary ||= summ else missing readme_file end self.changes ||= begin h = File.read_utf(history_file) h.split(/^(={2,}|\#{2,})/)[1..2].join.strip rescue missing history_file '' end end