Class: VpsCli::Configuration
- Inherits:
-
Object
- Object
- VpsCli::Configuration
- Defined in:
- lib/vps_cli/configuration.rb
Overview
Used for keeping a consistent config across the entire project
Instance Attribute Summary collapse
-
#backup_dir ⇒ Object
local files.
-
#config_files ⇒ Object
configuration files to be used.
-
#credentials ⇒ Object
Returns the value of attribute credentials.
-
#dotfiles ⇒ Object
configuration files to be used.
-
#interactive ⇒ Object
used for displaying info.
-
#local_dir ⇒ Object
local files.
-
#local_sshd_config ⇒ Object
local files.
-
#misc_files ⇒ Object
configuration files to be used.
-
#netrc ⇒ Object
Returns the value of attribute netrc.
-
#sshd_backup ⇒ Object
Returns the value of attribute sshd_backup.
-
#testing ⇒ Object
used for displaying info.
-
#verbose ⇒ Object
used for displaying info.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_dir ⇒ Object
local files
7 8 9 |
# File 'lib/vps_cli/configuration.rb', line 7 def backup_dir @backup_dir end |
#config_files ⇒ Object
configuration files to be used
11 12 13 |
# File 'lib/vps_cli/configuration.rb', line 11 def config_files @config_files end |
#credentials ⇒ Object
Returns the value of attribute credentials.
12 13 14 |
# File 'lib/vps_cli/configuration.rb', line 12 def credentials @credentials end |
#dotfiles ⇒ Object
configuration files to be used
11 12 13 |
# File 'lib/vps_cli/configuration.rb', line 11 def dotfiles @dotfiles end |
#interactive ⇒ Object
used for displaying info
15 16 17 |
# File 'lib/vps_cli/configuration.rb', line 15 def interactive @interactive end |
#local_dir ⇒ Object
local files
7 8 9 |
# File 'lib/vps_cli/configuration.rb', line 7 def local_dir @local_dir end |
#local_sshd_config ⇒ Object
local files
7 8 9 |
# File 'lib/vps_cli/configuration.rb', line 7 def local_sshd_config @local_sshd_config end |
#misc_files ⇒ Object
configuration files to be used
11 12 13 |
# File 'lib/vps_cli/configuration.rb', line 11 def misc_files @misc_files end |
#netrc ⇒ Object
Returns the value of attribute netrc.
12 13 14 |
# File 'lib/vps_cli/configuration.rb', line 12 def netrc @netrc end |
#sshd_backup ⇒ Object
Returns the value of attribute sshd_backup.
8 9 10 |
# File 'lib/vps_cli/configuration.rb', line 8 def sshd_backup @sshd_backup end |
#testing ⇒ Object
used for displaying info
15 16 17 |
# File 'lib/vps_cli/configuration.rb', line 15 def testing @testing end |
#verbose ⇒ Object
used for displaying info
15 16 17 |
# File 'lib/vps_cli/configuration.rb', line 15 def verbose @verbose end |