whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Drop unused code
Date Thu, 04 May 2017 09:21:52 GMT
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  b1cde1b   Drop unused code
b1cde1b is described below

commit b1cde1bc38d156814005fb3c91bab9ae2975a32d
Author: Sebb <sebb@apache.org>
AuthorDate: Thu May 4 10:21:51 2017 +0100

    Drop unused code
---
 www/test/apachecon.cgi   |  57 ---------------------
 www/test/conferences.cgi | 112 ----------------------------------------
 www/test/trademark.cgi   | 129 -----------------------------------------------
 3 files changed, 298 deletions(-)

diff --git a/www/test/apachecon.cgi b/www/test/apachecon.cgi
index 833d1f6..9bc2e6f 100755
--- a/www/test/apachecon.cgi
+++ b/www/test/apachecon.cgi
@@ -4,60 +4,3 @@ print "Status: 301 Moved Permanently\r\n"
 print "Location: ../events/past\r\n"
 print "\r\n"
 exit
-
-$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
-require 'csv'
-require 'json'
-require 'whimsy/asf'
-require 'wunderbar'
-require 'wunderbar/bootstrap'
-
-PAGETITLE = 'ApacheCon Historical Listing - DEPRECATED'
-ifields = {
-  'SessionList'	=> 'glyphicon_th_list',
-  'SlideArchive' => 'glyphicon_file',
-  'VideoArchive' => 'glyphicon_facetime_video',
-  'AudioArchive' => 'glyphicon_headphones',
-  'PhotoAlbum' => 'glyphicon_camera'
-}
-
-_html do
-  _body? do
-    _whimsy_header PAGETITLE
-    ac_dir = ASF::SVN['private/foundation/ApacheCon']
-    history = File.read("#{ac_dir}/apacheconhistory.csv")
-    history.sub! "\uFEFF", '' # remove Zero Width No-Break Space
-    csv = CSV.parse(history, headers:true)
-    _whimsy_content do
-      _p do 
-        _ 'THIS PAGE IS DEPRECATED - please see '
-        _a '/events/past', href: 'https://whimsy.apache.org/events/past'
-        _ 'instead. Past ApacheCons include:'
-      end
-      _ul do
-        csv.each do |r|
-          _li do
-            _span.text_primary do
-              _a r['Name'], href: r['Link']
-            end
-            _ ", held in #{r['Location']}. "
-            _br
-            ifields.each do |fn, g|
-              if r[fn] then
-                _a! href: r[fn] do
-                  _span!.glyphicon class: "#{g}"
-                  _! ' ' + fn
-                end       
-              end
-            end
-          end
-        end        
-      end
-    end
-    
-    _whimsy_footer({
-      "https://www.apache.org/foundation/marks/resources" => "Trademark Site Map",
-      "https://www.apache.org/foundation/marks/list/" => "Official Apache Trademark List"
-      })
-  end
-end
diff --git a/www/test/conferences.cgi b/www/test/conferences.cgi
index a214c83..e830b42 100755
--- a/www/test/conferences.cgi
+++ b/www/test/conferences.cgi
@@ -3,115 +3,3 @@ print "Status: 301 Moved Permanently\r\n"
 print "Location: ../events/other\r\n"
 print "\r\n"
 exit
-
-$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
-require 'json'
-require 'net/http'
-require 'wunderbar'
-require 'wunderbar/bootstrap'
-require 'wunderbar/jquery/stupidtable'
-require 'whimsy/asf/themes'
-require 'date'
-
-PAGETITLE = 'FOSS Conference Listings - DEPRECATED'
-
-_html do
-  _body? do
-    _whimsy_header PAGETITLE
-    
-    conflist = JSON.parse(Net::HTTP.get(URI('https://raw.githubusercontent.com/afilina/dev-community-data/master/data/conferences.json')))
-    _whimsy_content do
-      _p do 
-        _ 'THIS PAGE IS DEPRECATED - please see '
-        _a '/events/other', href: 'https://whimsy.apache.org/events/other'
-        _ 'instead!'
-      end
-      _div.row do
-        _div.col_sm_10 do
-          _div.panel.panel_primary do
-            _div.panel_heading {_h3.panel_title 'FOSS Conference Listings'}
-            _div.panel_body do
-              _ 'Listing various self-reported FOSS Conferences and their claimed speaker
support status.  Data from '
-              _a_ 'afilina/dev-community-data', href: 'https://github.com/afilina/dev-community-data/'
-              _ ', calendar website at '
-              _a_ 'ConFoo Community', href: 'https://community.confoo.ca/'
-              _ '.  Click to sort table.  "False" propercase entries are when conference
doesn\'t report any speaker reimbursement details.' 
-            end
-          end
-        end
-      end
-      _div.row do
-      _table.table.table_hover do
-        _thead_ do
-          _tr do
-            _th 'Conference', data_sort: 'string'
-            _th 'Speaker Pass', data_sort: 'string'
-            _th 'Speaker Hotel', data_sort: 'string'
-            _th 'Speaker Travel', data_sort: 'string'
-            _th 'Last Event', data_sort: 'string'
-            _th 'Twitter'
-          end
-        end
-        _tbody do
-          conflist.each do | conf |
-            _tr_ do
-              _td do 
-                _a conf['name'], href: conf['website']
-              end
-              if conf['speaker_kit'] then
-                _td conf['speaker_kit']['ticket_included']
-                _td conf['speaker_kit']['hotel_included']
-                _td conf['speaker_kit']['travel_included']              
-              else
-                _td 'False'
-                _td 'False'
-                _td 'False'
-              end
-              if conf['events'] then
-                laste = conf['events'].max_by {|e| Date.parse(e['event_end'])}
-                _td laste['event_end']
-              else
-                _td conf['last_event']
-              end
-              _td do 
-                _a conf['twitter'], href: conf['twitter']
-              end
-            end
-          end
-        end
-      end
-    end
-    counts = %w(ticket_included hotel_included travel_included).map do |field|
-    matches = conflist.select do |conf|
-        conf['speaker_kit'] && conf['speaker_kit'][field]
-      end
-
-      [field, matches.count]
-    end
-    counts = counts.to_h
-    _p.count do 
-      _b "Out of total: #{conflist.count} conferences"
-      _ ", number that cover:"
-      counts.each do |s, v|
-        _ "#{s}: #{v}"
-      end
-    end
-    
-    _script %{
-      var table = $(".table").stupidtable();
-      table.on("aftertablesort", function (event, data) {
-        var th = $(this).find("th");
-        th.find(".arrow").remove();
-        var dir = $.fn.stupidtable.dir;
-        var arrow = data.direction === dir.ASC ? "&uarr;" : "&darr;";
-        th.eq(data.column).append('<span class="arrow">' + arrow +'</span>');
-        });
-      }
-    _whimsy_footer({
-      "https://github.com/afilina/dev-community-data" => "FOSS conference listing",
-      "https://www.apache.org/foundation/marks/resources" => "Trademark Site Map",
-      "https://www.apache.org/foundation/marks/list/" => "Official Apache Trademark List"
-      })
-    end
-  end
-end
\ No newline at end of file
diff --git a/www/test/trademark.cgi b/www/test/trademark.cgi
index e5e29b4..45e421c 100755
--- a/www/test/trademark.cgi
+++ b/www/test/trademark.cgi
@@ -3,132 +3,3 @@ print "Status: 301 Moved Permanently\r\n"
 print "Location: ../brand/list\r\n"
 print "\r\n"
 exit
-
-# Wvisible:deprecated,brand Listing of trademarks-old
-$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
-require 'csv'
-require 'json'
-require 'whimsy/asf'
-require 'wunderbar'
-require 'wunderbar/bootstrap'
-require 'net/http'
-
-PAGETITLE = 'Listing of Apache Trademarks - DEPRECATED'
-COUNTRY = 'CountryName' # Fieldnames from counsel provided docket
-STAT = 'TrademarkStatus'
-CLASS = 'Class'
-REG = 'RegNumber'
-
-def _unreg(name, url, desc, parent, n)
-  _div.panel.panel_default do
-    _div.panel_heading role: "tab", id: "urh#{n}" do
-      _h4.panel_title do
-        _a role: "button", data_toggle: "collapse",  aria_expanded: "true", data_parent:
"##{parent}", href: "#urc#{n}", aria_controls: "#urc#{n}" do
-          _ name
-          _{"&trade; software"}
-        end
-      end
-    end
-    _div.panel_collapse.collapse.in id: "#urc#{n}", role: "tabpanel", aria_labelledby: "urh#{n}"
do
-      _div.panel_body do
-        _a href: url do
-          _ name
-        end
-        _ ': '
-        _ desc
-      end
-    end
-  end
-end
-
-def _marks(marks)
-  marks.each do |mark, items|
-    _ul.list_group do
-      _li!.list_group_item.active do
-        _{"#{mark} &reg;"}
-      end
-      items.each do |itm|
-        if itm[STAT] == 'Registered' then
-          if itm[COUNTRY] == 'United States of America' then
-            _li.list_group_item do
-              _a "In the #{itm[COUNTRY]}, class #{itm[CLASS]}, reg # #{itm[REG]}", href:
'usptolink'
-            end
-          else
-            _li.list_group_item "In #{itm[COUNTRY]}, class #{itm[CLASS]}, reg # #{itm[REG]}",
href: 'usptolink'
-          end
-        end
-      end
-    end
-  end
-end
-
-def _project(name, url, marks)
-  _div.panel.panel_primary do
-    _div.panel_heading do 
-      _h3!.panel_title do 
-        _a! name, href: url
-        _{"&reg; software"}
-      end
-    end
-    _div.panel_body do
-      _{"The ASF owns the following registered trademarks for our #{name}&reg; software:"}
-    end
-    _marks marks
-  end
-end
-
-def _apache(marks)
-  _div.panel.panel_primary do
-    _div.panel_heading do 
-      _h3.panel_title do 
-        _{"Our APACHE&reg; trademarks"}
-      end
-    end
-    _div!.panel_body do
-      _{"Our APACHE&reg; trademark represents our house brand of consensus-driven, community
built software for the public good."}
-    end
-    _marks marks
-  end
-end
-
-_html do
-  _body? do
-    _whimsy_header PAGETITLE
-    brand_dir = ASF::SVN['private/foundation/Brand']
-    docket = JSON.parse(File.read("#{brand_dir}/docket.json"))
-    projects = JSON.parse(Net::HTTP.get(URI('https://projects.apache.org/json/foundation/projects.json')))
-
-    _whimsy_content do 
-      _h3 'The ASF holds the following registered trademarks:'
-      _h3 do
-        _ 'THIS PAGE IS DEPRECATED, please '
-        _a 'see the new /brand/list page instead', href: 'https://whimsy.apache.org/brand/list'
-      end
-      docket.each do |pmc, marks|
-        if pmc == 'apache' then
-          _apache(marks)
-        elsif projects[pmc] then
-          _project projects[pmc]['name'], projects[pmc]['homepage'], marks
-        else
-          _.comment! '# TODO map all pmc names to projects or podlings'
-          _project 'Apache ' + pmc.capitalize, 'https://' + pmc + '.apache.org', marks
-        end
-      end
-      
-      _h3 'The ASF holds the following unregistered trademarks:'
-      parent = "unreg_a" # TODO: split up by letter
-      _div.panel_group id: parent, role: "tablist", aria_multiselectable: "true" do
-        projects.each_with_index do |(pnam, proj), num|
-          unless docket[pnam] then
-            _unreg(proj['name'], proj['homepage'], proj['description'], parent, num)
-          end
-        end
-      end
-    end
-
-    _whimsy_footer({
-      "https://www.apache.org/foundation/marks/resources" => "Trademark Site Map",
-      "https://www.apache.org/foundation/marks/list/" => "Official Apache Trademark List"
-      })
-  end
-end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message