Sha256: 397c2d956e57943e0a78bb96553deff4736e4d679a596e20df001dd705a65f3d

Contents?: true

Size: 613 Bytes

Versions: 9

Compression:

Stored size: 613 Bytes

Contents

# helper method for generating the ChangeLog in RDoc format atomically
module Wrongdoc::Changelog
  include Wrongdoc::History

  def changelog
    fp = Tempfile.new('ChangeLog', '.')
    fp.write "ChangeLog from #@cgit_uri"
    cmd = %w(git log)
    if @changelog_start && tags[0]
      range = "#@changelog_start..#{tags[0][:tag]}"
      fp.write(" (#{range})")
      cmd << range
    end
    fp.write("\n\n")
    prefix = "   "
    IO.popen(cmd.join(' ')) do |io|
      io.each { |line|
        fp.write prefix
        fp.write line
      }
    end
    File.rename(fp.path, 'ChangeLog')
    fp.close!
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wrongdoc-1.6.1 lib/wrongdoc/changelog.rb
wrongdoc-1.6.0 lib/wrongdoc/changelog.rb
wrongdoc-1.5.0 lib/wrongdoc/changelog.rb
wrongdoc-1.4.0 lib/wrongdoc/changelog.rb
wrongdoc-1.3.0 lib/wrongdoc/changelog.rb
wrongdoc-1.1.1 lib/wrongdoc/changelog.rb
wrongdoc-1.1.0 lib/wrongdoc/changelog.rb
wrongdoc-1.0.1 lib/wrongdoc/changelog.rb
wrongdoc-1.0.0 lib/wrongdoc/changelog.rb