hss 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hss +9 -2
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 183948d88f7b2935a6282e65c8c2a7516a21ac02
|
4
|
+
data.tar.gz: 8115548ff012d8a166658f4c93198dc7e419c214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aacaad14ddcfb54597a32aedd3c0222dd3b836db4c5144e5b23d4551581373e0215b62299fb3532098780b038300f20e7e003587dade8f75d4a7055a7b2b00da
|
7
|
+
data.tar.gz: dd2a9d31e0a47b2a2e31f077caac6c38e4ecb3ae5d2191cd8c819682d08e96e27de3964c1b51c3a9449da94634546bcd72dbba4438617a242e357829dec2d493
|
data/lib/hss
CHANGED
@@ -21,6 +21,8 @@ def default(a, b)
|
|
21
21
|
a.nil? ? a : b
|
22
22
|
end
|
23
23
|
|
24
|
+
Debug = (ENV.include? 'HSS_DEBUG') ? true : false
|
25
|
+
|
24
26
|
possible_paths = [
|
25
27
|
File.expand_path(ENV['HSS_CONFIG'].to_s),
|
26
28
|
File.expand_path('~/.hss.yml'),
|
@@ -33,7 +35,7 @@ if possible_paths.empty?
|
|
33
35
|
end
|
34
36
|
|
35
37
|
Conf = open(possible_paths[0]) { |file| YAML.load(file.read) }
|
36
|
-
Input = ARGV.
|
38
|
+
Input = ARGV.shift
|
37
39
|
Args = ARGV.inject('') { |memo, obj| memo += " '" + obj.gsub(/([$"])/, '\1') + "'" }
|
38
40
|
|
39
41
|
if Input.nil? or Input == 'help'
|
@@ -45,7 +47,12 @@ else
|
|
45
47
|
next unless Input.match(pattern['short'])
|
46
48
|
long_form = eval '"' + pattern['long'] + '"'
|
47
49
|
#long_form = ERB.new('<%= "' + pattern['long'] + '" %>').result
|
48
|
-
|
50
|
+
if Debug
|
51
|
+
puts "ssh #{long_form} #{Args}"
|
52
|
+
exit
|
53
|
+
else
|
54
|
+
exec "ssh #{long_form} #{Args}"
|
55
|
+
end
|
49
56
|
end
|
50
57
|
puts "Couldn't find a matching host for: #{Input}"
|
51
58
|
exit 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
@@ -43,4 +43,3 @@ signing_key:
|
|
43
43
|
specification_version: 4
|
44
44
|
summary: SSH helper
|
45
45
|
test_files: []
|
46
|
-
has_rdoc:
|