dandelion 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -2
- data/lib/dandelion/adapter/ftp.rb +6 -3
- data/lib/dandelion/adapter/ftps.rb +19 -18
- data/lib/dandelion/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6ff4ba37b8419deac5f0853252d57e9bcd6a8b07f532b0429f83c92b5e1a40d5
|
4
|
+
data.tar.gz: e62ebf5a1502e45400a7a71c1c937ade7d660ac0ef1b99628e909a4eed2011e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`
|
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.
|
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.
|
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.
|
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 '
|
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[:
|
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
|
-
|
25
|
-
|
26
|
-
if @config['
|
27
|
-
ftps.
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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
|
41
|
-
@config['
|
41
|
+
def ssl_context_params
|
42
|
+
@config['insecure'] ? { verify_mode: OpenSSL::SSL::VERIFY_NONE } : true
|
42
43
|
end
|
43
44
|
end
|
44
45
|
end
|
data/lib/dandelion/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
184
|
-
|
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:
|