Module: Reissue
- Defined in:
- lib/reissue.rb,
lib/reissue/gem.rb,
lib/reissue/rake.rb,
lib/reissue/parser.rb,
lib/reissue/printer.rb,
lib/reissue/version.rb,
lib/reissue/markdown.rb,
lib/reissue/version_updater.rb,
lib/reissue/changelog_updater.rb
Overview
Reissue is a module that provides functionality for updating version numbers and changelogs.
Defined Under Namespace
Modules: Gem, Versioning Classes: ChangelogUpdater, Markdown, Parser, Printer, Task, VersionUpdater
Constant Summary collapse
- VERSION =
"0.3.0"
Class Method Summary collapse
-
.call(version_file:, changelog_file: "CHANGELOG.md", segment: "patch", date: "Unreleased", changes: {}, version_limit: 2, version_redo_proc: nil) ⇒ String
Updates the version number and changelog.
-
.finalize(date = Date.today, changelog_file: "CHANGELOG.md") ⇒ Array
Finalizes the changelog for an unreleased version to set the release date.
- .greeks ⇒ Object
-
.reformat(file, version_limit: 2) ⇒ Object
Reformats the changelog file to ensure it is correctly formatted.
Class Method Details
.call(version_file:, changelog_file: "CHANGELOG.md", segment: "patch", date: "Unreleased", changes: {}, version_limit: 2, version_redo_proc: nil) ⇒ String
Updates the version number and changelog.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/reissue.rb', line 19 def self.call( version_file:, changelog_file: "CHANGELOG.md", segment: "patch", date: "Unreleased", changes: {}, version_limit: 2, version_redo_proc: nil ) version_updater = VersionUpdater.new(version_file, version_redo_proc:) new_version = version_updater.call(segment, version_file:) if changelog_file changelog_updater = ChangelogUpdater.new(changelog_file) changelog_updater.call(new_version, date:, changes:, changelog_file:, version_limit:) end new_version end |
.finalize(date = Date.today, changelog_file: "CHANGELOG.md") ⇒ Array
Finalizes the changelog for an unreleased version to set the release date.
43 44 45 46 47 |
# File 'lib/reissue.rb', line 43 def self.finalize(date = Date.today, changelog_file: "CHANGELOG.md") changelog_updater = ChangelogUpdater.new(changelog_file) changelog = changelog_updater.finalize(date:, changelog_file:) changelog["versions"].first.slice("version", "date").values end |
.greeks ⇒ Object
2 3 4 |
# File 'lib/reissue/version_updater.rb', line 2 module_function def greeks %w[alpha beta gamma delta epsilon zeta eta theta kappa lambda mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega] end |
.reformat(file, version_limit: 2) ⇒ Object
Reformats the changelog file to ensure it is correctly formatted.
53 54 55 56 |
# File 'lib/reissue.rb', line 53 def self.reformat(file, version_limit: 2) changelog_updater = ChangelogUpdater.new(file) changelog_updater.reformat(version_limit:) end |