Hello community, here is the log from the commit of package rubygem-winrm-fs for openSUSE:Factory checked in at 2020-10-05 19:35:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-winrm-fs (Old) and /work/SRC/openSUSE:Factory/.rubygem-winrm-fs.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-winrm-fs" Mon Oct 5 19:35:37 2020 rev:11 rq:838097 version:1.3.5 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-winrm-fs/rubygem-winrm-fs.changes 2020-02-14 16:36:35.619559630 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-winrm-fs.new.4249/rubygem-winrm-fs.changes 2020-10-05 19:35:47.073356077 +0200 @@ -1,0 +2,6 @@ +Fri Sep 25 15:09:00 UTC 2020 - Stephan Kulow <co...@suse.com> + +updated to version 1.3.5 + no changelog found + +------------------------------------------------------------------- Old: ---- winrm-fs-1.3.4.gem New: ---- winrm-fs-1.3.5.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-winrm-fs.spec ++++++ --- /var/tmp/diff_new_pack.kfSY3e/_old 2020-10-05 19:35:49.017357976 +0200 +++ /var/tmp/diff_new_pack.kfSY3e/_new 2020-10-05 19:35:49.021357980 +0200 @@ -16,29 +16,30 @@ # -%define mod_name winrm-fs -%define mod_full_name %{mod_name}-%{version} # # This file was generated with a gem2rpm.yml and not just plain gem2rpm. # All sections marked as MANUAL, license headers, summaries and descriptions # can be maintained in that file. Please consult this file before editing any # of those fields # + Name: rubygem-winrm-fs -Version: 1.3.4 +Version: 1.3.5 Release: 0 -Summary: WinRM File System -License: Apache-2.0 -Group: Development/Languages/Ruby -URL: https://github.com/WinRb/winrm-fs -Source: https://rubygems.org/gems/%{mod_full_name}.gem -Source1: gem2rpm.yml +%define mod_name winrm-fs +%define mod_full_name %{mod_name}-%{version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{ruby >= 2.4.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: %{rubygem rdoc > 3.10} BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives -# FIXME: use proper Requires(pre/post/preun/...) +URL: http://github.com/WinRb/winrm-fs +Source: https://rubygems.org/gems/%{mod_full_name}.gem +Source1: gem2rpm.yml +Summary: WinRM File System +License: Apache-2.0 +Group: Development/Languages/Ruby PreReq: update-alternatives %description ++++++ winrm-fs-1.3.4.gem -> winrm-fs-1.3.5.gem ++++++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/winrm-fs/core/file_transporter.rb new/lib/winrm-fs/core/file_transporter.rb --- old/lib/winrm-fs/core/file_transporter.rb 2019-11-14 16:58:24.000000000 +0100 +++ new/lib/winrm-fs/core/file_transporter.rb 2020-09-10 21:19:01.000000000 +0200 @@ -17,11 +17,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'benchmark' -require 'csv' -require 'digest' -require 'securerandom' -require 'stringio' +require 'benchmark' unless defined?(Benchmark) +require 'csv' unless defined?(CSV) +require 'digest' unless defined?(Digest) +require 'securerandom' unless defined?(SecureRandom) +require 'stringio' unless defined?(StringIO) require 'winrm/exceptions' require 'winrm-fs/core/tmp_zip' @@ -117,6 +117,10 @@ [total_size, files] end + def close + shell.close + end + private # @return [String] the Array pack template for Base64 encoding a stream diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/winrm-fs/core/tmp_zip.rb new/lib/winrm-fs/core/tmp_zip.rb --- old/lib/winrm-fs/core/tmp_zip.rb 2019-11-14 16:58:24.000000000 +0100 +++ new/lib/winrm-fs/core/tmp_zip.rb 2020-09-10 21:19:01.000000000 +0200 @@ -18,9 +18,9 @@ # limitations under the License. require 'delegate' -require 'pathname' -require 'tempfile' -require 'zip' +require 'pathname' unless defined?(Pathname) +require 'tempfile' unless defined?(Tempfile) +require 'zip' unless defined?(Zip) module WinRM module FS @@ -113,7 +113,7 @@ # directory, excluding directories # @api private def entries - Pathname.glob(dir.join('**/*')).delete_if(&:directory?).sort + Pathname.glob(dir.join('**/.*')).push(*Pathname.glob(dir.join('**/*'))).delete_if(&:directory?).sort end # (see Logging.log_subject) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/winrm-fs/file_manager.rb new/lib/winrm-fs/file_manager.rb --- old/lib/winrm-fs/file_manager.rb 2019-11-14 16:58:24.000000000 +0100 +++ new/lib/winrm-fs/file_manager.rb 2020-09-10 21:19:01.000000000 +0200 @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'winrm' +require 'winrm' unless defined?(WinRM::Connection) require_relative 'scripts/scripts' require_relative 'core/file_transporter' @@ -37,7 +37,7 @@ def checksum(path, digest = 'SHA1') @logger.debug("checksum with #{digest}: #{path}") script = WinRM::FS::Scripts.render('checksum', path: path, digest: digest) - @connection.shell(:powershell) { |e| e.run(script).stdout.chomp } + ps_run(script).exitcode == 0 end # Create the specifed directory recursively @@ -46,7 +46,7 @@ def create_dir(path) @logger.debug("create_dir: #{path}") script = WinRM::FS::Scripts.render('create_dir', path: path) - @connection.shell(:powershell) { |e| e.run(script).exitcode == 0 } + ps_run(script).exitcode == 0 end # Deletes the file or directory at the specified path @@ -55,7 +55,7 @@ def delete(path) @logger.debug("deleting: #{path}") script = WinRM::FS::Scripts.render('delete', path: path) - @connection.shell(:powershell) { |e| e.run(script).exitcode == 0 } + ps_run(script).exitcode == 0 end # Downloads the specified remote file to the specified local path @@ -87,7 +87,7 @@ def _output_from_file(remote_path, chunk_size, index) script = WinRM::FS::Scripts.render('download', path: remote_path, chunk_size: chunk_size, index: index) - @connection.shell(:powershell) { |e| e.run(script) } + ps_run(script) end def _write_file(tofd, output) @@ -106,7 +106,7 @@ def exists?(path) @logger.debug("exists?: #{path}") script = WinRM::FS::Scripts.render('exists', path: path) - @connection.shell(:powershell) { |e| e.run(script).exitcode == 0 } + ps_run(script).exitcode == 0 end # Gets the current user's TEMP directory on the remote system, for example @@ -114,7 +114,7 @@ # @return [String] Full path to the temp directory def temp_dir @temp_dir ||= begin - (@connection.shell(:powershell) { |e| e.run('$env:TEMP') }).stdout.chomp.tr('\\', '/') + ps_run('$env:TEMP').stdout.chomp.tr('\\', '/') end end @@ -139,12 +139,25 @@ def upload(local_path, remote_path, &block) @connection.shell(:powershell) do |shell| file_transporter ||= WinRM::FS::Core::FileTransporter.new(shell) - file_transporter.upload(local_path, remote_path, &block)[0] + begin + file_transporter.upload(local_path, remote_path, &block)[0] + ensure + file_transporter.close + end end end private + def ps_run(cmd) + shell = @connection.shell(:powershell) + begin + shell.run(cmd) + ensure + shell.close + end + end + def download_dir(remote_path, local_path, chunk_size, first) local_path = File.join(local_path, File.basename(remote_path.to_s)) if first FileUtils.mkdir_p(local_path) unless File.directory?(local_path) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/winrm-fs.rb new/lib/winrm-fs.rb --- old/lib/winrm-fs.rb 2019-11-14 16:58:24.000000000 +0100 +++ new/lib/winrm-fs.rb 2020-09-10 21:19:01.000000000 +0200 @@ -15,9 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'winrm' +require 'winrm' unless defined?(WinRM::Connection) require 'logger' -require 'pathname' +require 'pathname' unless defined?(Pathname) require_relative 'winrm-fs/exceptions' require_relative 'winrm-fs/file_manager' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-11-14 16:58:24.000000000 +0100 +++ new/metadata 2020-09-10 21:19:01.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: winrm-fs version: !ruby/object:Gem::Version - version: 1.3.4 + version: 1.3.5 platform: ruby authors: - Shawn Neal @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2019-11-14 00:00:00.000000000 Z +date: 2020-09-10 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: erubi @@ -185,8 +185,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.7.8 +rubygems_version: 3.1.2 signing_key: specification_version: 4 summary: WinRM File System