dandelion 0.5.4 → 0.6.0

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
- SHA1:
3
- metadata.gz: 3cabf65a76a5c2f1d342e37622bd46eacbfac685
4
- data.tar.gz: 8867a0b64744e90b42c96b6ce40a0117acaf54c5
2
+ SHA256:
3
+ metadata.gz: 6ff4ba37b8419deac5f0853252d57e9bcd6a8b07f532b0429f83c92b5e1a40d5
4
+ data.tar.gz: e62ebf5a1502e45400a7a71c1c937ade7d660ac0ef1b99628e909a4eed2011e5
5
5
  SHA512:
6
- metadata.gz: b2d8284ac4667afe38f92bbf0cf7375de3b3897cd4597821c2810d20fda17104e136de9a100b6db108c8279b3b29ddc114d180363f78fd63e6a3c83d4cdd2a7d
7
- data.tar.gz: 9169b0716f5e4e30739532fda1a89a125998b7c88d48c6d8a27ef7868e3383daf0ae16a30ecff3e3e41df93fcd3a8376b13cc6e7a081d11c938ba2e2926ccf54
6
+ metadata.gz: 382c28b517ec058ba9862549e586f62e3415a2518ee8c72438b5ccd55479aa06208eda9359e94dc940cc8009cf69b832b66f76f6f302ff6f9e5ee4356f8e95ba
7
+ data.tar.gz: a3259adefc5282f38301df1f558356a14e3bdfde7f2eeb5ae1d8601c8349c38f34c2f5ddd9529d37321700353c9f2e79c0394c0a4d2bac704025e256e9fb0040
data/README.md CHANGED
@@ -108,7 +108,7 @@ Optional:
108
108
  * `port` (defaults to 21)
109
109
  * `passive` (defaults to false)
110
110
 
111
- **FTPS**: `adapter: ftps` (ftp over TLS, based on [DoubleBagFTPS](https://github.com/bnix/double-bag-ftps) and Dandelions native FTP adapter)
111
+ **FTPS**: `adapter: ftps`
112
112
 
113
113
  Required: (same as FTP)
114
114
 
@@ -120,7 +120,6 @@ Optional: (in addition to options for FTP)
120
120
 
121
121
  * `port`
122
122
  * `passive`
123
- * `auth_tls` (default false)
124
123
  * `ftps_implicit` (default false: explicit TLS)
125
124
  * `insecure` (default false, true to allow self-signed certificates)
126
125
 
@@ -19,7 +19,7 @@ module Dandelion
19
19
 
20
20
  def read(file)
21
21
  begin
22
- @ftp.getbinaryfile(path(file), nil)
22
+ @ftp.get(path(file), nil)
23
23
  rescue Net::FTPPermError => e
24
24
  nil
25
25
  end
@@ -28,11 +28,11 @@ module Dandelion
28
28
  def write(file, data)
29
29
  temp(file, data) do |temp|
30
30
  begin
31
- @ftp.putbinaryfile(temp, path(file))
31
+ @ftp.put(temp, path(file))
32
32
  rescue Net::FTPPermError => e
33
33
  raise e unless e.to_s =~ /550|553/
34
34
  mkdir_p(File.dirname(path(file)))
35
- @ftp.putbinaryfile(temp, path(file))
35
+ @ftp.put(temp, path(file))
36
36
  end
37
37
  end
38
38
  end
@@ -54,6 +54,9 @@ module Dandelion
54
54
  def ftp_client
55
55
  ftp = Net::FTP.new
56
56
  ftp.connect(@config['host'], @config['port'])
57
+ if @config['ascii']
58
+ ftp.binary=false
59
+ end
57
60
  ftp.login(@config['username'], @config['password'])
58
61
  ftp.passive = @config['passive']
59
62
  ftp
@@ -6,14 +6,12 @@ module Dandelion
6
6
  include ::Dandelion::Utils
7
7
 
8
8
  adapter 'ftps'
9
- requires_gems 'double-bag-ftps'
10
9
 
11
10
  def initialize(config)
12
- require 'double_bag_ftps'
11
+ require 'net/ftp'
13
12
 
14
- config[:auth_tls] = to_b(config[:auth_tls])
15
13
  config[:ftps_implicit] = to_b(config[:ftps_implicit])
16
- config[:inscecure] = to_b(config[:insecure])
14
+ config[:insecure] = to_b(config[:insecure])
17
15
 
18
16
  super(config)
19
17
  end
@@ -21,24 +19,27 @@ module Dandelion
21
19
  private
22
20
 
23
21
  def ftp_client
24
- ftps = DoubleBagFTPS.new(@config['host'], nil, nil, nil, ftps_mode, {})
25
-
26
- if @config['insecure']
27
- ftps.ssl_context = DoubleBagFTPS.create_ssl_context(verify_mode: OpenSSL::SSL::VERIFY_NONE)
22
+ host = @config['host']
23
+ ftps = Net::FTP.new(host, connection_params)
24
+ if @config['ascii']
25
+ ftps.binary = false
28
26
  end
29
27
 
30
- ftps.login(@config['username'], @config['password'], nil, ftps_auth)
31
- ftps.passive = @config[:passive]
32
-
33
- ftps
34
- end
35
-
36
- def ftps_auth
37
- @config['auth_tls'] ? 'TLS' : nil
28
+ def connection_params
29
+ {
30
+ port: @config['port'],
31
+ ssl: ssl_context_params,
32
+ passive: @config['passive'],
33
+ implicit_ftps: @config['ftps_implicit'],
34
+ username: @config['username'],
35
+ password: @config['password'],
36
+ debug_mode: @config['debug']
37
+ }
38
+ end
38
39
  end
39
40
 
40
- def ftps_mode
41
- @config['ftps_implicit'] ? DoubleBagFTPS::IMPLICIT : DoubleBagFTPS::EXPLICIT
41
+ def ssl_context_params
42
+ @config['insecure'] ? { verify_mode: OpenSSL::SSL::VERIFY_NONE } : true
42
43
  end
43
44
  end
44
45
  end
@@ -1,3 +1,3 @@
1
1
  module Dandelion
2
- VERSION = '0.5.4'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dandelion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Nelson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-01 00:00:00.000000000 Z
11
+ date: 2022-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.27.7
27
- description:
27
+ description:
28
28
  email:
29
29
  - scott@scttnlsn.com
30
30
  executables:
@@ -180,9 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  requirements: []
183
- rubyforge_project:
184
- rubygems_version: 2.6.14.1
185
- signing_key:
183
+ rubygems_version: 3.2.15
184
+ signing_key:
186
185
  specification_version: 4
187
186
  summary: Incremental Git repository deployment
188
187
  test_files: