Class: Arcanus::Command::Setup

Inherits:
Base
  • Object
show all
Defined in:
lib/arcanus/command/setup.rb

Instance Method Summary collapse

Methods inherited from Base

description, #execute_command, from_arguments, #initialize, #run, short_name

Methods included from Utils

camel_case, deep_dup, snake_case

Constructor Details

This class inherits a constructor from Arcanus::Command::Base

Instance Method Details

#executeObject


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/arcanus/command/setup.rb', line 7

def execute
  return if already_has_key?

  ui.info 'This repository does not have an Arcanus key.'
  ui.info "Let's generate one for you."
  ui.newline

  create_directory
  create_key
  create_chest
  create_gitignore

  ui.newline
  ui.success 'You can safely commit the following files:'
  ui.info Arcanus::CHEST_FILE_PATH
  ui.info Arcanus::LOCKED_KEY_PATH
  ui.success 'You must never commit the unlocked key file:'
  ui.info Arcanus::UNLOCKED_KEY_PATH
end