Class: Codelog::Command::New

Inherits:
Object
  • Object
show all
Includes:
FileUtils
Defined in:
lib/codelog/command/new.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.runObject



8
9
10
# File 'lib/codelog/command/new.rb', line 8

def self.run
  Codelog::Command::New.new.run
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/codelog/command/new.rb', line 12

def run
  chdir Dir.pwd do
    # This script create a change file for the changelog documentation.

    full_file_name = "changelogs/unreleased/#{Time.now.to_i}_change.yml"

    puts "== Creating #{full_file_name} change file based on example =="
    system! "cp changelogs/template.yml #{full_file_name}"
  end
end