Class: Kitsune::Kit::Configuration::Ssh
- Inherits:
-
Object
- Object
- Kitsune::Kit::Configuration::Ssh
- Defined in:
- lib/kitsune/kit/configuration.rb
Instance Method Summary collapse
-
#initialize(user: "deploy", port: 22, key_path: "~/.ssh/id_ed25519", allowed_cidrs: []) ⇒ Ssh
constructor
A new instance of Ssh.
Constructor Details
#initialize(user: "deploy", port: 22, key_path: "~/.ssh/id_ed25519", allowed_cidrs: []) ⇒ Ssh
Returns a new instance of Ssh.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/kitsune/kit/configuration.rb', line 35 def initialize(user: "deploy", port: 22, key_path: "~/.ssh/id_ed25519", allowed_cidrs: []) super( user: user.to_s, port: Integer(port), key_path: Pathname(key_path.to_s)..to_s, allowed_cidrs: Array(allowed_cidrs).map(&:to_s).freeze ) rescue ArgumentError, TypeError raise Errors::ConfigurationError, "ssh.port must be an integer" end |