Sha256: 0efd10797213e92487a580ab35eed0e8d162af657c68fd29840018ecec7b87db

Contents?: true

Size: 371 Bytes

Versions: 13

Compression:

Stored size: 371 Bytes

Contents

require 'structured_changelog'

desc 'Display N Recent Release Sections'
task 'changelog:recent', [:n, :path] do |_task, arguments|
  n    = arguments.to_h.fetch(:n)    { 3 }
  path = arguments.to_h.fetch(:path) { 'CHANGELOG.md' }

  changelog = StructuredChangelog.new(path)
  releases  = changelog.releases.to_a[0...n]

  puts releases.map(&:contents).join("\n\n")
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
structured_changelog-0.11.2 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.11.1 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.11.0 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.10.2 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.10.1 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.10.0 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.8.3 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.8.2 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.8.1 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.8.0 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.7.2 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.7.1 lib/structured_changelog/tasks/recent.rb
structured_changelog-0.7.0 lib/structured_changelog/tasks/recent.rb