net-ssh 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +5 -0
 - data/lib/net/ssh.rb +20 -7
 - data/lib/net/ssh/version.rb +1 -1
 - data/net-ssh.gemspec +2 -2
 - metadata +2 -2
 
    
        data/CHANGELOG.rdoc
    CHANGED
    
    
    
        data/lib/net/ssh.rb
    CHANGED
    
    | 
         @@ -153,14 +153,8 @@ module Net 
     | 
|
| 
       153 
153 
     | 
    
         
             
                    raise ArgumentError, "invalid option(s): #{invalid_options.join(', ')}"
         
     | 
| 
       154 
154 
     | 
    
         
             
                  end
         
     | 
| 
       155 
155 
     | 
    
         | 
| 
       156 
     | 
    
         
            -
                  files = case options.fetch(:config, true)
         
     | 
| 
       157 
     | 
    
         
            -
                    when true then Net::SSH::Config.default_files
         
     | 
| 
       158 
     | 
    
         
            -
                    when false, nil then []
         
     | 
| 
       159 
     | 
    
         
            -
                    else Array(options[:config])
         
     | 
| 
       160 
     | 
    
         
            -
                    end
         
     | 
| 
       161 
     | 
    
         
            -
                  
         
     | 
| 
       162 
156 
     | 
    
         
             
                  options[:user] = user if user
         
     | 
| 
       163 
     | 
    
         
            -
                  options =  
     | 
| 
      
 157 
     | 
    
         
            +
                  options = configuration_for(host, options.fetch(:config, true)).merge(options)
         
     | 
| 
       164 
158 
     | 
    
         
             
                  host = options.fetch(:host_name, host)
         
     | 
| 
       165 
159 
     | 
    
         | 
| 
       166 
160 
     | 
    
         
             
                  if !options.key?(:logger)
         
     | 
| 
         @@ -196,5 +190,24 @@ module Net 
     | 
|
| 
       196 
190 
     | 
    
         
             
                    raise AuthenticationFailed, user
         
     | 
| 
       197 
191 
     | 
    
         
             
                  end
         
     | 
| 
       198 
192 
     | 
    
         
             
                end
         
     | 
| 
      
 193 
     | 
    
         
            +
             
     | 
| 
      
 194 
     | 
    
         
            +
                # Returns a hash of the configuration options for the given host, as read
         
     | 
| 
      
 195 
     | 
    
         
            +
                # from the SSH configuration file(s). If +use_ssh_config+ is true (the
         
     | 
| 
      
 196 
     | 
    
         
            +
                # default), this will load configuration from both ~/.ssh/config and
         
     | 
| 
      
 197 
     | 
    
         
            +
                # /etc/ssh_config. If +use_ssh_config+ is nil or false, nothing will be
         
     | 
| 
      
 198 
     | 
    
         
            +
                # loaded (and an empty hash returned). Otherwise, +use_ssh_config+ may
         
     | 
| 
      
 199 
     | 
    
         
            +
                # be a file name (or array of file names) of SSH configuration file(s)
         
     | 
| 
      
 200 
     | 
    
         
            +
                # to read.
         
     | 
| 
      
 201 
     | 
    
         
            +
                #
         
     | 
| 
      
 202 
     | 
    
         
            +
                # See Net::SSH::Config for the full description of all supported options.
         
     | 
| 
      
 203 
     | 
    
         
            +
                def self.configuration_for(host, use_ssh_config=true)
         
     | 
| 
      
 204 
     | 
    
         
            +
                  files = case use_ssh_config
         
     | 
| 
      
 205 
     | 
    
         
            +
                    when true then Net::SSH::Config.default_files
         
     | 
| 
      
 206 
     | 
    
         
            +
                    when false, nil then return {}
         
     | 
| 
      
 207 
     | 
    
         
            +
                    else Array(use_ssh_config)
         
     | 
| 
      
 208 
     | 
    
         
            +
                    end
         
     | 
| 
      
 209 
     | 
    
         
            +
                  
         
     | 
| 
      
 210 
     | 
    
         
            +
                  Net::SSH::Config.for(host, files)
         
     | 
| 
      
 211 
     | 
    
         
            +
                end
         
     | 
| 
       199 
212 
     | 
    
         
             
              end
         
     | 
| 
       200 
213 
     | 
    
         
             
            end
         
     | 
    
        data/lib/net/ssh/version.rb
    CHANGED
    
    
    
        data/net-ssh.gemspec
    CHANGED
    
    | 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       2 
2 
     | 
    
         
             
              s.name = %q{net-ssh}
         
     | 
| 
       3 
     | 
    
         
            -
              s.version = "2.0. 
     | 
| 
      
 3 
     | 
    
         
            +
              s.version = "2.0.10"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       6 
6 
     | 
    
         
             
              s.authors = ["Jamis Buck"]
         
     | 
| 
       7 
     | 
    
         
            -
              s.date = %q{2009-02- 
     | 
| 
      
 7 
     | 
    
         
            +
              s.date = %q{2009-02-04}
         
     | 
| 
       8 
8 
     | 
    
         
             
              s.description = %q{a pure-Ruby implementation of the SSH2 client protocol}
         
     | 
| 
       9 
9 
     | 
    
         
             
              s.email = %q{jamis@jamisbuck.org}
         
     | 
| 
       10 
10 
     | 
    
         
             
              s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/net/ssh/authentication/agent.rb", "lib/net/ssh/authentication/constants.rb", "lib/net/ssh/authentication/key_manager.rb", "lib/net/ssh/authentication/methods/abstract.rb", "lib/net/ssh/authentication/methods/hostbased.rb", "lib/net/ssh/authentication/methods/keyboard_interactive.rb", "lib/net/ssh/authentication/methods/password.rb", "lib/net/ssh/authentication/methods/publickey.rb", "lib/net/ssh/authentication/pageant.rb", "lib/net/ssh/authentication/session.rb", "lib/net/ssh/buffer.rb", "lib/net/ssh/buffered_io.rb", "lib/net/ssh/config.rb", "lib/net/ssh/connection/channel.rb", "lib/net/ssh/connection/constants.rb", "lib/net/ssh/connection/session.rb", "lib/net/ssh/connection/term.rb", "lib/net/ssh/errors.rb", "lib/net/ssh/key_factory.rb", "lib/net/ssh/known_hosts.rb", "lib/net/ssh/loggable.rb", "lib/net/ssh/packet.rb", "lib/net/ssh/prompt.rb", "lib/net/ssh/proxy/errors.rb", "lib/net/ssh/proxy/http.rb", "lib/net/ssh/proxy/socks4.rb", "lib/net/ssh/proxy/socks5.rb", "lib/net/ssh/ruby_compat.rb", "lib/net/ssh/service/forward.rb", "lib/net/ssh/test/channel.rb", "lib/net/ssh/test/extensions.rb", "lib/net/ssh/test/kex.rb", "lib/net/ssh/test/local_packet.rb", "lib/net/ssh/test/packet.rb", "lib/net/ssh/test/remote_packet.rb", "lib/net/ssh/test/script.rb", "lib/net/ssh/test/socket.rb", "lib/net/ssh/test.rb", "lib/net/ssh/transport/algorithms.rb", "lib/net/ssh/transport/cipher_factory.rb", "lib/net/ssh/transport/constants.rb", "lib/net/ssh/transport/hmac/abstract.rb", "lib/net/ssh/transport/hmac/md5.rb", "lib/net/ssh/transport/hmac/md5_96.rb", "lib/net/ssh/transport/hmac/none.rb", "lib/net/ssh/transport/hmac/sha1.rb", "lib/net/ssh/transport/hmac/sha1_96.rb", "lib/net/ssh/transport/hmac.rb", "lib/net/ssh/transport/identity_cipher.rb", "lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb", "lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb", "lib/net/ssh/transport/kex.rb", "lib/net/ssh/transport/openssl.rb", "lib/net/ssh/transport/packet_stream.rb", "lib/net/ssh/transport/server_version.rb", "lib/net/ssh/transport/session.rb", "lib/net/ssh/transport/state.rb", "lib/net/ssh/verifiers/lenient.rb", "lib/net/ssh/verifiers/null.rb", "lib/net/ssh/verifiers/strict.rb", "lib/net/ssh/version.rb", "lib/net/ssh.rb", "README.rdoc", "THANKS.rdoc"]
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: net-ssh
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.10
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jamis Buck
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2009-02- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2009-02-04 00:00:00 -07:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |