This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 861a38dd Oops, needs to be in module
861a38dd is described below

commit 861a38dda9faca5e8e852a86f773f9bfade7e458
Author: Sebb <s...@apache.org>
AuthorDate: Tue Jan 9 23:44:11 2024 +0000

    Oops, needs to be in module
---
 lib/whimsy/asf/status.rb | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/lib/whimsy/asf/status.rb b/lib/whimsy/asf/status.rb
index c70cc5a1..50c2e9e7 100644
--- a/lib/whimsy/asf/status.rb
+++ b/lib/whimsy/asf/status.rb
@@ -57,21 +57,22 @@ module Status
 
     nil
   end
-end
 
-def self.currentIP # intended for CLI testing
-  Resolv::DNS.open do |rs|
-    begin
-      @currentIP ||= rs.getaddress(hostname) # local as IP; should not change 
during a run
-    rescue Resolv::ResolvError => e # allow this to fail on a test node
-      raise unless testnode?
-      $stderr.puts "WARNING: Failed to resolve local IP address: #{e}"
+  def self.currentIP # intended for CLI testing
+    Resolv::DNS.open do |rs|
+      begin
+        @currentIP ||= rs.getaddress(hostname) # local as IP; should not 
change during a run
+      rescue Resolv::ResolvError => e # allow this to fail on a test node
+        raise unless testnode?
+        $stderr.puts "WARNING: Failed to resolve local IP address: #{e}"
+      end
     end
   end
-end
-
-def self.activeIP # intended for CLI testing
-  Resolv::DNS.open.getaddress(ACTIVE_HOSTNAME)
+  
+  def self.activeIP # intended for CLI testing
+    Resolv::DNS.open.getaddress(ACTIVE_HOSTNAME)
+  end
+  
 end
 
 # for debugging purposes

Reply via email to