hocho 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f5398ffdb759cbfa7f06c5d388d5fa4b5455e81229f7546a302f9a97d9aeb8d
4
- data.tar.gz: d07ddf5a3b23e81ba9b9d2eda67a909c3a4e84bd2a60a69bffcd682cad7db1e2
3
+ metadata.gz: 624f4576bac01ab09d957ba4252d50364c64a3129a09a25ec09773be27f7d1c8
4
+ data.tar.gz: 2c217ddcb5f628117d587e6d0d6f4db55dc5f87b951d59aee276acf4dec3872d
5
5
  SHA512:
6
- metadata.gz: 7e41c1eaa65f335385d5dead37cd1784500576f4ad3dfbb39e316771d28517b909097fafa687799e80067d2568a83ada90baa1db2e9030c3bcc6ddaca30020da
7
- data.tar.gz: fdb35fd1103394c48602a766db80bcc90bec1777fb6d62dc562aebf0be2dfe6f73e3af6618679547d91ab92a07626a0e8c1616033e28f32e7017f5aa72deb31f
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
- rsync_cmd = [*%w(rsync -a --copy-links --copy-unsafe-links --delete --exclude=.git), *compress, *shm_exclude, '--rsh', ssh_cmd, '.', "#{host.hostname}:#{host_basedir}"]
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, '.', "#{host.hostname}:#{host_shm_basedir}"]
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
@@ -1,3 +1,3 @@
1
1
  module Hocho
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
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.7
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: 2020-10-23 00:00:00.000000000 Z
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.1.2
171
+ rubygems_version: 3.4.0.dev
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Server provisioning tool with itamae