ro_thor 4.5.2 → 4.5.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ro_thor/ssh.rb +5 -7
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afa23e7e7a73fa1081b16b19dd6c23885ccae2aa758fa15e62c9f06327858d9c
4
- data.tar.gz: 18d917709a6d26063a6f6342d80a0e80d8aa7ea56b2c47a2fa539e1dcedfe169
3
+ metadata.gz: dfecd9a53b1d6d58f9e771af564efa23544bfe12e38177d538c578902fa4dab7
4
+ data.tar.gz: de840dcd4be4fceab5d7334f79b1b59f4a3ba0200718371344a916202ddc2c3f
5
5
  SHA512:
6
- metadata.gz: 9dddca51dc229b9c27636801594a33bd5046c2134f9a384e2a7b38368ce1ab61148dcba6d243b24be6306835d450b99e485498185bd3c7da4adc895dc81bef68
7
- data.tar.gz: c9746ad4784046cfc78dbd336499bf33004e7b823756ba4cf335fb0eb988371113ccbb624219a806f9e4bd98d21af171507df1ab5c01e536f3342f3a880cb5b4
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, &blk)
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, *args, &blk)
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, *args, &blk)
26
+ def up(from, to)
27
27
  sys "scp #{from} #{user_at_host}:#{to}"
28
28
  end
29
29
 
30
- def sh(*args, &blk)
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("bash -ci '#{cmd}'") do |ch, success|
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.2
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-19 00:00:00.000000000 Z
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