ssh-manager 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssh/manager/cli.rb +5 -6
- data/lib/ssh/manager/client.rb +1 -1
- data/lib/ssh/manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57446a2656dfec20efcfd79080f720344cf62bd9
|
4
|
+
data.tar.gz: 789b334d476700cf9ffdd8e145b0330afacf7a43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df48f146b2f7fddf319df69be378c028e09b79b207375e97f1a0cc269d283bc90348f2fdd5ce0d099c117f0c8dd8facc4515002c99b50344f7c6d5073a9d0f81
|
7
|
+
data.tar.gz: c92c2b88b207dfe07f9a6958fa36882aa65515b46e582bd62958c600e5ecc37490202b512d181257aefd71e10a1095c82736cc9e876f8616b8789d78eaf513c4
|
data/lib/ssh/manager/cli.rb
CHANGED
@@ -109,7 +109,7 @@ module SSH
|
|
109
109
|
#TODO connect_via
|
110
110
|
#TODO options
|
111
111
|
id.each do |con|
|
112
|
-
connection = DATABASE.get_connection_by_id(con)
|
112
|
+
connection = DATABASE.get_connection_by_id(con.to_i)
|
113
113
|
user = connection[:user]
|
114
114
|
user = ENV['USER'] if user == ""
|
115
115
|
%x(ssh-copy-id #{user}@#{connection[:ip]})
|
@@ -118,7 +118,7 @@ module SSH
|
|
118
118
|
|
119
119
|
def ping(id)
|
120
120
|
id.each do |con|
|
121
|
-
connection = DATABASE.get_connection_by_id(con)
|
121
|
+
connection = DATABASE.get_connection_by_id(con.to_i)
|
122
122
|
if connection[:connect_via]
|
123
123
|
connect_via = DATABASE.get_connection_by_id(connection[:connect_via])
|
124
124
|
ssh = "ssh #{connect_via[:user]}@#{connect_via[:ip]}"
|
@@ -133,7 +133,7 @@ module SSH
|
|
133
133
|
# id.first should be the command
|
134
134
|
cmd = id.shift
|
135
135
|
id.each do |con|
|
136
|
-
connection = DATABASE.get_connection_by_id(con)
|
136
|
+
connection = DATABASE.get_connection_by_id(con.to_i)
|
137
137
|
if connection[:connect_via]
|
138
138
|
connect_via = DATABASE.get_connection_by_id(connection[:connect_via])
|
139
139
|
ssh = "ssh #{connect_via[:user]}@#{connect_via[:ip]}"
|
@@ -207,8 +207,7 @@ module SSH
|
|
207
207
|
|
208
208
|
def delete(id)
|
209
209
|
id.each do |conn|
|
210
|
-
conn.to_i
|
211
|
-
DATABASE.delete_connection(conn)
|
210
|
+
DATABASE.delete_connection(conn.to_i)
|
212
211
|
end
|
213
212
|
end
|
214
213
|
|
@@ -224,7 +223,7 @@ module SSH
|
|
224
223
|
|
225
224
|
def update(id)
|
226
225
|
id.each do |con|
|
227
|
-
connection = DATABASE.get_connection_by_id(
|
226
|
+
connection = DATABASE.get_connection_by_id(con.to_i)
|
228
227
|
@input_fields.each do |key|
|
229
228
|
#TODO make this a method
|
230
229
|
connection[key] = %x{source #{File.dirname(__FILE__)}/ask.sh; ask '#{@pretty_names[key]}' '#{connection[key]}'}.chomp
|
data/lib/ssh/manager/client.rb
CHANGED
@@ -114,7 +114,7 @@ module SSH
|
|
114
114
|
@options[:execute] = opt
|
115
115
|
end
|
116
116
|
@options[:ping] = false
|
117
|
-
opts.on( '-p', '--ping
|
117
|
+
opts.on( '-p', '--ping id1, id2, i3', Array, 'test connection of <id>' ) do |opt|
|
118
118
|
@options[:ping] = opt
|
119
119
|
end
|
120
120
|
@options[:delete] = false
|
data/lib/ssh/manager/version.rb
CHANGED