Hello community,

here is the log from the commit of package rubygem-sshkit for openSUSE:Factory 
checked in at 2018-03-06 10:46:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sshkit (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-sshkit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-sshkit"

Tue Mar  6 10:46:06 2018 rev:22 rq:581504 version:1.16.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sshkit/rubygem-sshkit.changes    
2017-08-21 11:37:13.028701913 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-sshkit.new/rubygem-sshkit.changes       
2018-03-06 10:46:08.486769153 +0100
@@ -1,0 +2,37 @@
+Tue Feb 27 05:35:47 UTC 2018 - factory-a...@kulow.org
+
+- updated to version 1.16.0
+ see installed CHANGELOG.md
+
+  ## [1.16.0][] (2018-02-03)
+  
+    * [#417](https://github.com/capistrano/sshkit/pull/417): Cache key 
generation for connections becomes slow when `known_hosts` is a valid `net/ssh` 
options and `known_hosts` file is big. This changes the cache key generation 
and fixes performance issue - [@ElvinEfendi](https://github.com/ElvinEfendi).
+  
+  ## [1.15.1][] (2017-11-18)
+  
+  This is a small bug-fix release that fixes problems with `upload!` and 
`download!` that were inadvertently introduced in 1.15.0.
+  
+  ### Breaking changes
+  
+    * None
+  
+  ### Bug fixes
+  
+    * [#410](https://github.com/capistrano/sshkit/pull/410): fix NoMethodError 
when using upload!/download! with Pathnames - 
[@UnderpantsGnome](https://github.com/UnderpantsGnome)
+    * [#411](https://github.com/capistrano/sshkit/pull/410): fix 
upload!/download! when using relative paths outside of `within` blocks -  
[@Fjan](https://github.com/Fjan)
+  
+  ## [1.15.0][] (2017-11-03)
+  
+  ### New features
+  
+    * [#408](https://github.com/capistrano/sshkit/pull/408): upload! and 
download! now respect `within` - [@sj26](https://github.com/sj26)
+  
+  ### Potentially breaking changes
+  
+    * `upload!` and `download!` now support remote paths which are
+      relative to the `within` working directory. They were previously 
documented
+      as only supporting absolute paths, but relative paths still worked 
relative
+      to the remote working directory. If you rely on the previous behaviour 
you
+      may need to adjust your code.
+
+-------------------------------------------------------------------

Old:
----
  sshkit-1.14.0.gem

New:
----
  sshkit-1.16.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-sshkit.spec ++++++
--- /var/tmp/diff_new_pack.18JWcj/_old  2018-03-06 10:46:09.190743722 +0100
+++ /var/tmp/diff_new_pack.18JWcj/_new  2018-03-06 10:46:09.194743578 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-sshkit
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # 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.14.0
+Version:        1.16.0
 Release:        0
 %define mod_name sshkit
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 Url:            http://github.com/capistrano/sshkit
-Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        SSHKit makes it easy to write structured, testable SSH 
commands in
 License:        MIT

++++++ sshkit-1.14.0.gem -> sshkit-1.16.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2017-06-30 18:24:59.000000000 +0200
+++ new/CHANGELOG.md    2018-02-04 02:40:20.000000000 +0100
@@ -7,6 +7,37 @@
 
   * Your contribution here!
 
+## [1.16.0][] (2018-02-03)
+
+  * [#417](https://github.com/capistrano/sshkit/pull/417): Cache key 
generation for connections becomes slow when `known_hosts` is a valid `net/ssh` 
options and `known_hosts` file is big. This changes the cache key generation 
and fixes performance issue - [@ElvinEfendi](https://github.com/ElvinEfendi).
+
+## [1.15.1][] (2017-11-18)
+
+This is a small bug-fix release that fixes problems with `upload!` and 
`download!` that were inadvertently introduced in 1.15.0.
+
+### Breaking changes
+
+  * None
+
+### Bug fixes
+
+  * [#410](https://github.com/capistrano/sshkit/pull/410): fix NoMethodError 
when using upload!/download! with Pathnames - 
[@UnderpantsGnome](https://github.com/UnderpantsGnome)
+  * [#411](https://github.com/capistrano/sshkit/pull/410): fix 
upload!/download! when using relative paths outside of `within` blocks -  
[@Fjan](https://github.com/Fjan)
+
+## [1.15.0][] (2017-11-03)
+
+### New features
+
+  * [#408](https://github.com/capistrano/sshkit/pull/408): upload! and 
download! now respect `within` - [@sj26](https://github.com/sj26)
+
+### Potentially breaking changes
+
+  * `upload!` and `download!` now support remote paths which are
+    relative to the `within` working directory. They were previously documented
+    as only supporting absolute paths, but relative paths still worked relative
+    to the remote working directory. If you rely on the previous behaviour you
+    may need to adjust your code.
+
 ## [1.14.0][] (2017-06-30)
 
 ### Breaking changes
@@ -707,7 +738,10 @@
 
 First release.
 
-[Unreleased]: https://github.com/capistrano/sshkit/compare/v1.14.0...HEAD
+[Unreleased]: https://github.com/capistrano/sshkit/compare/v1.16.0...HEAD
+[1.16.0]: https://github.com/capistrano/sshkit/compare/v1.15.1...v1.16.0
+[1.15.1]: https://github.com/capistrano/sshkit/compare/v1.15.0...v1.15.1
+[1.15.0]: https://github.com/capistrano/sshkit/compare/v1.14.0...v1.15.0
 [1.14.0]: https://github.com/capistrano/sshkit/compare/v1.13.1...v1.14.0
 [1.13.1]: https://github.com/capistrano/sshkit/compare/v1.13.0...v1.13.1
 [1.13.0]: https://github.com/capistrano/sshkit/compare/v1.12.0...v1.13.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EXAMPLES.md new/EXAMPLES.md
--- old/EXAMPLES.md     2017-06-30 18:24:59.000000000 +0200
+++ new/EXAMPLES.md     2018-02-04 02:40:20.000000000 +0100
@@ -90,6 +90,7 @@
 ```
 
 ## Download a file from disk
+
 ```ruby
 on roles(:all) do
   puts 'Downloading DB Backup File'
@@ -106,8 +107,18 @@
 end
 ```
 
-**Note:** The `upload!()` method doesn't honor the values of `within()`, `as()`
-etc, this will be improved as the library matures, but we're not there yet.
+Upload and download will respect the `within()` directories:
+
+```ruby
+on hosts do |host|
+  within 'my/app/directory' do
+    upload! 'database.yml', 'config/database.yml'
+  end
+end
+```
+
+**Note:** The `upload!()` method doesn't honor the values of `as()` etc, this
+will be improved as the library matures, but we're not there yet.
 
 ## Upload a file from a stream
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2017-06-30 18:24:59.000000000 +0200
+++ new/Gemfile 2018-02-04 02:40:20.000000000 +0100
@@ -13,3 +13,13 @@
 if Gem::Requirement.new('>= 
2.1.0').satisfied_by?(Gem::Version.new(RUBY_VERSION))
   gem 'chandler', '>= 0.1.1'
 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'
+end
+
+# rbnacl-libsodium > 1.0.15.1 requires Ruby 2.2.6+
+if Gem::Requirement.new('< 
2.2.6').satisfied_by?(Gem::Version.new(RUBY_VERSION))
+  gem 'rbnacl-libsodium', '<= 1.0.15.1'
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2017-06-30 18:24:59.000000000 +0200
+++ new/README.md       2018-02-04 02:40:20.000000000 +0100
@@ -67,7 +67,7 @@
 #### Transferring files
 
 All backends also support the `upload!` and `download!` methods for 
transferring files.
-For the remote backend, the file is tranferred with scp.
+For the remote backend, the file is transferred with scp.
 
 ```ruby
 on '1.example.com' do
@@ -530,7 +530,7 @@
 
 ## Tunneling and other related SSH themes
 
-In order to do special gymnasitcs with SSH, tunneling, aliasing, complex 
options, etc with SSHKit it is possible to use [the underlying Net::SSH 
API](https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md#setting-global-ssh-options)
 however in many cases it is preferred to use the system SSH configuration file 
at [`~/.ssh/config`](http://man.cx/ssh_config). This allows you to have 
personal configuration tied to your machine that does not have to be committed 
with the repository. If this is not suitable (everyone on the team needs a 
proxy command, or some special aliasing) a file in the same format can be 
placed in the project directory at `~/yourproject/.ssh/config`, this will be 
merged with the system settings in `~/.ssh/config`, and with any configuration 
specified in 
[`SSHKit::Backend::Netssh.config.ssh_options`](https://github.com/capistrano/sshkit/blob/master/lib/sshkit/backends/netssh.rb#L133).
+In order to do special gymnastics with SSH, tunneling, aliasing, complex 
options, etc with SSHKit it is possible to use [the underlying Net::SSH 
API](https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md#setting-global-ssh-options)
 however in many cases it is preferred to use the system SSH configuration file 
at [`~/.ssh/config`](http://man.cx/ssh_config). This allows you to have 
personal configuration tied to your machine that does not have to be committed 
with the repository. If this is not suitable (everyone on the team needs a 
proxy command, or some special aliasing) a file in the same format can be 
placed in the project directory at `~/yourproject/.ssh/config`, this will be 
merged with the system settings in `~/.ssh/config`, and with any configuration 
specified in 
[`SSHKit::Backend::Netssh.config.ssh_options`](https://github.com/capistrano/sshkit/blob/master/lib/sshkit/backends/netssh.rb#L133).
 
 These system level files are the preferred way of setting up tunneling and 
proxies because the system implementations of these things are faster and 
better than the Ruby implementations you would get if you were to configure 
them through Net::SSH. In cases where it's not possible (Windows?), it should 
be possible to make use of the Net::SSH APIs to setup tunnels and proxy 
commands before deferring control to Capistrano/SSHKit..
 
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.rb 
new/lib/sshkit/backends/connection_pool.rb
--- old/lib/sshkit/backends/connection_pool.rb  2017-06-30 18:24:59.000000000 
+0200
+++ new/lib/sshkit/backends/connection_pool.rb  2018-02-04 02:40:20.000000000 
+0100
@@ -88,7 +88,7 @@
   private
 
   def cache_key_for_connection_args(args)
-    args.to_s
+    args.hash
   end
 
   def cache_enabled?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sshkit/backends/local.rb 
new/lib/sshkit/backends/local.rb
--- old/lib/sshkit/backends/local.rb    2017-06-30 18:24:59.000000000 +0200
+++ new/lib/sshkit/backends/local.rb    2018-02-04 02:40:20.000000000 +0100
@@ -11,6 +11,7 @@
       end
 
       def upload!(local, remote, options = {})
+        remote = File.join(pwd_path, remote) unless 
remote.to_s.start_with?("/") || pwd_path.nil?
         if local.is_a?(String)
           if options[:recursive]
             FileUtils.cp_r(local, remote)
@@ -25,6 +26,7 @@
       end
 
       def download!(remote, local=nil, _options = {})
+        remote = File.join(pwd_path, remote) unless 
remote.to_s.start_with?("/") || pwd_path.nil?
         if local.nil?
           FileUtils.cp(remote, File.basename(remote))
         else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sshkit/backends/netssh.rb 
new/lib/sshkit/backends/netssh.rb
--- old/lib/sshkit/backends/netssh.rb   2017-06-30 18:24:59.000000000 +0200
+++ new/lib/sshkit/backends/netssh.rb   2018-02-04 02:40:20.000000000 +0100
@@ -63,6 +63,7 @@
 
       def upload!(local, remote, options = {})
         summarizer = transfer_summarizer('Uploading', options)
+        remote = File.join(pwd_path, remote) unless 
remote.to_s.start_with?("/") || pwd_path.nil?
         with_ssh do |ssh|
           ssh.scp.upload!(local, remote, options, &summarizer)
         end
@@ -70,6 +71,7 @@
 
       def download!(remote, local=nil, options = {})
         summarizer = transfer_summarizer('Downloading', options)
+        remote = File.join(pwd_path, remote) unless 
remote.to_s.start_with?("/") || pwd_path.nil?
         with_ssh do |ssh|
           ssh.scp.download!(remote, local, options, &summarizer)
         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   2017-06-30 18:24:59.000000000 +0200
+++ new/lib/sshkit/version.rb   2018-02-04 02:40:20.000000000 +0100
@@ -1,3 +1,3 @@
 module SSHKit
-  VERSION = "1.14.0".freeze
+  VERSION = "1.16.0".freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-06-30 18:24:59.000000000 +0200
+++ new/metadata        2018-02-04 02:40:20.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: sshkit
 version: !ruby/object:Gem::Version
-  version: 1.14.0
+  version: 1.16.0
 platform: ruby
 authors:
 - Lee Hambley
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-06-30 00:00:00.000000000 Z
+date: 2018-02-04 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: net-ssh
@@ -293,7 +293,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.6.12
+rubygems_version: 2.7.4
 signing_key: 
 specification_version: 4
 summary: SSHKit makes it easy to write structured, testable SSH commands in 
Ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/functional/backends/test_local.rb 
new/test/functional/backends/test_local.rb
--- old/test/functional/backends/test_local.rb  2017-06-30 18:24:59.000000000 
+0200
+++ new/test/functional/backends/test_local.rb  2018-02-04 02:40:20.000000000 
+0100
@@ -20,6 +20,33 @@
         end
       end
 
+      def test_upload_via_pathname
+        Dir.mktmpdir do |dir|
+          File.new("#{dir}/local", 'w')
+          Local.new do
+            upload!("#{dir}/local", Pathname.new("#{dir}/remote"))
+          end.run
+          assert File.exist?("#{dir}/remote")
+        end
+      end
+
+      def test_upload_within
+        file_contents = "Some Content"
+        actual_file_contents = nil
+        Dir.mktmpdir do |dir|
+          Local.new do
+            within dir do
+              execute(:mkdir, "-p", "foo")
+              within "foo" do
+                upload!(StringIO.new(file_contents), "bar")
+              end
+            end
+            actual_file_contents = capture(:cat, File.join(dir, "foo", "bar"))
+          end.run
+          assert_equal file_contents, actual_file_contents
+        end
+      end
+
       def test_upload_recursive
         Dir.mktmpdir do |dir|
           Dir.mkdir("#{dir}/local")
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 2017-06-30 18:24:59.000000000 
+0200
+++ new/test/functional/backends/test_netssh.rb 2018-02-04 02:40:20.000000000 
+0100
@@ -103,6 +103,23 @@
         assert_equal "Some Content\nWith a newline and trailing spaces    \n 
", actual_file_contents
       end
 
+      def test_upload_within
+        file_name = SecureRandom.uuid
+        file_contents = "Some Content"
+        dir_name = SecureRandom.uuid
+        actual_file_contents = ""
+        Netssh.new(a_host) do |_host|
+          within("/tmp") do
+            execute :mkdir, "-p", dir_name
+            within(dir_name) do
+              upload!(StringIO.new(file_contents), file_name)
+            end
+          end
+          actual_file_contents = capture(:cat, 
"/tmp/#{dir_name}/#{file_name}", strip: false)
+        end.run
+        assert_equal file_contents, actual_file_contents
+      end
+
       def test_upload_string_io
         file_contents = ""
         Netssh.new(a_host) do |_host|
@@ -128,6 +145,16 @@
         assert_equal File.open(file_name).read, file_contents
       end
 
+      def test_upload_via_pathname
+        file_contents = ""
+        Netssh.new(a_host) do |_host|
+          file_name = Pathname.new(File.join("/tmp", SecureRandom.uuid))
+          upload!(StringIO.new('example_io'), file_name)
+          file_contents = download!(file_name)
+        end.run
+        assert_equal "example_io", file_contents
+      end
+
       def test_interaction_handler
         captured_command_result = nil
         Netssh.new(a_host) do


Reply via email to