Hello community, here is the log from the commit of package rubygem-sshkit for openSUSE:Factory checked in at 2017-08-21 11:37:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-sshkit (Old) and /work/SRC/openSUSE:Factory/.rubygem-sshkit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sshkit" Mon Aug 21 11:37:11 2017 rev:21 rq:515063 version:1.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-sshkit/rubygem-sshkit.changes 2017-04-17 10:27:11.830686521 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-sshkit.new/rubygem-sshkit.changes 2017-08-21 11:37:13.028701913 +0200 @@ -1,0 +2,16 @@ +Thu Aug 3 19:43:23 UTC 2017 - co...@suse.com + +- updated to version 1.14.0 + see installed CHANGELOG.md + + ## [1.14.0][] (2017-06-30) + + ### Breaking changes + + * None + + ### New features + + * [#401](https://github.com/capistrano/sshkit/pull/401): Add :log_percent option to specify upload!/download! transfer log percentage - [@aubergene](https://github.com/aubergene) + +------------------------------------------------------------------- Old: ---- sshkit-1.13.1.gem New: ---- sshkit-1.14.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-sshkit.spec ++++++ --- /var/tmp/diff_new_pack.EeoLz1/_old 2017-08-21 11:37:14.268527543 +0200 +++ /var/tmp/diff_new_pack.EeoLz1/_new 2017-08-21 11:37:14.280525855 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-sshkit -Version: 1.13.1 +Version: 1.14.0 Release: 0 %define mod_name sshkit %define mod_full_name %{mod_name}-%{version} ++++++ sshkit-1.13.1.gem -> sshkit-1.14.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2017-03-31 16:31:41.000000000 +0200 +++ new/CHANGELOG.md 2017-06-30 18:24:59.000000000 +0200 @@ -7,6 +7,16 @@ * Your contribution here! +## [1.14.0][] (2017-06-30) + +### Breaking changes + + * None + +### New features + + * [#401](https://github.com/capistrano/sshkit/pull/401): Add :log_percent option to specify upload!/download! transfer log percentage - [@aubergene](https://github.com/aubergene) + ## [1.13.1][] (2017-03-31) ### Breaking changes @@ -15,7 +25,7 @@ ### Bug fixes - * [#397](https://github.com/capistrano/sshkt/pull/397): Fix NoMethodError assign_defaults with net-ssh older than 4.0.0 - [@shirosaki](https://github.com/shirosaki) + * [#397](https://github.com/capistrano/sshkit/pull/397): Fix NoMethodError assign_defaults with net-ssh older than 4.0.0 - [@shirosaki](https://github.com/shirosaki) ## [1.13.0][] (2017-03-24) @@ -697,7 +707,8 @@ First release. -[Unreleased]: https://github.com/capistrano/sshkit/compare/v1.13.1...HEAD +[Unreleased]: https://github.com/capistrano/sshkit/compare/v1.14.0...HEAD +[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 [1.12.0]: https://github.com/capistrano/sshkit/compare/v1.11.5...v1.12.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-03-31 16:31:41.000000000 +0200 +++ new/README.md 2017-06-30 18:24:59.000000000 +0200 @@ -72,7 +72,7 @@ ```ruby on '1.example.com' do upload! 'some_local_file.txt', '/home/some_user/somewhere' - download! '/home/some_user/some_remote_file.txt', 'somewhere_local' + download! '/home/some_user/some_remote_file.txt', 'somewhere_local', :log_percent 25 end ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2017-03-31 16:31:41.000000000 +0200 +++ new/Rakefile 2017-06-30 18:24:59.000000000 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env rake - require 'bundler/gem_tasks' require 'rake/testtask' require 'rubocop/rake_task' 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/netssh.rb new/lib/sshkit/backends/netssh.rb --- old/lib/sshkit/backends/netssh.rb 2017-03-31 16:31:41.000000000 +0200 +++ new/lib/sshkit/backends/netssh.rb 2017-06-30 18:24:59.000000000 +0200 @@ -62,14 +62,14 @@ end def upload!(local, remote, options = {}) - summarizer = transfer_summarizer('Uploading') + summarizer = transfer_summarizer('Uploading', options) with_ssh do |ssh| ssh.scp.upload!(local, remote, options, &summarizer) end end def download!(remote, local=nil, options = {}) - summarizer = transfer_summarizer('Downloading') + summarizer = transfer_summarizer('Downloading', options) with_ssh do |ssh| ssh.scp.download!(remote, local, options, &summarizer) end @@ -96,14 +96,16 @@ private - def transfer_summarizer(action) + def transfer_summarizer(action, options = {}) + log_percent = options[:log_percent] || 10 + log_percent = 100 if log_percent <= 0 last_name = nil last_percentage = nil proc do |_ch, name, transferred, total| percentage = (transferred.to_f * 100 / total.to_f) unless percentage.nan? message = "#{action} #{name} #{percentage.round(2)}%" - percentage_r = (percentage / 10).truncate * 10 + percentage_r = (percentage / log_percent).truncate * log_percent if percentage_r > 0 && (last_name != name || last_percentage != percentage_r) info message last_name = name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sshkit/command.rb new/lib/sshkit/command.rb --- old/lib/sshkit/command.rb 2017-03-31 16:31:41.000000000 +0200 +++ new/lib/sshkit/command.rb 2017-06-30 18:24:59.000000000 +0200 @@ -21,10 +21,9 @@ def initialize(*args) raise ArgumentError, "Must pass arguments to Command.new" if args.empty? @options = default_options.merge(args.extract_options!) - @command = args.shift.to_s.strip.to_sym + @command = sanitize_command(args.shift) @args = args @options.symbolize_keys! - sanitize_command! @stdout, @stderr, @full_stdout, @full_stderr = String.new, String.new, String.new, String.new end @@ -222,16 +221,8 @@ } end - def sanitize_command! - command.to_s.strip! - if command.to_s.match("\n") - @command = String.new.tap do |cs| - command.to_s.lines.each do |line| - cs << line.strip - cs << '; ' unless line == command.to_s.lines.to_a.last - end - end - end + def sanitize_command(cmd) + cmd.to_s.lines.map(&:strip).join("; ") end def call_interaction_handler(stream_name, data, channel) 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-03-31 16:31:41.000000000 +0200 +++ new/lib/sshkit/version.rb 2017-06-30 18:24:59.000000000 +0200 @@ -1,3 +1,3 @@ module SSHKit - VERSION = "1.13.1".freeze + VERSION = "1.14.0".freeze end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-03-31 16:31:41.000000000 +0200 +++ new/metadata 2017-06-30 18:24:59.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: sshkit version: !ruby/object:Gem::Version - version: 1.13.1 + version: 1.14.0 platform: ruby authors: - Lee Hambley @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2017-03-31 00:00:00.000000000 Z +date: 2017-06-30 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: net-ssh @@ -113,6 +113,20 @@ name: rubocop requirement: !ruby/object:Gem::Requirement requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 0.49.1 + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 0.49.1 +- !ruby/object:Gem::Dependency + name: mocha + requirement: !ruby/object:Gem::Requirement + requirements: - - ">=" - !ruby/object:Gem::Version version: '0' @@ -124,7 +138,35 @@ - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency - name: mocha + name: bcrypt_pbkdf + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' +- !ruby/object:Gem::Dependency + name: rbnacl + requirement: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: '3.4' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: '3.4' +- !ruby/object:Gem::Dependency + name: rbnacl-libsodium requirement: !ruby/object:Gem::Requirement requirements: - - ">=" @@ -251,7 +293,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.11 +rubygems_version: 2.6.12 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/sshkit.gemspec new/sshkit.gemspec --- old/sshkit.gemspec 2017-03-31 16:31:41.000000000 +0200 +++ new/sshkit.gemspec 2017-06-30 18:24:59.000000000 +0200 @@ -25,6 +25,10 @@ gem.add_development_dependency('minitest-reporters') gem.add_development_dependency('rainbow', '~> 2.1.0') gem.add_development_dependency('rake') - gem.add_development_dependency('rubocop') + gem.add_development_dependency('rubocop', "~> 0.49.1") gem.add_development_dependency('mocha') + + gem.add_development_dependency('bcrypt_pbkdf') + gem.add_development_dependency('rbnacl', '~> 3.4') + gem.add_development_dependency('rbnacl-libsodium') end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/unit/test_command.rb new/test/unit/test_command.rb --- old/test/unit/test_command.rb 2017-03-31 16:31:41.000000000 +0200 +++ new/test/unit/test_command.rb 2017-06-30 18:24:59.000000000 +0200 @@ -16,7 +16,7 @@ end end - def test_using_a_heredoc + def test_multiple_lines_are_stripped_of_extra_space_and_joined_by_semicolons c = Command.new <<-EOHEREDOC if test ! -d /var/log; then echo "Example" @@ -25,6 +25,11 @@ assert_equal "if test ! -d /var/log; then; echo \"Example\"; fi", c.to_command end + def test_leading_and_trailing_space_is_stripped + c = Command.new(" echo hi ") + assert_equal "echo hi", c.to_command + end + def test_including_the_env SSHKit.config = nil c = Command.new(:rails, 'server', env: {rails_env: :production})