Class: VpsCli::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/vps_cli/configuration.rb

Overview

Used for keeping a consistent config across the entire project

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/vps_cli/configuration.rb', line 17

def initialize
  # Values for items to be copied to
  @local_dir = Dir.home
  @backup_dir = File.join(Dir.home, 'backup_files')
  @local_sshd_config = File.join(Dir.home, '.ssh', 'sshd_config')
  @sshd_backup = File.join(@backup_dir, 'sshd_config.orig')

  # values for items to be copied from
  # set to nil so that someone must set a path
  @config_files = nil
  @dotfiles = nil
  @misc_files = nil

  # Location of your SOPS encrypted yaml file
  @credentials = nil
  @netrc = nil

  # used for displaying info
  @verbose = false
  @interactive = true
  @testing = false
end

Instance Attribute Details

#backup_dirObject

local files



7
8
9
# File 'lib/vps_cli/configuration.rb', line 7

def backup_dir
  @backup_dir
end

#config_filesObject

configuration files to be used



11
12
13
# File 'lib/vps_cli/configuration.rb', line 11

def config_files
  @config_files
end

#credentialsObject

Returns the value of attribute credentials.



12
13
14
# File 'lib/vps_cli/configuration.rb', line 12

def credentials
  @credentials
end

#dotfilesObject

configuration files to be used



11
12
13
# File 'lib/vps_cli/configuration.rb', line 11

def dotfiles
  @dotfiles
end

#interactiveObject

used for displaying info



15
16
17
# File 'lib/vps_cli/configuration.rb', line 15

def interactive
  @interactive
end

#local_dirObject

local files



7
8
9
# File 'lib/vps_cli/configuration.rb', line 7

def local_dir
  @local_dir
end

#local_sshd_configObject

local files



7
8
9
# File 'lib/vps_cli/configuration.rb', line 7

def local_sshd_config
  @local_sshd_config
end

#misc_filesObject

configuration files to be used



11
12
13
# File 'lib/vps_cli/configuration.rb', line 11

def misc_files
  @misc_files
end

#netrcObject

Returns the value of attribute netrc.



12
13
14
# File 'lib/vps_cli/configuration.rb', line 12

def netrc
  @netrc
end

#sshd_backupObject

Returns the value of attribute sshd_backup.



8
9
10
# File 'lib/vps_cli/configuration.rb', line 8

def sshd_backup
  @sshd_backup
end

#testingObject

used for displaying info



15
16
17
# File 'lib/vps_cli/configuration.rb', line 15

def testing
  @testing
end

#verboseObject

used for displaying info



15
16
17
# File 'lib/vps_cli/configuration.rb', line 15

def verbose
  @verbose
end