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 18640a2e Fix CLI use; allow for Docker location
18640a2e is described below

commit 18640a2e04821b278968bac18a897a4c13115790
Author: Sebb <[email protected]>
AuthorDate: Mon Jan 8 15:49:20 2024 +0000

    Fix CLI use; allow for Docker location
---
 www/status/monitors/public_json.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/status/monitors/public_json.rb 
b/www/status/monitors/public_json.rb
index 46105a64..30097e20 100644
--- a/www/status/monitors/public_json.rb
+++ b/www/status/monitors/public_json.rb
@@ -50,7 +50,7 @@ def Monitor.public_json(previous_status)
 
       # Ignore Ruby warnings, e.g.:
       # /usr/lib/ruby/2.7.0/net/protocol.rb:66: warning: previous definition 
of ProtocRetryError was here
-      contents.gsub!(%r{^(/usr|/var)\S+\.rb:\d+: warning: .*?\n}, '')
+      contents.gsub!(%r{^(/usr|/var|/srv/gems/)\S+\.rb:\d+: warning: .*?\n}, 
'')
 
       # diff -u output: (may have additional \n at end)
       if contents.gsub!(/^--- .*?\n\n?(\n|\Z)/m, '')
@@ -150,6 +150,7 @@ end
 
 # for debugging purposes; must be run from www/status currently
 if __FILE__ == $0
+  $LOAD_PATH.unshift '/srv/whimsy/lib'
   require_relative 'unit_test'
   runtest('public_json') # must agree with method name above
 end

Reply via email to