winrm-fs 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22197843455d6d73e34d00c91fd58d4a6201d08f02f61a64d5b971085360aebf
4
- data.tar.gz: fd9181f9187df12ad0a6812891c29a1e917ccfc9f2d4064448a52d08f0455d05
3
+ metadata.gz: 85111e8743dcffa4aafcf63f815eff675bda56e951ff83c0f7e63d7b97e4b25c
4
+ data.tar.gz: 29c072897a7d7372391d64446e1f7256d60e02a9846914f0b6decb497343b7c2
5
5
  SHA512:
6
- metadata.gz: ebf3f8d594d00219a5b19f6eb2ba17ae4f466de4d4eb0929b6f61f8f9075473ccdaff127ab3ed10a06280a309cfe3b5d8976a1857970c3f02a22080413690667
7
- data.tar.gz: a56cf8645bcb803c377f7146a1c5a005496e74b9b7993b6f18f38dd70c2a4de00174c65cd7abc3a0e409b07fa10a10bab7fce145b5dfb6991744f2c720d9a2e0
6
+ metadata.gz: 658a0ee64bfb237dc03e31e6e2b25db8d90cf692452d82fe3c25fe09d41ab568611d588c6830b9a6496d582181b5221e9689994a5b4ce51af024188bdfa6c4ea
7
+ data.tar.gz: 4adf7ef9cd6ae186f402b0f8b8e29b09d37e5f325e0b9aa648a2ca4f2eb0c399793fab4e13c6866ba087fb464db09108bffef8fa0d7ebc0b368b57f7ce0727a6
data/README.md CHANGED
@@ -1,14 +1,16 @@
1
1
  # File system operations over Windows Remote Management (WinRM) for Ruby
2
- [![Build Status](https://travis-ci.org/WinRb/winrm-fs.svg?branch=master)](https://travis-ci.org/WinRb/winrm-fs)
2
+
3
+ [![CI](https://github.com/WinRb/winrm-fs/actions/workflows/ci.yml/badge.svg)](https://github.com/WinRb/winrm-fs/actions/workflows/ci.yml)
3
4
  [![Gem Version](https://badge.fury.io/rb/winrm-fs.svg)](http://badge.fury.io/rb/winrm-fs)
4
- [![Build status](https://ci.appveyor.com/api/projects/status/wm6apa8ojfhfmwsf?svg=true)](https://ci.appveyor.com/project/winrb/winrm-fs)
5
5
 
6
6
  ## Uploading files
7
+
7
8
  Files may be copied from the local machine to the winrm endpoint. Individual files or directories, as well as arrays of files and directories may be specified. Data from a `StringIO` object may also be uploaded to a remote file.
9
+
8
10
  ```ruby
9
11
  require 'winrm-fs'
10
12
 
11
- connection = WinRM::Connection.new(...
13
+ connection = WinRM::Connection.new(...)
12
14
  file_manager = WinRM::FS::FileManager.new(connection)
13
15
 
14
16
  # upload file.txt from the current working directory
@@ -29,11 +31,14 @@ file_manager.upload([
29
31
  ```
30
32
 
31
33
  ### Optimizing WinRM settings
34
+
32
35
  Since winrm-fs 1.0/winrm 2.0, files are uploaded using the PSRP protocol and transfer speeds are dramatically improved from previous versions. This is largely due to the fact that the size of chunks that can be transferred at one time are now governed by the `MaxEnvelopeSizekb` winrm configuration setting on the endpoint. This default to 500 on Windows 2012 R2 and 150 on Windows 2008 R2. You may experience much faster transfer rates on 2008 R2 by increasing this setting.
33
36
 
34
37
  ### Handling progress events
38
+
35
39
  If you want to implement your own custom progress handling, you can pass a code
36
- block and use the proggress data that `upload` yields to this block:
40
+ block and use the progress data that `upload` yields to this block:
41
+
37
42
  ```ruby
38
43
  file_manager.upload('c:/dev/my_dir', '$env:AppData') do |bytes_copied, total_bytes, local_path, remote_path|
39
44
  puts "#{bytes_copied}bytes of #{total_bytes}bytes copied"
@@ -53,20 +58,20 @@ first.
53
58
  3. Run the unit and integration tests (bundle exec rake integration)
54
59
  4. Commit your changes (git commit -am "Added a sweet feature")
55
60
  5. Push to the branch (git push origin my_feature_branch)
56
- 6. Create a pull requst from your branch into master (Please be sure to provide enough detail for us to cipher what this change is doing)
61
+ 6. Create a pull request from your branch into main (Please be sure to provide enough detail for us to cipher what this change is doing)
57
62
 
58
63
  ### Running the tests
59
64
 
60
65
  We use Bundler to manage dependencies during development.
61
66
 
62
- ```
63
- $ bundle install
67
+ ```bash
68
+ bundle install
64
69
  ```
65
70
 
66
71
  Once you have the dependencies, you can run the unit tests with `rake`:
67
72
 
68
- ```
69
- $ bundle exec rake spec
73
+ ```bash
74
+ bundle exec rake spec
70
75
  ```
71
76
 
72
77
  To run the integration tests you will need a Windows box with the WinRM service properly configured. Its easiest to use the Vagrant Windows box in the Vagrantilfe of this repo.
@@ -76,6 +81,7 @@ To run the integration tests you will need a Windows box with the WinRM service
76
81
  3. Run `bundle exec rake integration`
77
82
 
78
83
  ## WinRM-fs Authors
84
+
79
85
  * Shawn Neal (https://github.com/sneal)
80
86
  * Matt Wrock (https://github.com/mwrock)
81
87
 
data/bin/rwinrmcp CHANGED
File without changes
@@ -18,7 +18,6 @@
18
18
  # limitations under the License.
19
19
 
20
20
  require 'benchmark' unless defined?(Benchmark)
21
- require 'csv' unless defined?(CSV)
22
21
  require 'digest' unless defined?(Digest)
23
22
  require 'securerandom' unless defined?(SecureRandom)
24
23
  require 'stringio' unless defined?(StringIO)
@@ -67,6 +66,7 @@ module WinRM
67
66
  @shell = shell
68
67
  @logger = shell.logger
69
68
  @id_generator = opts.fetch(:id_generator) { -> { SecureRandom.uuid } }
69
+ require 'zip'
70
70
  Zip.unicode_names = true
71
71
  end
72
72
 
@@ -409,6 +409,8 @@ module WinRM
409
409
  "(exitcode: 0), but stderr present\n#{stderr}"
410
410
  end
411
411
 
412
+ require 'csv'
413
+
412
414
  logger.debug 'Parsing CSV Response'
413
415
  logger.debug output.stdout
414
416
 
@@ -18,9 +18,9 @@
18
18
  # limitations under the License.
19
19
 
20
20
  require 'delegate'
21
+ require 'logger' unless defined?(Logger)
21
22
  require 'pathname' unless defined?(Pathname)
22
23
  require 'tempfile' unless defined?(Tempfile)
23
- require 'zip' unless defined?(Zip)
24
24
 
25
25
  module WinRM
26
26
  module FS
@@ -68,7 +68,8 @@ module WinRM
68
68
  # @param logger [#debug,#debug?] an optional logger/ui object that
69
69
  # responds to `#debug` and `#debug?` (default `nil`)
70
70
  def initialize(dir, logger = nil)
71
- @logger = logger || Logging.logger[self]
71
+ require 'zip'
72
+ @logger = logger || Logger.new(nil)
72
73
  @dir = clean_dirname(dir)
73
74
  @zip_io = Tempfile.open(['tmpzip-', '.zip'], binmode: true)
74
75
  write_zip
@@ -116,12 +117,6 @@ module WinRM
116
117
  Pathname.glob(dir.join('**/.*')).push(*Pathname.glob(dir.join('**/*'))).delete_if(&:directory?).sort
117
118
  end
118
119
 
119
- # (see Logging.log_subject)
120
- # @api private
121
- def log_subject
122
- @log_subject ||= [self.class.to_s.split('::').last, path].join('::')
123
- end
124
-
125
120
  # Adds all file entries to the Zip output stream.
126
121
  #
127
122
  # @param zos [Zip::OutputStream] zip output stream
@@ -149,12 +144,12 @@ module WinRM
149
144
  end
150
145
  end
151
146
 
147
+ # rubyzip 3.x takes optional Entry arguments as keywords
152
148
  def zip_entry(entry_path)
153
149
  Zip::Entry.new(
154
150
  zip_io.path,
155
151
  entry_path.to_s,
156
- nil, nil, nil, nil, nil, nil,
157
- ::Zip::DOSTime.new(2000)
152
+ time: ::Zip::DOSTime.new(2000)
158
153
  )
159
154
  end
160
155
 
@@ -15,7 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
- require 'erubi'
18
+ require 'erb'
19
19
 
20
20
  module WinRM
21
21
  module FS
@@ -40,7 +40,7 @@ module WinRM
40
40
  else
41
41
  raise ArgumentError
42
42
  end
43
- b.eval(Erubi::Engine.new(template).src)
43
+ ERB.new(template).result(b)
44
44
  end
45
45
  end
46
46
  end
data/lib/winrm-fs.rb CHANGED
@@ -16,7 +16,6 @@
16
16
  # limitations under the License.
17
17
 
18
18
  require 'winrm' unless defined?(WinRM::Connection)
19
- require 'logger'
20
19
  require 'pathname' unless defined?(Pathname)
21
20
  require_relative 'winrm-fs/exceptions'
22
21
  require_relative 'winrm-fs/file_manager'
metadata CHANGED
@@ -1,64 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winrm-fs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Neal
8
8
  - Matt Wrock
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2020-09-10 00:00:00.000000000 Z
11
+ date: 2026-09-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: erubi
14
+ name: benchmark
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: csv
16
29
  requirement: !ruby/object:Gem::Requirement
17
30
  requirements:
18
31
  - - "~>"
19
32
  - !ruby/object:Gem::Version
20
- version: '1.8'
33
+ version: '3.3'
21
34
  type: :runtime
22
35
  prerelease: false
23
36
  version_requirements: !ruby/object:Gem::Requirement
24
37
  requirements:
25
38
  - - "~>"
26
39
  - !ruby/object:Gem::Version
27
- version: '1.8'
40
+ version: '3.3'
28
41
  - !ruby/object:Gem::Dependency
29
- name: logging
42
+ name: logger
30
43
  requirement: !ruby/object:Gem::Requirement
31
44
  requirements:
32
45
  - - ">="
33
46
  - !ruby/object:Gem::Version
34
- version: 1.6.1
35
- - - "<"
36
- - !ruby/object:Gem::Version
37
- version: '3.0'
47
+ version: '0'
38
48
  type: :runtime
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
51
  requirements:
42
52
  - - ">="
43
53
  - !ruby/object:Gem::Version
44
- version: 1.6.1
45
- - - "<"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
54
+ version: '0'
48
55
  - !ruby/object:Gem::Dependency
49
56
  name: rubyzip
50
57
  requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - "~>"
53
60
  - !ruby/object:Gem::Version
54
- version: '2.0'
61
+ version: '3.4'
55
62
  type: :runtime
56
63
  prerelease: false
57
64
  version_requirements: !ruby/object:Gem::Requirement
58
65
  requirements:
59
66
  - - "~>"
60
67
  - !ruby/object:Gem::Version
61
- version: '2.0'
68
+ version: '3.4'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: winrm
64
71
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +103,7 @@ dependencies:
96
103
  version: '10.3'
97
104
  - - "<"
98
105
  - !ruby/object:Gem::Version
99
- version: '13'
106
+ version: '14'
100
107
  type: :development
101
108
  prerelease: false
102
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +113,7 @@ dependencies:
106
113
  version: '10.3'
107
114
  - - "<"
108
115
  - !ruby/object:Gem::Version
109
- version: '13'
116
+ version: '14'
110
117
  - !ruby/object:Gem::Dependency
111
118
  name: rspec
112
119
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +134,14 @@ dependencies:
127
134
  requirements:
128
135
  - - "~>"
129
136
  - !ruby/object:Gem::Version
130
- version: 0.68.0
137
+ version: 1.26.0
131
138
  type: :development
132
139
  prerelease: false
133
140
  version_requirements: !ruby/object:Gem::Requirement
134
141
  requirements:
135
142
  - - "~>"
136
143
  - !ruby/object:Gem::Version
137
- version: 0.68.0
144
+ version: 1.26.0
138
145
  description: " Ruby library for file system operations via Windows Remote Management\n"
139
146
  email:
140
147
  - sneal@sneal.net
@@ -143,8 +150,8 @@ executables:
143
150
  - rwinrmcp
144
151
  extensions: []
145
152
  extra_rdoc_files:
146
- - README.md
147
153
  - LICENSE
154
+ - README.md
148
155
  files:
149
156
  - LICENSE
150
157
  - README.md
@@ -166,7 +173,6 @@ homepage: http://github.com/WinRb/winrm-fs
166
173
  licenses:
167
174
  - Apache-2.0
168
175
  metadata: {}
169
- post_install_message:
170
176
  rdoc_options:
171
177
  - "-x"
172
178
  - test/
@@ -178,15 +184,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
184
  requirements:
179
185
  - - ">="
180
186
  - !ruby/object:Gem::Version
181
- version: 2.4.0
187
+ version: 2.5.0
182
188
  required_rubygems_version: !ruby/object:Gem::Requirement
183
189
  requirements:
184
190
  - - ">="
185
191
  - !ruby/object:Gem::Version
186
192
  version: '0'
187
193
  requirements: []
188
- rubygems_version: 3.1.2
189
- signing_key:
194
+ rubygems_version: 3.6.9
190
195
  specification_version: 4
191
196
  summary: WinRM File System
192
197
  test_files: []