bin/gt in gaptool-client-0.7.9 vs bin/gt in gaptool-client-0.8.0.pre.alpha
- old
+ new
@@ -1,25 +1,17 @@
#!/usr/bin/env ruby
require 'rubygems'
-require 'gaptool-api'
-# Make sure lang isn't fucked
-ENV['LANG'] = "en_US.UTF-8"
+ENV['LANG'] ||= 'en_US.UTF-8'
-# Nuke your ssh-agent
-ENV['SSH_AUTH_SOCK'] = ''
+OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE \
+ unless ENV['GT_SSL_VERIFY_NONE'].nil?
-OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE unless ENV['GT_SSL_VERIFY_NONE'].nil?
-
# Make API accessable to client
%w(GT_USER GT_KEY GT_URL).each do |k|
- if ENV[k].nil?
- abort("Missing environment variable #{k}")
- end
+ abort("Missing environment variable #{k}") if ENV[k].nil?
end
-$api = GTAPI::GaptoolServer.new(ENV['GT_USER'], ENV['GT_KEY'], ENV['GT_URL'], ENV['GT_AWS_ZONE'])
# Run client
-require File.expand_path(File.dirname(__FILE__) + "/../lib/gaptool-client.rb")
-
-
+require File.realpath(File.join(File.dirname(__FILE__),
+ '..', 'lib', 'gaptool_client.rb'))