Sha256: 6a562e4ead8b3babae66f60bb711e18b2dd26fc2a5cef38e96de09fa813ab6e7
Contents?: true
Size: 1.61 KB
Versions: 3
Compression:
Stored size: 1.61 KB
Contents
require 'fileutils' require 'set' require 'stringio' include Helpers::ModuleHelper def init generate_changelog end def all_objects run_verifier(Registry.all()) end def namespace_objects run_verifier(Registry.all(:class, :module)) end def changelog_filename 'Changelog SU201x.log' end VERSION_MATCH = /^\D+([0-9.]+)(?:\s+M(\d+))?$/ def generate_changelog output = StringIO.new versions = Hash.new all_objects.each { |object| version_tag = object.tag(:version) next if version_tag.nil? version = version_tag.text # Don't list SU6 or older. next if version.match(VERSION_MATCH).captures[0].to_i <= 6 versions[version] ||= {} versions[version][object.type] ||= [] versions[version][object.type] << object.path } versions = versions.sort { |a, b| v1, mv1 = a[0].match(VERSION_MATCH).captures v2, mv2 = b[0].match(VERSION_MATCH).captures if v1 == v2 (mv2 || '0').to_i <=> (mv1 || '0').to_i else v2.to_f <=> v1.to_f end } output.puts "FEATURES = [" versions.each { |version, features| output.puts "" output.puts " {" output.puts " version: '#{version}'," output.puts " types: {" features.sort.each { |type, objects| unless objects.empty? output.puts " #{type}: [" objects.sort.each { |object| output.puts " '#{object}'," } output.puts " ]," end } output.puts " }," output.puts " }," } output.puts "]" puts output.string exit # Avoid the YARD summary end
Version data entries
3 entries across 3 versions & 1 rubygems