./lib/le/host/https.rb in le-1.8 vs ./lib/le/host/https.rb in le-1.8.1

- old
+ new

@@ -7,11 +7,10 @@ # Mark Lacomber <marklacomber@gmail.com> # require 'socket' require 'openssl' -require 'logger' require File.join(File.dirname(__FILE__), 'https', 'tcp') module Le module Host @@ -19,23 +18,23 @@ include Le::Host::HelperMethods attr_reader :deliverer, :local_bool def initialize(key, location, local) - @local_bool = local - if not @local_bool - @deliverer = Le::Host::HTTPS::TCPSOCKET.new(key, location) - end + @local_bool = local + if not local + @deliverer = Le::Host::HTTPS::TCPSOCKET.new(key, location) + end end def write(message) - - if @local_bool + + if @local_bool puts message - else - # Deliver the message to logentries via TCP if not testing locally - @deliverer.deliver(message) - end + else + # Deliver the message to logentries via TCP + @deliverer.deliver(message) + end end def close nil end