method
show_release_notes
v2_5_5 -
Show latest stable
-
0 notes -
Class: SetupCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
show_release_notes()
public
Hide source
# File lib/rubygems/commands/setup_command.rb, line 539 def show_release_notes release_notes = File.join Dir.pwd, 'History.txt' release_notes = if File.exist? release_notes then history = File.read release_notes history.force_encoding Encoding::UTF_8 if Object.const_defined? :Encoding history = history.sub(/^# coding:.*?(?=^=)/, '') text = history.split(HISTORY_HEADER) text.shift # correct an off-by-one generated by split version_lines = history.scan(HISTORY_HEADER) versions = history.scan(VERSION_MATCHER).flatten.map do |x| Gem::Version.new(x) end history_string = "" until versions.length == 0 or versions.shift < options[:previous_version] do history_string += version_lines.shift + text.shift end history_string else "Oh-no! Unable to find release notes!" end say release_notes end