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

Version Path
wd_newrelic_rpm-3.5.8 lib/new_relic/latest_changes.rb
sundawg_newrelic_rpm-3.5.8.2 lib/new_relic/latest_changes.rb
sundawg_newrelic_rpm-3.5.8.1 lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.8.72 lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.8.70 lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.8.64.beta lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.7.59 lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.7.59.beta lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.7.58.beta lib/new_relic/latest_changes.rb
wd_newrelic_rpm-3.5.6 lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.7.57.beta lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.6.55 lib/new_relic/latest_changes.rb
newrelic_rpm-3.5.6.48.beta lib/new_relic/latest_changes.rb