bfs-scp 0.8.3 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bfs-scp.gemspec +2 -1
- data/lib/bfs/bucket/scp.rb +3 -3
- data/spec/bfs/bucket/scp_spec.rb +5 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 345c178bc8950be783723d1814d33fe716a2efb8d01f308bf6efef1ee4324438
|
4
|
+
data.tar.gz: 7f4c76b7945a42e49eda4c9e1c4cdc8ef6a157d6cdf081826e1a781063d4b561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aad1db7312395c6cf954da52939d8fbc6f9692b65c2f453831ffe5e8cb4a912e5eecbb8f52aaf9c0c8181d56665043f78f297663c7acce80c3f1735485542fa
|
7
|
+
data.tar.gz: 30dad63faf42bb434b19f9db45311ba63e46460e92e1146e4ab89813290dc328715de6bf298b78b7a5002d6b6447bd72426afbebc338a019ce78dd722ac6d778
|
data/bfs-scp.gemspec
CHANGED
@@ -15,8 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
17
17
|
s.require_paths = ['lib']
|
18
|
-
s.required_ruby_version = '>= 2.
|
18
|
+
s.required_ruby_version = '>= 2.7'
|
19
19
|
|
20
20
|
s.add_dependency 'bfs', s.version
|
21
21
|
s.add_dependency 'net-scp'
|
22
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
22
23
|
end
|
data/lib/bfs/bucket/scp.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'bfs'
|
2
2
|
require 'net/scp'
|
3
|
-
require 'net/ssh'
|
4
3
|
require 'shellwords'
|
5
4
|
|
6
5
|
module BFS
|
@@ -27,12 +26,12 @@ module BFS
|
|
27
26
|
# @option opts [Boolean] :keepalive use keepalive.
|
28
27
|
# @option opts [Integer] :keepalive_interval interval if keepalive enabled. Default: 300.
|
29
28
|
# @option opts [Array<String>] :keys an array of file names of private keys to use for publickey and hostbased authentication.
|
30
|
-
# @option opts [
|
29
|
+
# @option opts [Symbol] :verify_host_key host-key verification should be, either :never, :accept_new_or_local_tunnel, :accept_new, or :always.
|
31
30
|
def initialize(host, prefix: nil, **opts)
|
32
31
|
super(**opts)
|
33
32
|
|
34
33
|
@prefix = prefix
|
35
|
-
@client = Net::SCP.start(host, nil, **opts.slice(*Net::SSH::VALID_OPTIONS))
|
34
|
+
@client = Net::SCP.start(host, nil, **opts.slice(*Net::SSH::VALID_OPTIONS), non_interactive: true)
|
36
35
|
|
37
36
|
if @prefix # rubocop:disable Style/GuardClause
|
38
37
|
@prefix = "#{norm_path(@prefix)}/"
|
@@ -215,6 +214,7 @@ BFS.register('scp', 'ssh') do |url, opts, block|
|
|
215
214
|
opts[:user] ||= CGI.unescape(url.user) if url.user
|
216
215
|
opts[:password] ||= CGI.unescape(url.password) if url.password
|
217
216
|
opts[:port] ||= url.port if url.port
|
217
|
+
opts[:verify_host_key] = opts[:verify_host_key].to_sym if opts[:verify_host_key]
|
218
218
|
|
219
219
|
BFS::Bucket::SCP.open(url.host, **opts, &block)
|
220
220
|
end
|
data/spec/bfs/bucket/scp_spec.rb
CHANGED
@@ -29,6 +29,11 @@ RSpec.describe BFS::Bucket::SCP, scp: true do
|
|
29
29
|
expect(bucket).to be_instance_of(described_class)
|
30
30
|
expect(bucket.instance_variable_get(:@prefix)).to eq('a/b/')
|
31
31
|
bucket.close
|
32
|
+
|
33
|
+
bucket = BFS.resolve('scp://root:root@127.0.0.1:7022?verify_host_key=never')
|
34
|
+
expect(bucket).to be_instance_of(described_class)
|
35
|
+
expect(bucket.instance_variable_get(:@client).session.transport.host_key_verifier).to be_instance_of(Net::SSH::Verifiers::Never)
|
36
|
+
bucket.close
|
32
37
|
end
|
33
38
|
|
34
39
|
it 'handles absolute and relative paths' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bfs-scp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-17 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.1
|
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.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: net-scp
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,7 +51,8 @@ files:
|
|
51
51
|
homepage: https://github.com/bsm/bfs.rb
|
52
52
|
licenses:
|
53
53
|
- Apache-2.0
|
54
|
-
metadata:
|
54
|
+
metadata:
|
55
|
+
rubygems_mfa_required: 'true'
|
55
56
|
post_install_message:
|
56
57
|
rdoc_options: []
|
57
58
|
require_paths:
|
@@ -60,14 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
61
|
requirements:
|
61
62
|
- - ">="
|
62
63
|
- !ruby/object:Gem::Version
|
63
|
-
version: 2.
|
64
|
+
version: '2.7'
|
64
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
67
|
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0'
|
69
70
|
requirements: []
|
70
|
-
rubygems_version: 3.
|
71
|
+
rubygems_version: 3.3.3
|
71
72
|
signing_key:
|
72
73
|
specification_version: 4
|
73
74
|
summary: SCP/SSH adapter for bfs
|