Class: Codelog::Command::Setup

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

Constant Summary collapse

TEMPLATE_FILE_PATH =
File.dirname(__FILE__).concat('/../../fixtures/template.yml')
CONFIG_FILE_PATH =
File.dirname(__FILE__).concat('/../../fixtures/codelog.yml')
HEADER_FILE_PATH =
File.dirname(__FILE__).concat('/../../fixtures/header.txt')
CHANGELOG_DEFAULT_PATH =
'CHANGELOG.md'.freeze
CHANGELOG_DESTINATION_PATH =
'changelogs/releases/0.0.0.md'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.runObject



15
16
17
# File 'lib/codelog/command/setup.rb', line 15

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

Instance Method Details

#runObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/codelog/command/setup.rb', line 19

def run
  chdir Dir.pwd do
    # This script provides the initial setup for the gem usage.
    puts '== Creating folder structure and template =='
    create_folder_structure
    puts '== Copying fixtures =='
    copy_fixtures
    handle_existing_changelog
  end
end