hocho 0.3.7 → 0.3.8
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.
- checksums.yaml +4 -4
- data/lib/hocho/command.rb +1 -1
- data/lib/hocho/drivers/ssh_base.rb +3 -2
- data/lib/hocho/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 624f4576bac01ab09d957ba4252d50364c64a3129a09a25ec09773be27f7d1c8
|
4
|
+
data.tar.gz: 2c217ddcb5f628117d587e6d0d6f4db55dc5f87b951d59aee276acf4dec3872d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0315529a8835d22611d7e8d64763d21e497022958756c13d8d61bc915dc48f751b0672cf569fa535d76b882d5d20041f6787d72caecd37c54d608380a7887309'
|
7
|
+
data.tar.gz: ba8d6825082b32a63d03d8196d2180e99c43597c4e93cd63b4dd701f4bf172fbd2ddca810b448bf67659133cff70175abe4728c843c6ab6c0272db377c239b42
|
data/lib/hocho/command.rb
CHANGED
@@ -36,7 +36,7 @@ module Hocho
|
|
36
36
|
desc "show NAME", ""
|
37
37
|
method_option :format, enum: %w(yaml json), default: 'yaml'
|
38
38
|
def show(name)
|
39
|
-
host = inventory.filter(name: name).first
|
39
|
+
host = inventory.filter({name: name}).first
|
40
40
|
if host
|
41
41
|
case options[:format]
|
42
42
|
when 'yaml'
|
@@ -22,14 +22,15 @@ module Hocho
|
|
22
22
|
ssh_cmd = ['ssh', *host.openssh_config.flat_map { |l| ['-o', "\"#{l}\""] }].join(' ')
|
23
23
|
shm_exclude = shm_prefix.map{ |_| "--exclude=#{_}" }
|
24
24
|
compress = host.compress? ? ['-z'] : []
|
25
|
-
|
25
|
+
hostname = host.hostname.include?(?:) ? "[#{host.hostname}]" : host.hostname # surround with square bracket for ipv6 address
|
26
|
+
rsync_cmd = [*%w(rsync -a --copy-links --copy-unsafe-links --delete --exclude=.git), *compress, *shm_exclude, '--rsh', ssh_cmd, '.', "#{hostname}:#{host_basedir}"]
|
26
27
|
|
27
28
|
puts "=> $ #{rsync_cmd.shelljoin}"
|
28
29
|
system(*rsync_cmd, chdir: base_dir) or raise 'failed to rsync'
|
29
30
|
|
30
31
|
unless shm_prefix.empty?
|
31
32
|
shm_include = shm_prefix.map{ |_| "--include=#{_.sub(%r{/\z},'')}/***" }
|
32
|
-
rsync_cmd = [*%w(rsync -a --copy-links --copy-unsafe-links --delete), *compress, *shm_include, '--exclude=*', '--rsh', ssh_cmd, '.', "#{
|
33
|
+
rsync_cmd = [*%w(rsync -a --copy-links --copy-unsafe-links --delete), *compress, *shm_include, '--exclude=*', '--rsh', ssh_cmd, '.', "#{hostname}:#{host_shm_basedir}"]
|
33
34
|
puts "=> $ #{rsync_cmd.shelljoin}"
|
34
35
|
system(*rsync_cmd, chdir: base_dir) or raise 'failed to rsync'
|
35
36
|
shm_prefix.each do |x|
|
data/lib/hocho/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hocho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sorah (Shota Fukumori)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.4.0.dev
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Server provisioning tool with itamae
|