Module: Capistrano::MasterKey::Helpers

Defined in:
lib/capistrano/master_key/helpers.rb

Instance Method Summary collapse

Instance Method Details

#check_config_present_errorObject



24
25
26
27
28
29
# File 'lib/capistrano/master_key/helpers.rb', line 24

def check_config_present_error
  puts
  puts "Error - '#{master_key_env}' config not present in '#{fetch(:master_key_local_path)}'."
  puts "Please populate it."
  puts
end

#check_git_tracking_errorObject

error helpers



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/capistrano/master_key/helpers.rb', line 12

def check_git_tracking_error
  puts
  puts "Error - please remove '#{fetch(:master_key_local_path)}' from git:"
  puts
  puts "    $ git rm --cached #{fetch(:master_key_local_path)}"
  puts
  puts "and gitignore it:"
  puts
  puts "    $ echo '#{fetch(:master_key_local_path)}' >> .gitignore"
  puts
end

#check_master_file_exists_errorObject



31
32
33
34
35
# File 'lib/capistrano/master_key/helpers.rb', line 31

def check_master_file_exists_error
  puts
  puts "Error - '#{fetch(:master_key_local_path)}' file does not exists, and it's required."
  puts
end

#master_key_envObject



7
8
9
# File 'lib/capistrano/master_key/helpers.rb', line 7

def master_key_env
  fetch(:master_key_env).to_s
end