ey_info 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ey_info.rb +7 -3
- metadata +3 -3
data/lib/ey_info.rb
CHANGED
@@ -7,7 +7,7 @@ require 'pp'
|
|
7
7
|
require File.expand_path("../text_injector", __FILE__)
|
8
8
|
|
9
9
|
module EyInfo
|
10
|
-
Version = "0.1.
|
10
|
+
Version = "0.1.1"
|
11
11
|
|
12
12
|
class CLI
|
13
13
|
def self.run(args)
|
@@ -38,6 +38,10 @@ module EyInfo
|
|
38
38
|
options[:user] = value
|
39
39
|
end
|
40
40
|
|
41
|
+
opts.on("-t", "--template [TEMPLATE]", "path to template.") do |value|
|
42
|
+
options[:template] = value
|
43
|
+
end
|
44
|
+
|
41
45
|
opts.on("-h", "--help", "Display this help message.") do
|
42
46
|
puts opts
|
43
47
|
exit
|
@@ -120,8 +124,8 @@ module EyInfo
|
|
120
124
|
@hosts["#{server[:ssh_key]}"] = server[:hostname]
|
121
125
|
end
|
122
126
|
end
|
123
|
-
|
124
|
-
content = IO.readlines(
|
127
|
+
path = options[:template] || File.expand_path("../templates/default_ssh_config.erb", __FILE__)
|
128
|
+
content = IO.readlines(path).join("")
|
125
129
|
template = ERB.new(content)
|
126
130
|
template.result(binding)
|
127
131
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tung Nguyen
|