Class: Allages::YamlGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/yaml_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_directories_structureObject



22
23
24
25
# File 'lib/generators/yaml_generator.rb', line 22

def create_directories_structure
  empty_directory Allages.config.input_dir
  empty_directory "#{Allages.config.input_dir}/Unreleased"
end

#create_initializer_fileObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/generators/yaml_generator.rb', line 7

def create_initializer_file
  create_file ".allages.yml", <<~CONFIG
  # input_dir: 'changelogs'
  # output_file: 'stdout'
  # include_unreleased: false
  # header: |+
  #   # 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).
  #
  CONFIG
end