Sha256: d62ddbd50e1fb271a9f328c32b281300b648a4c9cad12dd0464f66a72b7b7514
Contents?: true
Size: 890 Bytes
Versions: 1
Compression:
Stored size: 890 Bytes
Contents
module Sshster class Config attr_accessor :options, :config_path def initialize(config_path = nil) @config_path = config_path || default_file_path @options = default_options end def merge merge_config(config_path) end private def parse_config(config_path) YAML.safe_load(File.read(config_path)) end def merge_config(config_path) return @options unless File.exist?(config_path) @options.merge!(parse_config(config_path)) end def default_options { 'forward_agent' => true, 'user' => 'deploy', 'request_tty' => true, 'screen_session' => 'deploy', 'ssh_config' => default_ssh_config_path, } end def default_file_path ENV['HOME'] + '/.ssh/sshster.yml' end def default_ssh_config_path ENV['HOME'] + '/.ssh' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sshster-0.1.0 | lib/sshster/config.rb |