bfs-ftp 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bfs/bucket/ftp.rb +2 -2
- data/spec/bfs/bucket/ftp_spec.rb +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bf5884a977c9d577fc09820f252807b903a8d1fbc73f32d10f111502512f789
|
4
|
+
data.tar.gz: e01f3f8c33b596ebe298921d607a180cde1d1b47331a88e2d774d3e1b7c4a04a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ff95022b49b9ec2bd51d8a30d14cdd07bb9c691d11fdbbe4da5b4522e405908e5f84398149725f57596b90e8c9249e855c1b11124f5f17cc6b4c7c22d6ad072
|
7
|
+
data.tar.gz: 013e221e874fa7b29c9d94589bade6d249adb3258b021872b1cdf5a18c22b607d571999d19abd66eea38069b3079cad8ecb2146f7785c48422c3ed72d1d3f1bf
|
data/lib/bfs/bucket/ftp.rb
CHANGED
@@ -125,7 +125,7 @@ module BFS
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
-
BFS.register('ftp'
|
128
|
+
BFS.register('ftp') do |url, opts, block|
|
129
129
|
prefix = BFS.norm_path(opts[:prefix] || url.path)
|
130
130
|
opts[:prefix] = prefix unless prefix.empty?
|
131
131
|
|
@@ -133,7 +133,7 @@ BFS.register('ftp', 'sftp') do |url, opts, block|
|
|
133
133
|
username: url.user ? CGI.unescape(url.user) : nil,
|
134
134
|
password: url.password ? CGI.unescape(url.password) : nil,
|
135
135
|
port: url.port,
|
136
|
-
ssl: opts.key?(:ssl)
|
136
|
+
ssl: opts.key?(:ssl),
|
137
137
|
}
|
138
138
|
BFS::Bucket::FTP.open url.host, **opts, **extra, &block
|
139
139
|
end
|
data/spec/bfs/bucket/ftp_spec.rb
CHANGED
@@ -4,7 +4,7 @@ RSpec.describe BFS::Bucket::FTP, ftp: true do
|
|
4
4
|
subject { described_class.new hostname, **conn_opts }
|
5
5
|
|
6
6
|
let(:hostname) { '127.0.0.1' }
|
7
|
-
let(:conn_opts) { { port: 7021, username: '
|
7
|
+
let(:conn_opts) { { port: 7021, username: 'user', password: 'pass', prefix: SecureRandom.uuid } }
|
8
8
|
|
9
9
|
after { subject.close }
|
10
10
|
|
@@ -13,14 +13,14 @@ RSpec.describe BFS::Bucket::FTP, ftp: true do
|
|
13
13
|
metadata: false
|
14
14
|
|
15
15
|
it 'resolves from URL' do
|
16
|
-
bucket = BFS.resolve('ftp://
|
16
|
+
bucket = BFS.resolve('ftp://user:pass@127.0.0.1:7021')
|
17
17
|
expect(bucket).to be_instance_of(described_class)
|
18
|
-
expect(bucket.instance_variable_get(:@client).pwd).to eq('/ftp/
|
18
|
+
expect(bucket.instance_variable_get(:@client).pwd).to eq('/ftp/user')
|
19
19
|
bucket.close
|
20
20
|
|
21
|
-
bucket = BFS.resolve('ftp://
|
21
|
+
bucket = BFS.resolve('ftp://user:pass@127.0.0.1:7021/a/b/')
|
22
22
|
expect(bucket).to be_instance_of(described_class)
|
23
|
-
expect(bucket.instance_variable_get(:@client).pwd).to eq('/ftp/
|
23
|
+
expect(bucket.instance_variable_get(:@client).pwd).to eq('/ftp/user/a/b')
|
24
24
|
bucket.close
|
25
25
|
end
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bfs-ftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bfs
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: net-ftp-list
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|