Class: AmusingGit::Setup

Inherits:
Object
  • Object
show all
Includes:
PrettyPrinter
Defined in:
lib/amusing_git/setup.rb

Instance Method Summary collapse

Methods included from PrettyPrinter

#colorize, #green, #print_error, #print_info, #print_success, #red, #yellow

Instance Method Details

#setup_exists?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/amusing_git/setup.rb', line 22

def setup_exists?
  File.exists? "#{ENV['HOME']}/.amusing_git"
end

#startObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/amusing_git/setup.rb', line 9

def start
  if setup_exists?
    print_info "You already have amusing git setup, skipping...\n"
    return
  end

  print_info "Setting up amusing git configuration...\n"
  create_amusing_git_dir
  write_config
  copy_messages
  print_success "Setup is completed!\n"
end