Sha256: f1e991183fc420d60216d6eb1390000e7e2c8f4edf58316889068ceff0481d5c

Contents?: true

Size: 499 Bytes

Versions: 4

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require 'ssh_config/loader.rb'

# A module for listing out ssh_config(5)
module SshConfig
  module_function

  def default_loader
    @default_loader ||= Loader.new
  end

  def load_defaults
    {}.tap do |result|
      %w(/etc/ssh/ssh_config ~/.ssh/config)
        .map { |path| File.expand_path path }
        .select { |path| File.readable? path }
        .each do |path|
          result.merge! default_loader.parse(File.read(path))
        end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ssh-host-lister-0.3.0 lib/ssh_config.rb
ssh-host-lister-0.2.1 lib/ssh_config.rb
ssh-host-lister-0.2.0 lib/ssh_config.rb
ssh-host-lister-0.1.0 lib/ssh_config.rb