Class: WhatTheGem::Changes
- Defined in:
- lib/whatthegem/changes.rb,
lib/whatthegem/changes/parser.rb,
lib/whatthegem/changes/rdoc_parser.rb,
lib/whatthegem/changes/markdown_parser.rb,
lib/whatthegem/changes/releases_parser.rb
Defined Under Namespace
Classes: BundledSince, GlobalSince, MarkdownParser, Parser, RDocParser, ReleasesParser, SinceFirst, Version
Constant Summary collapse
- VERSION_REGEXP =
'(v(er(sion)?)? ?)?(?<version>\d+\.\d+(\.\d+(\.\w+)?)?)'
- VERSION_LINE_REGEXP =
/(^#{VERSION_REGEXP}(\s|:|$)|\s#{VERSION_REGEXP}$)/i
- CHANGELOG_NOT_FOUND =
I::Pastel.red.bold("Can't find changelog to extract versions.")
- TEMPLATE =
Template.parse(" _(since {{ since.description }})_\n\n{% for version in versions %}\n### {{ version.header }}\n\n{{ version.body | md_header_shift:4 }}\n\n{% endfor %}\n\n")
Constants inherited from Command
WhatTheGem::Command::HEADER_TEMPLATE
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
call, #call, get, #initialize, #meta, register
Constructor Details
This class inherits a constructor from WhatTheGem::Command
Instance Method Details
#locals ⇒ Object
50 51 52 53 54 55 |
# File 'lib/whatthegem/changes.rb', line 50 def locals { since: since.to_h, versions: select_versions.reverse.map(&:to_h) } end |