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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29eb7874e5f26cfea91c9129a5aef26d16fb0f22
4
- data.tar.gz: e4e1ea5ca0a1f7edbdca874f1dd59cca6cb63481
3
+ metadata.gz: 57446a2656dfec20efcfd79080f720344cf62bd9
4
+ data.tar.gz: 789b334d476700cf9ffdd8e145b0330afacf7a43
5
5
  SHA512:
6
- metadata.gz: b35f6d69e82fe099536cc4f8f7205743ae9921eaa8f216a2bac727517ccbc890461f6cfbb55c99f7fba97c0241327725596201ac3136df48997ab6f5ac3d2e2d
7
- data.tar.gz: 9e065e41d8dd4fd8c019d541364db4209bbcd4808fce90faa75bfa9ca9880db21d965dd8e509012f88016f68ff22b05429dbcf0fe750bdcede9ad49e5c8aafc8
6
+ metadata.gz: df48f146b2f7fddf319df69be378c028e09b79b207375e97f1a0cc269d283bc90348f2fdd5ce0d099c117f0c8dd8facc4515002c99b50344f7c6d5073a9d0f81
7
+ data.tar.gz: c92c2b88b207dfe07f9a6958fa36882aa65515b46e582bd62958c600e5ecc37490202b512d181257aefd71e10a1095c82736cc9e876f8616b8789d78eaf513c4
@@ -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(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
@@ -114,7 +114,7 @@ module SSH
114
114
  @options[:execute] = opt
115
115
  end
116
116
  @options[:ping] = false
117
- opts.on( '-p', '--ping id', 'test connection of <id>' ) do |opt|
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
@@ -1,5 +1,5 @@
1
1
  module SSH
2
2
  module Manager
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssh-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Schmid