lib/docurium.rb in docurium-0.4.1 vs lib/docurium.rb in docurium-0.4.2

- old
+ new

@@ -186,10 +186,15 @@ show_warnings(data) end end + # We tally the sigantures in the order they finished, which is + # arbitrary due to the concurrency, so we need to sort them once + # they've finsihed. + sort_sigs! + project = { :versions => versions.reverse, :github => @options['github'], :name => @options['name'], :signatures => @sigs, @@ -245,11 +250,14 @@ sigchanges.sort.each { |p| out ("\t" + p) } end end def get_versions - VersionSorter.sort(@repo.tags.map { |tag| tag.name.gsub(%r(^refs/tags/), '') }) + releases = @repo.tags + .map { |tag| tag.name.gsub(%r(^refs/tags/), '') } + .delete_if { |tagname| tagname.match(%r(-rc\d*$)) } + VersionSorter.sort(releases) end def parse_headers(index, version) headers = index.map { |e| e[:path] }.grep(/\.h$/) @@ -283,9 +291,17 @@ @sigs[fun_name][:changes][version] = true end end @sigs[fun_name][:exists] << version @lastsigs[fun_name] = fun_data[:sig] + end + end + + def sort_sigs! + @sigs.keys.each do |fn| + VersionSorter.sort!(@sigs[fn][:exists]) + # Put HEAD at the back + @sigs[fn][:exists] << @sigs[fn][:exists].shift end end def find_subtree(version, path) tree = nil