<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,7 +13,7 @@ end
 Given /^Testjour is configured to run on this machine in a (\w+) directory$/ do |dir_name|
   @args ||= []
   full_path = File.expand_path(&quot;./tmp/#{dir_name}&quot;)
-  @args &lt;&lt; &quot;--on=testjour://#{`hostname`.chomp}#{full_path}&quot;
+  @args &lt;&lt; &quot;--on=testjour://#{Socket.gethostname}#{full_path}&quot;
   
   FileUtils.rm_rf full_path
   FileUtils.mkdir_p full_path</diff>
      <filename>features/step_definitions/testjour_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,20 +28,24 @@ end
 
 module Testjour
   VERSION = &quot;0.3.1&quot;
-  
+
+  def self.socket_hostname
+    @socket_hostname ||= Socket.gethostname
+  end
+
   def self.logger
     return @logger if @logger
     setup_logger
     @logger
   end
-  
+
   def self.setup_logger(dir = &quot;./&quot;)
     @logger = Logger.new(File.expand_path(File.join(dir, &quot;testjour.log&quot;)))
-    
+
     @logger.formatter = proc do |severity, time, progname, msg|
       &quot;#{time.strftime(&quot;%b %d %H:%M:%S&quot;)} [#{$PID}]: #{msg}\n&quot;
     end
-    
+
     @logger.level = Logger::DEBUG
   end
 end
\ No newline at end of file</diff>
      <filename>lib/testjour.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,7 +119,7 @@ module Commands
 
     def testjour_uri
       user = `whoami`.strip
-      host = Socket.gethostname
+      host = Testjour.socket_hostname
       &quot;http://#{user}@#{host}&quot; + File.expand_path(&quot;.&quot;)
     end
 </diff>
      <filename>lib/testjour/commands/run.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,9 +31,9 @@ module Testjour
     def rsync_uri
       full_uri.user + &quot;@&quot; + full_uri.host + &quot;:&quot; + full_uri.path
     end
-    
+
     def queue_host
-      @queue_host || `hostname`.chomp
+      @queue_host || Testjour.socket_hostname
     end
 
     def remote_slaves</diff>
      <filename>lib/testjour/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ module Testjour
       end
 
       @pid        = $PID
-      @hostname   = Socket.gethostname
+      @hostname   = Testjour.socket_hostname
     end
 
     def server_id</diff>
      <filename>lib/testjour/result.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>911fbd01228bf1e1d182c95fc34329c3d923c5c5</id>
    </parent>
  </parents>
  <author>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </author>
  <url>http://github.com/brynary/testjour/commit/8f4e9a82b3d424bde69422d9d1f0cf7064563af1</url>
  <id>8f4e9a82b3d424bde69422d9d1f0cf7064563af1</id>
  <committed-date>2009-10-22T15:01:43-07:00</committed-date>
  <authored-date>2009-10-22T15:01:43-07:00</authored-date>
  <message>Use Socket.gethostname instead of `hostname`, and memoize the results globally on the Testjour constant</message>
  <tree>4c543e3c7ca5daf9fdd4a2a5ffcea39ef2eafe34</tree>
  <committer>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </committer>
</commit>
