ztk 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,7 +24,7 @@ Documentation:
24
24
 
25
25
  ZTK - Zachary's (DevOp) Tool Kit
26
26
 
27
- * Author: Zachary Patten <zachary@jovelabs.net>
27
+ * Author: Zachary Patten <zachary@jovelabs.com> [![endorse](http://api.coderwall.com/zpatten/endorsecount.png)](http://coderwall.com/zpatten)
28
28
  * Copyright: Copyright (c) Zachary Patten
29
29
  * License: Apache License, Version 2.0
30
30
 
data/lib/ztk/command.rb CHANGED
@@ -179,7 +179,7 @@ module ZTK
179
179
  # Returns a string in the format of "user@hostname" for the current
180
180
  # shell.
181
181
  def tag
182
- @hostname ||= %x(hostname -f).chomp
182
+ @@hostname ||= %x(hostname).chomp
183
183
  "#{ENV['USER']}@#{@hostname}"
184
184
  end
185
185
 
data/lib/ztk/ssh.rb CHANGED
@@ -181,6 +181,7 @@ module ZTK
181
181
  config.ui.logger.debug { "config=#{config.send(:table).inspect}" }
182
182
  config.ui.logger.info { "console(#{console_command.inspect})" }
183
183
 
184
+ config.ui.logger.fatal { "REPLACING CURRENT PROCESS - GOODBYE!" }
184
185
  Kernel.exec(console_command)
185
186
  end
186
187
 
@@ -389,18 +390,21 @@ module ZTK
389
390
 
390
391
  # Builds our SSH console command.
391
392
  def console_command
392
- command = [ "ssh" ]
393
+ command = [ "/usr/bin/env ssh" ]
393
394
  command << [ "-q" ]
394
- command << [ "-A" ]
395
+ command << [ "-4" ]
396
+ command << [ "-x" ]
397
+ command << [ "-a" ]
395
398
  command << [ "-o", "UserKnownHostsFile=/dev/null" ]
396
399
  command << [ "-o", "StrictHostKeyChecking=no" ]
397
400
  command << [ "-o", "KeepAlive=yes" ]
398
401
  command << [ "-o", "ServerAliveInterval=60" ]
402
+ command << [ "-o", %(ProxyCommand="#{proxy_command}") ] if config.proxy_host_name
399
403
  command << [ "-i", config.keys ] if config.keys
400
404
  command << [ "-p", config.port ] if config.port
401
- command << [ "-o", %(ProxyCommand="#{proxy_command}") ] if config.proxy_host_name
405
+ # command << [ "-vv" ]
402
406
  command << "#{config.user}@#{config.host_name}"
403
- command = command.flatten.compact.join(" ")
407
+ command = command.flatten.compact.join(' ')
404
408
  config.ui.logger.debug { "console_command(#{command.inspect})" }
405
409
  command
406
410
  end
@@ -410,18 +414,21 @@ module ZTK
410
414
  !config.proxy_user and log_and_raise(SSHError, "You must specify an proxy user in order to SSH proxy.")
411
415
  !config.proxy_host_name and log_and_raise(SSHError, "You must specify an proxy host_name in order to SSH proxy.")
412
416
 
413
- command = ["ssh"]
417
+ command = ["/usr/bin/env ssh"]
414
418
  command << [ "-q" ]
415
- command << [ "-A" ]
419
+ command << [ "-4" ]
420
+ command << [ "-x" ]
421
+ command << [ "-a" ]
416
422
  command << [ "-o", "UserKnownHostsFile=/dev/null" ]
417
423
  command << [ "-o", "StrictHostKeyChecking=no" ]
418
424
  command << [ "-o", "KeepAlive=yes" ]
419
425
  command << [ "-o", "ServerAliveInterval=60" ]
420
426
  command << [ "-i", config.proxy_keys ] if config.proxy_keys
421
427
  command << [ "-p", config.proxy_port ] if config.proxy_port
428
+ # command << [ "-vv" ]
422
429
  command << "#{config.proxy_user}@#{config.proxy_host_name}"
423
- command << "nc %h %p"
424
- command = command.flatten.compact.join(" ")
430
+ command << "'/usr/bin/env nc %h %p'"
431
+ command = command.flatten.compact.join(' ')
425
432
  config.ui.logger.debug { "proxy_command(#{command.inspect})" }
426
433
  command
427
434
  end
data/lib/ztk/version.rb CHANGED
@@ -21,6 +21,6 @@
21
21
  module ZTK
22
22
 
23
23
  # ZTK Version String
24
- VERSION = "1.0.8"
24
+ VERSION = "1.0.9"
25
25
 
26
26
  end
data/ztk.gemspec CHANGED
@@ -24,7 +24,7 @@ require 'ztk/version'
24
24
 
25
25
  Gem::Specification.new do |gem|
26
26
  gem.authors = ["Zachary Patten"]
27
- gem.email = ["zachary@jovelabs.net"]
27
+ gem.email = ["zachary@jovelabs.com"]
28
28
  gem.description = %q{Zachary's (DevOp) Tool Kit}
29
29
  gem.summary = %q{Contains various classes and utilities I find I regularly need.}
30
30
  gem.homepage = "https://github.com/zpatten/ztk"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ztk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-31 00:00:00.000000000 Z
12
+ date: 2013-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erubis
@@ -173,7 +173,7 @@ dependencies:
173
173
  version: '0'
174
174
  description: Zachary's (DevOp) Tool Kit
175
175
  email:
176
- - zachary@jovelabs.net
176
+ - zachary@jovelabs.com
177
177
  executables:
178
178
  - ztk
179
179
  extensions: []
@@ -250,7 +250,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
250
  version: '0'
251
251
  segments:
252
252
  - 0
253
- hash: -656321979388275144
253
+ hash: -955411107059050686
254
254
  required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  none: false
256
256
  requirements:
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  version: '0'
260
260
  segments:
261
261
  - 0
262
- hash: -656321979388275144
262
+ hash: -955411107059050686
263
263
  requirements: []
264
264
  rubyforge_project:
265
265
  rubygems_version: 1.8.24