Skip to content

Commit

Permalink
Merge pull request #340 from steved/sdavidovitz/warnings
Browse files Browse the repository at this point in the history
Silence interpreter warnings
  • Loading branch information
leehambley committed Mar 18, 2016
2 parents c9c4ab1 + 821264c commit 6a94cdc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/sshkit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SSHKit

class << self

attr_accessor :config
attr_writer :config

def configure
@@config ||= Configuration.new
Expand Down
4 changes: 3 additions & 1 deletion lib/sshkit/backends/connection_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ def close_connections
end
end

private
protected

attr_reader :caches, :timed_out_connections

private

def cache_enabled?
idle_timeout && idle_timeout > 0
end
Expand Down
4 changes: 3 additions & 1 deletion lib/sshkit/backends/connection_pool/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ def clear
end
end

private
protected

attr_reader :connections, :idle_timeout, :closer

private

def fresh?(expires_at)
expires_at > Time.now
end
Expand Down
2 changes: 2 additions & 0 deletions lib/sshkit/backends/netssh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module Net
module SSH
class Config
class << self
remove_method :default_files

def default_files
@@default_files + [File.join(Dir.pwd, '.ssh/config')]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sshkit/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module SSHKit

class Configuration

attr_accessor :umask, :output_verbosity
attr_accessor :umask
attr_writer :output, :backend, :default_env, :default_runner

def output
Expand Down
4 changes: 2 additions & 2 deletions lib/sshkit/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def properties
class SimpleHostParser

def self.suitable?(host_string)
!host_string.match(/[:|@]/)
!host_string.match(/:|@/)
end

def initialize(host_string)
Expand Down Expand Up @@ -127,7 +127,7 @@ def attributes
class HostWithPortParser < SimpleHostParser

def self.suitable?(host_string)
!host_string.match(/[@|\[|\]]/)
!host_string.match(/@|\[|\]/)
end

def port
Expand Down

0 comments on commit 6a94cdc

Please sign in to comment.