Sha256: 7c9e35fe8589b912c5e972dccd609c02db519f2932277b36d7c122fef6a3f4d3
Contents?: true
Size: 711 Bytes
Versions: 13
Compression:
Stored size: 711 Bytes
Contents
#!/usr/bin/ruby module NewRelic module LatestChanges def self.default_changelog File.join(File.dirname(__FILE__), '..', '..', 'CHANGELOG') end def self.read(changelog=default_changelog) footer = <<'EOS' See https://github.com/newrelic/rpm/blob/master/CHANGELOG for a full list of changes. EOS return footer unless File.exists?(changelog) version_count = 0 changes = [] File.read(changelog).each_line do |line| if line.match(/##\s+v[\d.]+\s+##/) version_count += 1 end break if version_count >= 2 changes << line.chomp end changes << footer change_message = changes.join("\n") end end end
Version data entries
13 entries across 13 versions & 3 rubygems