lib/beaker/local_connection.rb in beaker-4.38.1 vs lib/beaker/local_connection.rb in beaker-4.39.0
- old
+ new
@@ -17,11 +17,11 @@
connection = new options
connection.connect
connection
end
- def connect options = {}
+ def connect _options = {}
@logger.debug "Local connection, no connection to start"
end
def close
@logger.debug "Local connection, no connection to close"
@@ -33,21 +33,21 @@
yield
ensure
ENV.replace(backup)
end
- def execute command, options = {}, stdout_callback = nil, stderr_callback = stdout_callback
+ def execute command, _options = {}, stdout_callback = nil, _stderr_callback = stdout_callback
result = Result.new(@hostname, command)
envs = {}
if File.readable?(@ssh_env_file)
File.foreach(@ssh_env_file) do |line|
key, value = line.split('=')
envs[key] = value
end
end
begin
- clean_env = ENV.reject{ |k| k =~ /^BUNDLE|^RUBY|^GEM/ }
+ clean_env = ENV.reject{ |k| /^BUNDLE|^RUBY|^GEM/.match?(k) }
with_env(clean_env) do
std_out, std_err, status = Open3.capture3(envs, command)
result.stdout << std_out
result.stderr << std_err