ro_thor 4.5.2 → 4.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ro_thor/ssh.rb +5 -7
- 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: dfecd9a53b1d6d58f9e771af564efa23544bfe12e38177d538c578902fa4dab7
|
4
|
+
data.tar.gz: de840dcd4be4fceab5d7334f79b1b59f4a3ba0200718371344a916202ddc2c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7923edcb0b94d31ce98d686c2e9b2edeca55fe8d06b0f0c6740df46c00057ce80afd5ba5589307c0bad5ebb6c7829bd3ad88c1d5c33e2c97f32dcb0725126343
|
7
|
+
data.tar.gz: 0adf8cbe3d9f6743c34cff11a3432f026aff669dc3b9f53d5861e62f11b505483e3fcb32d7fb1fedba387a38c15f07ba7d111809c218d7a51acf505d7492aed9
|
data/lib/ro_thor/ssh.rb
CHANGED
@@ -12,24 +12,22 @@ class RoThor
|
|
12
12
|
|
13
13
|
attr_accessor :user_at_host, :se
|
14
14
|
|
15
|
-
def initialize(user_at_host
|
15
|
+
def initialize(user_at_host)
|
16
16
|
@user_at_host = user_at_host
|
17
17
|
m = user_at_host.match(%r{(.*)@(.*)})
|
18
18
|
@se = ::Net::SSH.start(m[2], m[1])
|
19
19
|
end
|
20
20
|
|
21
|
-
def down(from, to
|
21
|
+
def down(from, to)
|
22
22
|
RoFile.msp(to)
|
23
23
|
sys "scp #{user_at_host}:#{from} #{to}"
|
24
24
|
end
|
25
25
|
|
26
|
-
def up(from, to
|
26
|
+
def up(from, to)
|
27
27
|
sys "scp #{from} #{user_at_host}:#{to}"
|
28
28
|
end
|
29
29
|
|
30
|
-
def sh(*args,
|
31
|
-
args_clone, opts = args.ro_opts
|
32
|
-
|
30
|
+
def sh(*args, **opts)
|
33
31
|
cmd = args.join(" ")
|
34
32
|
msg = opts[:status] || cmd
|
35
33
|
|
@@ -43,7 +41,7 @@ class RoThor
|
|
43
41
|
stderr_lines = []
|
44
42
|
|
45
43
|
ch = se.open_channel do |ch|
|
46
|
-
ch.exec(
|
44
|
+
ch.exec(cmd) do |ch, success|
|
47
45
|
unless success
|
48
46
|
raise ::RoErr::RmtErr, "could not exe cmd: #{command.inspect}"
|
49
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ro_thor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -126,10 +126,10 @@ signing_key:
|
|
126
126
|
specification_version: 4
|
127
127
|
summary: ''
|
128
128
|
test_files:
|
129
|
+
- spec/spec_helper.rb
|
129
130
|
- spec/lib/ro_cmd/thor/dp_spec.rb
|
131
|
+
- spec/lib/core_ext/array_spec.rb
|
130
132
|
- spec/lib/ro_thor/ssh_spec.rb
|
131
133
|
- spec/lib/ro_thor/ro_err_spec.rb
|
132
|
-
- spec/lib/core_ext/array_spec.rb
|
133
134
|
- spec/rails_helper.rb
|
134
|
-
- spec/spec_helper.rb
|
135
135
|
- spec/mysql/my.cnf
|