koma 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/koma/cli.rb +7 -0
- data/lib/koma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63a1b4f591b94eb71dd8a2c1a6d1ec5d1ba4bc98
|
4
|
+
data.tar.gz: 22605355d9d199568a98106b4963b13db8b7f0f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f15869068fc4feb9170db659e9f7492ba91bdb56f8fa85ae810f8540927e6f6e3ba3945e510d5c45c4b831e13e23653e96216e4dc80389f3427ea870e781566c
|
7
|
+
data.tar.gz: 10fcfac7fb4fa48c250883d0b9db3cfc65117cbf59772636a1facb68bd60292c03e1df97c5ba894153f0e97b504d757d768904fa30f0dbb5165642bbd997ab1a
|
data/lib/koma/cli.rb
CHANGED
@@ -16,6 +16,11 @@ module Koma
|
|
16
16
|
banner: '<identity_file>',
|
17
17
|
desc: 'identity file',
|
18
18
|
aliases: :i
|
19
|
+
option :port,
|
20
|
+
type: :numeric,
|
21
|
+
banner: '<port>',
|
22
|
+
desc: 'port',
|
23
|
+
aliases: :p
|
19
24
|
def ssh(host)
|
20
25
|
user, host = host.split('@') if host.include?('@')
|
21
26
|
set :backend, :ssh
|
@@ -24,6 +29,7 @@ module Koma
|
|
24
29
|
ssh_options = Net::SSH::Config.for(host)
|
25
30
|
ssh_options[:user] = user if user
|
26
31
|
ssh_options[:keys] = [options[:identity_file]] if options[:identity_file]
|
32
|
+
ssh_options[:port] = options[:port] if options[:port]
|
27
33
|
set :ssh_options, ssh_options
|
28
34
|
puts JSON.pretty_generate out(options[:key])
|
29
35
|
end
|
@@ -62,6 +68,7 @@ module Koma
|
|
62
68
|
keys.each do |k|
|
63
69
|
begin
|
64
70
|
out[k] = Specinfra.backend.host_inventory[k]
|
71
|
+
out[k] = Specinfra.backend.host_inventory[k].inspect if k == 'ec2'
|
65
72
|
rescue NotImplementedError
|
66
73
|
out[k] = nil
|
67
74
|
end
|
data/lib/koma/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|