spectre-ftp 2.0.2 → 2.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/spectre/ftp.rb +13 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8d6f6f87bd1046313a344b49321de16b08d13dd057ef2d1a2c13341b65111d7
4
- data.tar.gz: 1f10d7313743695c98dc595736aa7fd4566c9e4b47e73fad364f2daffdff1df0
3
+ metadata.gz: 7e46fba6cb0d3e4b4d028a9c6a55f83560a4f17bd35d7539e250806c234eca1d
4
+ data.tar.gz: a0d862670094baa553b7a23d46eaac7b3a6bbde87f2ad8b0f432ee2dbe560667
5
5
  SHA512:
6
- metadata.gz: a5409c0acb1cefaf3b6cf392f7dfe6f6cefb97346eca7a078920c2c1f0ec84745bf5347b325bc2b8f0571d3f40e578d52c3212ac5dc5f253dc6acd9a4a7e85fa
7
- data.tar.gz: f93d905e0264e1225716a24ace24aa944c667c5b4c887a7aed8412af0145692db462de5c3b8a5d1b437bf81dc273628a7c794f412b28de72e41b61f9f1287088
6
+ metadata.gz: dc6eeb05d1e853f16351a8dbb598e0bd5768bb13ac9af72235ecb64fa599d7505ffc703c99a75c87e7fda80bcdf1dca9c23a55e34f8180ca5c0801757f5a01db
7
+ data.tar.gz: 50cec5fc3bef75a2ad843ee618580bf6025691076cc8d5989818ec2b90d65d8e3af5590471979fd97266b780925a2f1ebeb8bd8685f6ca0b239cbec393c1f635
data/lib/spectre/ftp.rb CHANGED
@@ -292,8 +292,17 @@ module Spectre
292
292
  end
293
293
 
294
294
  def ftps(name, config = {}, &)
295
- config[:ssl] ||= { implicit: true }
295
+ config[:ssl] = true
296
296
  config[:port] ||= 990
297
+ config[:implicit] = true
298
+
299
+ ftp(name, config, &)
300
+ end
301
+
302
+ def ftpes(name, config = {}, &)
303
+ config[:ssl] = true
304
+ config[:port] ||= 21
305
+ config[:implicit] = false
297
306
 
298
307
  ftp(name, config, &)
299
308
  end
@@ -306,7 +315,8 @@ module Spectre
306
315
  password = config.delete(:password) || cfg['password']
307
316
 
308
317
  config[:port] = config[:port] || cfg['port'] || 21
309
- config[:ssl] = config[:ssl] || cfg['ssl']
318
+ config[:ssl] = config[:ssl] || cfg['ssl'] || false
319
+ config[:implicit_ftps] = config.delete(:implicit) || cfg['implicit'] || false
310
320
 
311
321
  ftp_conn = FTPConnection.new(hostname, username, password, config, @logger)
312
322
 
@@ -346,5 +356,5 @@ module Spectre
346
356
  end
347
357
  end
348
358
 
349
- Engine.register(FTP::Client, :ftp, :sftp, :ftps) if defined? Engine
359
+ Engine.register(FTP::Client, :ftp, :sftp, :ftps, :ftpes) if defined? Engine
350
360
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectre-ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neubauer