koma 0.10.0 → 0.10.1

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
  SHA1:
3
- metadata.gz: db1380979186368ebfa605559dab0218e3a89263
4
- data.tar.gz: e117f8bdb660c5ce0e55c15413e7e123339bdfbd
3
+ metadata.gz: 5587b2e28c83b821c268b46ee8fb55e0703b59d2
4
+ data.tar.gz: e8e20af923807a34b761d67783502f178517a56e
5
5
  SHA512:
6
- metadata.gz: eb850c346b24037bb842395391f1ed7449707f62eff0788a72f83d00eecd120a4797ccefa9317299a401757c7763ea85a0110a5ae666f6c8208248ac12507fbe
7
- data.tar.gz: 573f446930f97f3edcf13b0915561f1e94efc1c21588cef06b52881d8bf2a24289b12ce8db1d0c03090e84a9ce80e7691d6ad8f7e17e6b064efa51c81cec1ec9
6
+ metadata.gz: 6a1792a8a5b07b706ff5af04b9ecebba986e70e7989414bff39c9e0c450113438a43867ffebdbffffc4841a66290511e353c3069464725c29295ac064ce3a156
7
+ data.tar.gz: 54251c646ee8ff76ba963079bb7cd66e1a616f049a84ce62ae7d7f7d79c6818c867931657ba7b3b7005322a7aa2567dd48ab10eefc49307c2c959437076dcd7c
data/README.md CHANGED
@@ -30,9 +30,9 @@ If you login remote server via `ssh example.com`, you can execute:
30
30
  $ koma ssh example.com
31
31
  ```
32
32
 
33
- And get stdout like [this](stdout_sample.json).
33
+ And gather host inventory stdout like [this](stdout_sample.json).
34
34
 
35
- ### Gather multiple hosts
35
+ ### Gather host inventory from multiple hosts
36
36
 
37
37
  ```sh
38
38
  $ koma ssh example.com,example.jp
@@ -46,7 +46,7 @@ $ koma ssh example.com,example.jp
46
46
  }
47
47
  ```
48
48
 
49
- ### Pro Tip: Gather multiple hosts with ssh_config
49
+ ### Pro Tip: Gather host inventory from multiple hosts with ssh_config
50
50
 
51
51
  ```sh
52
52
  $ cat <<EOF > ssh_config_tmp
@@ -66,13 +66,13 @@ EOF
66
66
  $ cat ssh_config_tmp | koma ssh --key platform,platform_version
67
67
  ```
68
68
 
69
- Use [sconb](https://github.com/k1LoW/sconb).
69
+ Use [sconb](https://github.com/k1LoW/sconb) to filter ~/.ssh/config.
70
70
 
71
71
  ```sh
72
72
  $ sconb dump example_* | sconb restore | koma ssh --key platform,platform_version
73
73
  ```
74
74
 
75
- Gather vagrant box host inventory.
75
+ Gather vagrant host inventory.
76
76
 
77
77
  ```sh
78
78
  $ vagrant ssh-config | koma ssh --key cpu,kernel
@@ -42,11 +42,13 @@ module Koma
42
42
  def run_command_via_ssh(host, options, command)
43
43
  set :ssh_options, build_ssh_options(host, options)
44
44
  result = Specinfra.backend.run_command(command)
45
- {
46
- exit_signal: result.exit_signal,
47
- exit_status: result.exit_status,
48
- stderr: result.stderr,
49
- stdout: result.stdout
45
+ { command =>
46
+ {
47
+ exit_signal: result.exit_signal,
48
+ exit_status: result.exit_status,
49
+ stderr: result.stderr,
50
+ stdout: result.stdout
51
+ }
50
52
  }
51
53
  end
52
54
 
@@ -39,7 +39,7 @@ module Koma
39
39
  option :identity_file, type: :string, banner: '<identity_file>', desc: 'identity file', aliases: :i
40
40
  option :port, type: :numeric, banner: '<port>', desc: 'port', aliases: :p
41
41
  def run_command(host = nil, command = nil)
42
- if stdin.nil?
42
+ if host.nil?
43
43
  STDERR.puts 'ERROR: "koma run-command" was called with no arguments'
44
44
  STDERR.puts 'Usage: "koma run-command <host1,host2,..> <command>"'
45
45
  return
@@ -1,3 +1,3 @@
1
1
  module Koma
2
- VERSION = '0.10.0'
2
+ VERSION = '0.10.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor