3 RELEASE_NOTES_PATH = File.join(File.dirname(__FILE__), "..", "..", "Documentation", "ReleaseNotes")
7 VERSION_MATCH = /v([0-9.]*).txt$/
9 # Find all release not files
10 def self.release_files
11 notes = Dir.glob(File.join(RELEASE_NOTES_PATH, "v*.txt"))
13 # Sort files by version number
15 x = x.match VERSION_MATCH
16 y = y.match VERSION_MATCH
17 # Puts nonmatching files at the bottom
23 # compare version strings, newest at the top
24 y[1].split(".").map { |a| a.to_i } <=> x[1].split(".").map { |a| a.to_i }
29 # Aggregate all release notes in a string
30 def self.aggregate_notes
32 release_files.each do |x|
40 last_file = release_files.first
41 if last_file =~ VERSION_MATCH
48 File.read(release_files.first)