Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-sshkit for openSUSE:Factory checked in at 2021-01-21 21:56:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-sshkit (Old) and /work/SRC/openSUSE:Factory/.rubygem-sshkit.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sshkit" Thu Jan 21 21:56:15 2021 rev:29 rq:865223 version:1.21.2 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-sshkit/rubygem-sshkit.changes 2020-05-11 13:40:03.580954813 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-sshkit.new.28504/rubygem-sshkit.changes 2021-01-21 21:56:18.437833716 +0100 @@ -1,0 +2,7 @@ +Wed Jan 20 13:25:14 UTC 2021 - Stephan Kulow <[email protected]> + +updated to version 1.21.2 + see installed CHANGELOG.md + + +------------------------------------------------------------------- Old: ---- sshkit-1.21.0.gem New: ---- sshkit-1.21.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-sshkit.spec ++++++ --- /var/tmp/diff_new_pack.atnIxA/_old 2021-01-21 21:56:19.457834427 +0100 +++ /var/tmp/diff_new_pack.atnIxA/_new 2021-01-21 21:56:19.461834430 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-sshkit # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-sshkit -Version: 1.21.0 +Version: 1.21.2 Release: 0 %define mod_name sshkit %define mod_full_name %{mod_name}-%{version} ++++++ sshkit-1.21.0.gem -> sshkit-1.21.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2020-03-05 03:02:26.000000000 +0100 +++ new/.travis.yml 2021-01-18 18:29:48.000000000 +0100 @@ -1,5 +1,8 @@ language: ruby rvm: + - 3.0 + - 2.7 + - 2.6 - 2.5 - 2.4 - 2.3 @@ -8,7 +11,7 @@ - 2.0 branches: only: - - master + - master matrix: include: # Run Danger only once, on 2.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/EXAMPLES.md new/EXAMPLES.md --- old/EXAMPLES.md 2020-03-05 03:02:26.000000000 +0100 +++ new/EXAMPLES.md 2021-01-18 18:29:48.000000000 +0100 @@ -171,6 +171,7 @@ SSHKit::Backend::Netssh.configure do |ssh| ssh.connection_timeout = 30 ssh.ssh_options = { + user: 'adifferentuser', keys: %w(/home/user/.ssh/id_rsa), forward_agent: false, auth_methods: %w(publickey password) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2020-03-05 03:02:26.000000000 +0100 +++ new/Gemfile 2021-01-18 18:29:48.000000000 +0100 @@ -2,11 +2,6 @@ gemspec -platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'json' -end - # public_suffix 3+ requires ruby 2.1+ if Gem::Requirement.new('< 2.1').satisfied_by?(Gem::Version.new(RUBY_VERSION)) gem 'public_suffix', '< 3' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Vagrantfile new/Vagrantfile --- old/Vagrantfile 2020-03-05 03:02:26.000000000 +0100 +++ new/Vagrantfile 2021-01-18 18:29:48.000000000 +0100 @@ -2,6 +2,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = 'hashicorp/precise64' + config.vm.provision "shell", inline: <<-SHELL + echo 'ClientAliveInterval 1' >> /etc/ssh/sshd_config + echo 'ClientAliveCountMax 1' >> /etc/ssh/sshd_config + service ssh restart + SHELL json_config_path = File.join("test", "boxes.json") list = File.open(json_config_path).read Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sshkit/backends/connection_pool/cache.rb new/lib/sshkit/backends/connection_pool/cache.rb --- old/lib/sshkit/backends/connection_pool/cache.rb 2020-03-05 03:02:26.000000000 +0100 +++ new/lib/sshkit/backends/connection_pool/cache.rb 2021-01-18 18:29:48.000000000 +0100 @@ -36,12 +36,12 @@ def evict # Peek at the first connection to see if it is still fresh. If so, we can # return right away without needing to use `synchronize`. - first_expires_at, _connection = connections.first - return if first_expires_at.nil? || fresh?(first_expires_at) + first_expires_at, first_conn = connections.first + return if (first_expires_at.nil? || fresh?(first_expires_at)) && !closed?(first_conn) connections.synchronize do - fresh, stale = connections.partition do |expires_at, _| - fresh?(expires_at) + fresh, stale = connections.partition do |expires_at, conn| + fresh?(expires_at) && !closed?(conn) end connections.replace(fresh) stale.each { |_, conn| closer.call(conn) } @@ -71,6 +71,13 @@ end def closed?(conn) - conn.respond_to?(:closed?) && conn.closed? + return true if conn.respond_to?(:closed?) && conn.closed? + # test if connection is alive + conn.process(0) if conn.respond_to?(:process) + return false + rescue IOError => e + # connection is closed by server + return true if e.message == 'closed stream' + raise end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sshkit/version.rb new/lib/sshkit/version.rb --- old/lib/sshkit/version.rb 2020-03-05 03:02:26.000000000 +0100 +++ new/lib/sshkit/version.rb 2021-01-18 18:29:48.000000000 +0100 @@ -1,3 +1,3 @@ module SSHKit - VERSION = "1.21.0".freeze + VERSION = "1.21.2".freeze end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2020-03-05 03:02:26.000000000 +0100 +++ new/metadata 2021-01-18 18:29:48.000000000 +0100 @@ -1,15 +1,15 @@ --- !ruby/object:Gem::Specification name: sshkit version: !ruby/object:Gem::Version - version: 1.21.0 + version: 1.21.2 platform: ruby authors: - Lee Hambley - Tom Clements -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2020-03-05 00:00:00.000000000 Z +date: 2021-01-18 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: net-ssh @@ -275,7 +275,7 @@ - MIT metadata: changelog_uri: https://github.com/capistrano/sshkit/releases -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -290,8 +290,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.1.2 -signing_key: +rubygems_version: 3.2.5 +signing_key: specification_version: 4 summary: SSHKit makes it easy to write structured, testable SSH commands in Ruby test_files: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/functional/backends/test_netssh.rb new/test/functional/backends/test_netssh.rb --- old/test/functional/backends/test_netssh.rb 2020-03-05 03:02:26.000000000 +0100 +++ new/test/functional/backends/test_netssh.rb 2021-01-18 18:29:48.000000000 +0100 @@ -180,7 +180,7 @@ size = 25 fills = SecureRandom.random_bytes(1024*1024) file_name = "/tmp/file-#{size}.txt" - File.open(file_name, 'w') do |f| + File.open(file_name, 'wb') do |f| (size).times {f.write(fills) } end file_contents = "" @@ -188,7 +188,7 @@ upload!(file_name, file_name) file_contents = download!(file_name) end.run - assert_equal File.open(file_name).read, file_contents + assert_equal File.open(file_name, 'rb').read, file_contents end def test_upload_via_pathname @@ -212,6 +212,20 @@ end.run assert_equal("Enter Data\nCaptured SOME DATA", captured_command_result) end + + def test_connection_pool_keepalive + # ensure we enable connection pool + SSHKit::Backend::Netssh.pool.idle_timeout = 10 + Netssh.new(a_host) do |_host| + test :false + end.run + sleep 2.5 + captured_command_result = nil + Netssh.new(a_host) do |_host| + captured_command_result = capture(:echo, 'some_value') + end.run + assert_equal "some_value", captured_command_result + end end end
