Class: WayOfWorking::Changelog::Keepachangelog::Generators::Init

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/way_of_working/changelog/keepachangelog/generators/init.rb

Overview

This class generates the CHANGELOG.md file, generating sections based on git tags and commit messages (where possible).

Constant Summary collapse

HEADER_TEXT =
<<~TEXT
  # Changelog

  All notable changes to this project will be documented in this file.

  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

TEXT

Instance Method Summary collapse

Instance Method Details

#add_changelog_to_projectObject



26
27
28
29
30
# File 'lib/way_of_working/changelog/keepachangelog/generators/init.rb', line 26

def add_changelog_to_project
  create_file 'CHANGELOG.md' do
    HEADER_TEXT + releases + footer
  end
end

#copy_way_of_working_documentationObject



32
33
34
# File 'lib/way_of_working/changelog/keepachangelog/generators/init.rb', line 32

def copy_way_of_working_documentation
  copy_file 'docs/way_of_working/changelog.md'
end