iostreams 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 844554b8eeaaffafc4ec283775cfd3145b0c459f549367dbdb63edcd35893cca
4
- data.tar.gz: 6384647714a78ff9999c3d049a5222caa7e746059c3ecffbee41098c07465ee1
3
+ metadata.gz: a6dd68508835099ef4c9de7f81a9527927d3225138f0bf5ecd00c44194e11858
4
+ data.tar.gz: 28535e95ca83a4cf0c522de4cd48889a489b4fcefdc8feb9a7bfe0b70124fd7a
5
5
  SHA512:
6
- metadata.gz: 9aed6c1832d502c162b5d9ba42600caf6102e7ac71b3df6b3473a44472dd93fa0513c03ff258675c9ed19838ee1cd0e4e91198389bafa605bfaf051d87431895
7
- data.tar.gz: dde06ece42e29869d73c17e89a8f5aca8b93b37859663256b218140ccd21032c45a0b7ece40bf4be66ccdc51cb5d580840d1a18d7ec99be42ae716b79381c165
6
+ metadata.gz: 8e4d38ef41234f62fdcfde1ae3a96fe59203dcfc38562843106b081c7292efffdda36b88707674059a24b0fa2996d4c1dbe0627694e80a9b12d23d47195a53d3
7
+ data.tar.gz: 23e16854c305542ee0976f570444d7b99cadcb6ec460d83bebc73a65cba9c28e3beba485c9943797b174b80bdd783c216d89d539e8aecdbda62e1c31f017efce
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # IOStreams
2
- [![Gem Version](https://img.shields.io/gem/v/iostreams.svg)](https://rubygems.org/gems/iostreams) [![Downloads](https://img.shields.io/gem/dt/iostreams.svg)](https://rubygems.org/gems/iostreams) [![License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)](http://opensource.org/licenses/Apache-2.0) ![](https://img.shields.io/badge/status-Production%20Ready-blue.svg) [![Gitter chat](https://img.shields.io/badge/IRC%20(gitter)-Support-brightgreen.svg)](https://gitter.im/rocketjob/support)
2
+ [![Gem Version](https://img.shields.io/gem/v/iostreams.svg)](https://rubygems.org/gems/iostreams) [![Downloads](https://img.shields.io/gem/dt/iostreams.svg)](https://rubygems.org/gems/iostreams) [![License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)](http://opensource.org/licenses/Apache-2.0) ![](https://img.shields.io/badge/status-Production%20Ready-blue.svg)
3
3
 
4
4
  IOStreams is an incredibly powerful streaming library that makes changes to file formats, compression, encryption,
5
5
  or storage mechanism transparent to the application.
@@ -26,12 +26,13 @@ module IOStreams
26
26
  include SemanticLogger::Loggable if defined?(SemanticLogger)
27
27
 
28
28
  class << self
29
- attr_accessor :sshpass_bin, :sftp_bin, :sshpass_wait_seconds
29
+ attr_accessor :sshpass_bin, :sftp_bin, :sshpass_wait_seconds, :before_password_wait_seconds
30
30
  end
31
31
 
32
- @sftp_bin = "sftp"
33
- @sshpass_bin = "sshpass"
34
- @sshpass_wait_seconds = 5
32
+ @sftp_bin = "sftp"
33
+ @sshpass_bin = "sshpass"
34
+ @before_password_wait_seconds = 2
35
+ @sshpass_wait_seconds = 5
35
36
 
36
37
  attr_reader :hostname, :username, :ssh_options, :url, :port
37
38
 
@@ -168,9 +169,14 @@ module IOStreams
168
169
  with_sftp_args do |args|
169
170
  Open3.popen2e(*args) do |writer, reader, waith_thr|
170
171
  begin
172
+ # Give time for remote sftp server to get ready to accept the password.
173
+ sleep self.class.before_password_wait_seconds
174
+
171
175
  writer.puts password
176
+
172
177
  # Give time for password to be processed and stdin to be passed to sftp process.
173
178
  sleep self.class.sshpass_wait_seconds
179
+
174
180
  writer.puts "get #{remote_file_name} #{local_file_name}"
175
181
  writer.puts "bye"
176
182
  writer.close
@@ -271,9 +277,9 @@ module IOStreams
271
277
  end
272
278
 
273
279
  def build_ssh_options
274
- options = ssh_options.dup
275
- options[:logger] ||= logger if defined?(SemanticLogger)
276
- options[:port] ||= port
280
+ options = ssh_options.dup
281
+ options[:logger] ||= logger if defined?(SemanticLogger)
282
+ options[:port] ||= port
277
283
  options[:max_pkt_size] ||= 65_536
278
284
  options[:password] ||= @password
279
285
  options
@@ -1,3 +1,3 @@
1
1
  module IOStreams
2
- VERSION = "1.6.1".freeze
2
+ VERSION = "1.6.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iostreams
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-29 00:00:00.000000000 Z
11
+ date: 2021-05-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -132,56 +132,56 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.1.6
135
+ rubygems_version: 3.2.15
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Input and Output streaming for Ruby.
139
139
  test_files:
140
- - test/pgp_reader_test.rb
141
- - test/deprecated_test.rb
142
140
  - test/builder_test.rb
143
- - test/line_reader_test.rb
144
- - test/xlsx_reader_test.rb
145
- - test/minimal_file_reader.rb
146
- - test/row_writer_test.rb
147
- - test/zip_reader_test.rb
148
- - test/bzip2_writer_test.rb
149
- - test/encode_writer_test.rb
150
- - test/gzip_writer_test.rb
151
- - test/stream_test.rb
152
- - test/record_reader_test.rb
153
- - test/pgp_writer_test.rb
154
- - test/line_writer_test.rb
155
- - test/row_reader_test.rb
156
141
  - test/bzip2_reader_test.rb
157
- - test/zip_writer_test.rb
158
- - test/gzip_reader_test.rb
142
+ - test/bzip2_writer_test.rb
143
+ - test/deprecated_test.rb
159
144
  - test/encode_reader_test.rb
160
- - test/test_helper.rb
161
- - test/utils_test.rb
162
- - test/tabular_test.rb
163
- - test/path_test.rb
164
- - test/pgp_test.rb
165
- - test/io_streams_test.rb
166
- - test/record_writer_test.rb
167
- - test/paths/matcher_test.rb
168
- - test/paths/s3_test.rb
169
- - test/paths/sftp_test.rb
170
- - test/paths/file_test.rb
171
- - test/paths/http_test.rb
172
- - test/files/text.zip
173
- - test/files/spreadsheet.xlsx
145
+ - test/encode_writer_test.rb
174
146
  - test/files/embedded_lines_test.csv
147
+ - test/files/multiple_files.zip
148
+ - test/files/spreadsheet.xlsx
175
149
  - test/files/test.csv
176
150
  - test/files/test.json
177
- - test/files/text.zip.gz
178
- - test/files/unclosed_quote_test.csv
151
+ - test/files/test.psv
152
+ - test/files/text file.txt
153
+ - test/files/text.txt
179
154
  - test/files/text.txt.bz2
180
- - test/files/text.txt.gz.zip
181
155
  - test/files/text.txt.gz
182
- - test/files/text.txt
183
- - test/files/test.psv
156
+ - test/files/text.txt.gz.zip
157
+ - test/files/text.zip
158
+ - test/files/text.zip.gz
184
159
  - test/files/unclosed_quote_large_test.csv
160
+ - test/files/unclosed_quote_test.csv
185
161
  - test/files/unclosed_quote_test2.csv
186
- - test/files/multiple_files.zip
187
- - test/files/text file.txt
162
+ - test/gzip_reader_test.rb
163
+ - test/gzip_writer_test.rb
164
+ - test/io_streams_test.rb
165
+ - test/line_reader_test.rb
166
+ - test/line_writer_test.rb
167
+ - test/minimal_file_reader.rb
168
+ - test/path_test.rb
169
+ - test/paths/file_test.rb
170
+ - test/paths/http_test.rb
171
+ - test/paths/matcher_test.rb
172
+ - test/paths/s3_test.rb
173
+ - test/paths/sftp_test.rb
174
+ - test/pgp_reader_test.rb
175
+ - test/pgp_test.rb
176
+ - test/pgp_writer_test.rb
177
+ - test/record_reader_test.rb
178
+ - test/record_writer_test.rb
179
+ - test/row_reader_test.rb
180
+ - test/row_writer_test.rb
181
+ - test/stream_test.rb
182
+ - test/tabular_test.rb
183
+ - test/test_helper.rb
184
+ - test/utils_test.rb
185
+ - test/xlsx_reader_test.rb
186
+ - test/zip_reader_test.rb
187
+ - test/zip_writer_test.rb