Class: Katip::ChangeLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/katip/change_logger.rb

Constant Summary collapse

COMMIT_URL =
'../../commit/'
ISSUE_URL =
'../../issues/'

Instance Method Summary collapse

Constructor Details

#initialize(file_name = 'CHANGELOG.md', from = nil, to = nil) ⇒ ChangeLogger

initialize

Parameters:

  • file_name (String) (defaults to: 'CHANGELOG.md')

    with path



12
13
14
15
16
# File 'lib/katip/change_logger.rb', line 12

def initialize(file_name='CHANGELOG.md', from=nil, to=nil)
  @file_name = file_name
  @tag_from = from
  @tag_to = to
end

Instance Method Details

#log_changesObject



18
19
20
21
22
23
# File 'lib/katip/change_logger.rb', line 18

def log_changes
  if git_repository?
    output = parse_change_log
    write_file output unless output.empty?
  end
end