winrm-fs 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b1a70aed7f4cd1c07905037789c4063351a4f5f0
4
+ data.tar.gz: 33d94b11b030a71ceaddb83d4c91527ad6ee1b5f
5
+ SHA512:
6
+ metadata.gz: d03094f7a70dffd988e3c494b3041d1212b31c24ea2e9e36d6ee746914f144935c9cf4af202943ef3db8372275e65fe7fcf18034ca2db4db8a6c72fa017c5e63
7
+ data.tar.gz: aee15954eddd17e38e30b0c45d7cf2769a14a4c81c41fbe60761b0720f91cbc3d1ee385e99693bc578803422968245dfb0c655ee93fce73ef987bfbe4b5a8667
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
File without changes
@@ -1,5 +1,8 @@
1
1
  # WinRM-fs Gem Changelog
2
2
 
3
+ # 0.2.3
4
+ - Fix yielding progress data, issue #23
5
+
3
6
  # 0.2.2
4
7
  - Fix powershell streams leaking to standard error breaking Windows 10, issue #18
5
8
 
@@ -30,9 +30,9 @@ module WinRM
30
30
  # @param [String] Path to the local source file on this machine
31
31
  # @param [String] Path to the file on the target machine
32
32
  # @return [Integer] Count of bytes uploaded
33
- def upload(local_file, remote_file)
33
+ def upload(local_file, remote_file, &block)
34
34
  @command_executor.run_powershell(prepare_script(remote_file))
35
- do_upload(local_file, dos_path(remote_file))
35
+ do_upload(local_file, dos_path(remote_file), &block)
36
36
  end
37
37
 
38
38
  private
@@ -29,7 +29,7 @@ module WinRM
29
29
  @logger = Logging.logger[self]
30
30
  end
31
31
 
32
- def upload_file(local_path, remote_path)
32
+ def upload_file(local_path, remote_path, &block)
33
33
  # If the src has a file extension and the destination does not
34
34
  # we can assume the caller specified the dest as a directory
35
35
  if File.extname(local_path) != '' && File.extname(remote_path) == ''
@@ -38,16 +38,16 @@ module WinRM
38
38
  temp_path = temp_file_path(local_path)
39
39
  with_command_executor do |cmd_executor|
40
40
  return 0 unless out_of_date?(cmd_executor, local_path, remote_path)
41
- do_file_upload(cmd_executor, local_path, temp_path, remote_path)
41
+ do_file_upload(cmd_executor, local_path, temp_path, remote_path, &block)
42
42
  end
43
43
  end
44
44
 
45
- def upload_directory(local_path, remote_path)
45
+ def upload_directory(local_path, remote_path, &block)
46
46
  with_local_zip(local_path) do |local_zip|
47
47
  temp_path = temp_file_path(local_zip.path)
48
48
  with_command_executor do |cmd_executor|
49
49
  return 0 unless out_of_date?(cmd_executor, local_zip.path, temp_path)
50
- do_file_upload(cmd_executor, local_zip.path, temp_path, remote_path)
50
+ do_file_upload(cmd_executor, local_zip.path, temp_path, remote_path, &block)
51
51
  end
52
52
  end
53
53
  end
@@ -87,13 +87,16 @@ describe WinRM::FS::FileManager, integration: true do
87
87
  end
88
88
 
89
89
  it 'yields progress data' do
90
+ block_called = false
90
91
  total = subject.upload(this_file, dest_file) do \
91
92
  |bytes_copied, total_bytes, local_path, remote_path|
92
93
  expect(total_bytes).to be > 0
93
94
  expect(bytes_copied).to eq(total_bytes)
94
95
  expect(local_path).to eq(this_file)
95
96
  expect(remote_path).to eq(dest_file)
97
+ block_called = true
96
98
  end
99
+ expect(block_called).to be true
97
100
  expect(total).to be > 0
98
101
  end
99
102
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winrm-fs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
5
- prerelease:
4
+ version: 0.2.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Shawn Neal
@@ -10,129 +9,114 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2015-08-04 00:00:00.000000000 Z
12
+ date: 2015-11-11 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: erubis
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
20
  version: '2.7'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
27
  version: '2.7'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: logging
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - "~>"
37
33
  - !ruby/object:Gem::Version
38
34
  version: '1.6'
39
- - - ! '>='
35
+ - - ">="
40
36
  - !ruby/object:Gem::Version
41
37
  version: 1.6.1
42
38
  type: :runtime
43
39
  prerelease: false
44
40
  version_requirements: !ruby/object:Gem::Requirement
45
- none: false
46
41
  requirements:
47
- - - ~>
42
+ - - "~>"
48
43
  - !ruby/object:Gem::Version
49
44
  version: '1.6'
50
- - - ! '>='
45
+ - - ">="
51
46
  - !ruby/object:Gem::Version
52
47
  version: 1.6.1
53
48
  - !ruby/object:Gem::Dependency
54
49
  name: rubyzip
55
50
  requirement: !ruby/object:Gem::Requirement
56
- none: false
57
51
  requirements:
58
- - - ~>
52
+ - - "~>"
59
53
  - !ruby/object:Gem::Version
60
54
  version: '1.1'
61
55
  type: :runtime
62
56
  prerelease: false
63
57
  version_requirements: !ruby/object:Gem::Requirement
64
- none: false
65
58
  requirements:
66
- - - ~>
59
+ - - "~>"
67
60
  - !ruby/object:Gem::Version
68
61
  version: '1.1'
69
62
  - !ruby/object:Gem::Dependency
70
63
  name: winrm
71
64
  requirement: !ruby/object:Gem::Requirement
72
- none: false
73
65
  requirements:
74
- - - ~>
66
+ - - "~>"
75
67
  - !ruby/object:Gem::Version
76
68
  version: 1.3.0
77
69
  type: :runtime
78
70
  prerelease: false
79
71
  version_requirements: !ruby/object:Gem::Requirement
80
- none: false
81
72
  requirements:
82
- - - ~>
73
+ - - "~>"
83
74
  - !ruby/object:Gem::Version
84
75
  version: 1.3.0
85
76
  - !ruby/object:Gem::Dependency
86
77
  name: rspec
87
78
  requirement: !ruby/object:Gem::Requirement
88
- none: false
89
79
  requirements:
90
- - - ~>
80
+ - - "~>"
91
81
  - !ruby/object:Gem::Version
92
82
  version: 3.0.0
93
83
  type: :development
94
84
  prerelease: false
95
85
  version_requirements: !ruby/object:Gem::Requirement
96
- none: false
97
86
  requirements:
98
- - - ~>
87
+ - - "~>"
99
88
  - !ruby/object:Gem::Version
100
89
  version: 3.0.0
101
90
  - !ruby/object:Gem::Dependency
102
91
  name: rake
103
92
  requirement: !ruby/object:Gem::Requirement
104
- none: false
105
93
  requirements:
106
- - - ~>
94
+ - - "~>"
107
95
  - !ruby/object:Gem::Version
108
96
  version: 10.3.2
109
97
  type: :development
110
98
  prerelease: false
111
99
  version_requirements: !ruby/object:Gem::Requirement
112
- none: false
113
100
  requirements:
114
- - - ~>
101
+ - - "~>"
115
102
  - !ruby/object:Gem::Version
116
103
  version: 10.3.2
117
104
  - !ruby/object:Gem::Dependency
118
105
  name: rubocop
119
106
  requirement: !ruby/object:Gem::Requirement
120
- none: false
121
107
  requirements:
122
- - - ~>
108
+ - - "~>"
123
109
  - !ruby/object:Gem::Version
124
110
  version: 0.28.0
125
111
  type: :development
126
112
  prerelease: false
127
113
  version_requirements: !ruby/object:Gem::Requirement
128
- none: false
129
114
  requirements:
130
- - - ~>
115
+ - - "~>"
131
116
  - !ruby/object:Gem::Version
132
117
  version: 0.28.0
133
- description: ! ' Ruby library for file system operations via Windows Remote Management
134
-
135
- '
118
+ description: |2
119
+ Ruby library for file system operations via Windows Remote Management
136
120
  email:
137
121
  - sneal@sneal.net
138
122
  - matt@mattwrock.com
@@ -143,10 +127,10 @@ extra_rdoc_files:
143
127
  - README.md
144
128
  - LICENSE
145
129
  files:
146
- - .gitignore
147
- - .rspec
148
- - .rubocop.yml
149
- - .travis.yml
130
+ - ".gitignore"
131
+ - ".rspec"
132
+ - ".rubocop.yml"
133
+ - ".travis.yml"
150
134
  - Gemfile
151
135
  - LICENSE
152
136
  - README.md
@@ -178,33 +162,29 @@ files:
178
162
  - winrm-fs.gemspec
179
163
  homepage: http://github.com/WinRb/winrm-fs
180
164
  licenses: []
165
+ metadata: {}
181
166
  post_install_message:
182
167
  rdoc_options:
183
- - -x
168
+ - "-x"
184
169
  - test/
185
- - -x
170
+ - "-x"
186
171
  - examples/
187
172
  require_paths:
188
173
  - lib
189
174
  required_ruby_version: !ruby/object:Gem::Requirement
190
- none: false
191
175
  requirements:
192
- - - ! '>='
176
+ - - ">="
193
177
  - !ruby/object:Gem::Version
194
178
  version: 1.9.0
195
179
  required_rubygems_version: !ruby/object:Gem::Requirement
196
- none: false
197
180
  requirements:
198
- - - ! '>='
181
+ - - ">="
199
182
  - !ruby/object:Gem::Version
200
183
  version: '0'
201
- segments:
202
- - 0
203
- hash: 353666175085628840
204
184
  requirements: []
205
185
  rubyforge_project:
206
- rubygems_version: 1.8.23.2
186
+ rubygems_version: 2.4.8
207
187
  signing_key:
208
- specification_version: 3
188
+ specification_version: 4
209
189
  summary: WinRM File System
210
190
  test_files: []