Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence interpreter warnings #340

Merged
merged 6 commits into from
Mar 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sshkit.rb
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ module SSHKit

class << self

attr_accessor :config
attr_writer :config

def configure
@@config ||= Configuration.new
4 changes: 3 additions & 1 deletion lib/sshkit/backends/connection_pool.rb
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion lib/sshkit/backends/connection_pool/cache.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions lib/sshkit/backends/netssh.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/sshkit/configuration.rb
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions lib/sshkit/host.rb
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ def properties
class SimpleHostParser

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

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

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

def port