whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] 03/03: Scan all cgi|rb for ASF::SVN use
Date Mon, 06 May 2019 14:04:56 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit f12a00c82ee50a2e396ede8a28058af7af7cd8c7
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Mon May 6 10:04:44 2019 -0400

    Scan all cgi|rb for ASF::SVN use
---
 www/members/repo-use.cgi | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/www/members/repo-use.cgi b/www/members/repo-use.cgi
new file mode 100755
index 0000000..8dd792d
--- /dev/null
+++ b/www/members/repo-use.cgi
@@ -0,0 +1,64 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Scripts that use ASF::SVN" # Wvisible:tools
+$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'whimsy/asf'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+require '../../tools/wwwdocs.rb'
+
+_html do
+  _body? do
+    _whimsy_body(
+      title: PAGETITLE,
+      subtitle: 'Scan all scripts for SVN access',
+      relatedtitle: 'More Useful Links',
+      related: {
+        '/members/log' => 'Full server error and access logs',
+        '/docs' => 'Whimsy code and API documentation',
+        '/status' => 'Whimsy production server status',
+        "https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => 'See
This Source Code'
+      },
+      helpblock: -> {
+        _p 'This scans the whimsy repo for uses of ASF::SVN, either public or private repos.'
+      }
+    ) do
+      priv, pub = read_repository(File.expand_path('../../../repository.yml', __FILE__))
+      priv = build_regexp(priv)
+      pub = build_regexp(pub)
+      scan = scan_dir_svn('../../', [priv, pub])
+      _whimsy_panel_table(title: 'Repo use by script') do
+        _table.table.table_hover do
+          _thead_ do
+            _tr do
+              _th 'Private repos used'
+              _th 'Public repos used'
+            end
+            scan.each do |file, (privlines, publines)|
+              _tbody do
+                _tr_ do
+                  _td :colspan => '2' do
+                    _code file
+                  end
+                end
+                _tr do
+                  _td do
+                    privlines.each do |l|
+                      _ l
+                      _br
+                    end
+                  end
+                  _td do
+                    publines.each do |l|
+                      _ l
+                      _br
+                    end
+                  end
+                end
+              end
+            end
+          end
+        end
+      end
+    end
+  end
+end
\ No newline at end of file


Mime
View raw message