whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 02/02: update secretary workbench to latest react.js, rack, etc.
Date Thu, 18 May 2017 18:39:48 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 1a59e73f2a1667f39fc25111def7ff4b55e60815
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu May 18 14:39:25 2017 -0400

    update secretary workbench to latest react.js, rack, etc.
---
 www/assets/react-min.js                              | 13 +++++++++++++
 www/secretary/workbench/Gemfile                      |  4 ++--
 www/secretary/workbench/config.ru                    |  2 ++
 .../workbench/public/assets/bootstrap-min.css        |  6 ------
 .../workbench/public/assets/bootstrap-min.js         |  7 -------
 www/secretary/workbench/public/assets/jquery-min.js  |  4 ----
 www/secretary/workbench/public/assets/react-min.js   | 16 ----------------
 www/secretary/workbench/server.rb                    | 20 ++++++++++----------
 8 files changed, 27 insertions(+), 45 deletions(-)

diff --git a/www/assets/react-min.js b/www/assets/react-min.js
new file mode 100644
index 0000000..c00a1ed
--- /dev/null
+++ b/www/assets/react-min.js
@@ -0,0 +1,13 @@
+/**
+ * React (with addons) v15.5.4
+ *
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else
if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof
window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return
function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return
u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.cod [...]
+;t.exports=function(e){return r(e,!1)}},{48:48}],48:[function(e,t,n){"use strict";var r=e(40),o=e(42),i=(e(44),e(49)),a=e(46);t.exports=function(e,t){function
n(e){var t=e&&(w&&e[w]||e[A]);if("function"==typeof t)return t}function s(e,t){return
e===t?0!==e||1/e==1/t:e!==e&&t!==t}function u(e){this.message=e,this.stack=""}function
c(e){function n(n,r,a,s,c,p,l){if(s=s||T,p=p||a,l!==i)if(t)o(!1,"Calling PropTypes validators
directly is not supported by the `prop-types` package. Use `PropTy [...]
\ No newline at end of file
diff --git a/www/secretary/workbench/Gemfile b/www/secretary/workbench/Gemfile
index 194dd04..4fbc7d6 100644
--- a/www/secretary/workbench/Gemfile
+++ b/www/secretary/workbench/Gemfile
@@ -14,9 +14,9 @@ end
 gem 'mail'
 gem 'rake'
 gem 'zip'
-gem 'sinatra', '~> 1.4'
+gem 'sinatra', '~> 2.0'
 gem 'sanitize'
-gem 'wunderbar', '~> 1.0.27'
+gem 'wunderbar', '~> 1.1.0'
 gem 'ruby2js', '~> 2.0.12'
 gem 'execjs'
 gem 'listen', ('~> 3.0.7' if RUBY_VERSION =~ /^2\.[01]/)
diff --git a/www/secretary/workbench/config.ru b/www/secretary/workbench/config.ru
index 0a8f5e0..c3157de 100644
--- a/www/secretary/workbench/config.ru
+++ b/www/secretary/workbench/config.ru
@@ -6,4 +6,6 @@ use ASF::HTTPS_workarounds
 use ASF::Auth::MembersAndOfficers
 use ASF::AutoGC
 
+use ASF::DocumentRoot
+
 run Sinatra::Application
diff --git a/www/secretary/workbench/public/assets/bootstrap-min.css b/www/secretary/workbench/public/assets/bootstrap-min.css
deleted file mode 100644
index 4cf729e..0000000
--- a/www/secretary/workbench/public/assets/bootstrap-min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.3.6 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr
[...]
-/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/www/secretary/workbench/public/assets/bootstrap-min.js b/www/secretary/workbench/public/assets/bootstrap-min.js
deleted file mode 100644
index e79c065..0000000
--- a/www/secretary/workbench/public/assets/bootstrap-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.6 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under the MIT license
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use
strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw
new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than
version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"
[...]
-d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var
d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return
a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var
b=a(this);c.call(b,b.data()) [...]
\ No newline at end of file
diff --git a/www/secretary/workbench/public/assets/jquery-min.js b/www/secretary/workbench/public/assets/jquery-min.js
deleted file mode 100644
index e6a051d..0000000
--- a/www/secretary/workbench/public/assets/jquery-min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw
new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof
window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return
new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b
[...]
-return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void
0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof
b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void
0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}fu
[...]
-}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var
a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var
b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(
[...]
diff --git a/www/secretary/workbench/public/assets/react-min.js b/www/secretary/workbench/public/assets/react-min.js
deleted file mode 100644
index 5658bf5..0000000
--- a/www/secretary/workbench/public/assets/react-min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * React (with addons) v0.14.6
- *
- * Copyright 2013-2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else
if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof
window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return
function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!u&&s)return
s(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.cod [...]
-topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOve
[...]
-56:56}],44:[function(e,t,n){"use strict";var r={useCreateElement:!1};t.exports=r},{}],45:[function(e,t,n){"use
strict";var r=e(9),o=e(11),a=e(70),i=e(76),u=e(158),s={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML`
must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(e,t,n){var
r=a.getNode(e);s.hasOwnProperty(t)?u(!1):void 0,null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},dangerouslyRepla
[...]
-t.exports=r},{}],79:[function(e,t,n){"use strict";var r=e(162),o=r({prop:null,context:null,childContext:null});t.exports=o},{162:162}],80:[function(e,t,n){"use
strict";function r(e){function t(t,n,r,o,a,i){if(o=o||_,i=i||r,null==n[r]){var u=C[a];return
t?new Error("Required "+u+" `"+i+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,a,i)}var
n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,a){var
i=t[n],u=v(i);if(u!==e){var s=C[o],l=m(i) [...]
-},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+a.currentScrollTop}};o.augmentClass(r,u),t.exports=r},{108:108,111:111,124:124}],107:[function(e,t,n){"use
strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(108),a=e(124),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};o.augmentClass(r,i),t.exports=r},{108:108,124:124}],108:[function(e,t,n){"use
strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var  [...]
\ No newline at end of file
diff --git a/www/secretary/workbench/server.rb b/www/secretary/workbench/server.rb
index f942c4e..2775a64 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -43,13 +43,13 @@ get '/index.html' do
 end
 
 # support for fetching previous month's worth of messages
-get %r{^/(\d{6})$} do |mbox|
+get %r{/(\d{6})} do |mbox|
   @mbox = mbox
   _json :index
 end
 
 # retrieve a single message
-get %r{^/(\d{6})/(\w+)/$} do |month, hash|
+get %r{/(\d{6})/(\w+)/} do |month, hash|
   @message = Mailbox.new(month).headers[hash]
   pass unless @message
   _html :message
@@ -74,7 +74,7 @@ post '/actions/:file' do
 end
 
 # mark a single message as deleted
-delete %r{^/(\d+)/(\w+)/$} do |month, hash|
+delete %r{/(\d+)/(\w+)/} do |month, hash|
   success = false
 
   Mailbox.update(month) do |headers|
@@ -89,7 +89,7 @@ delete %r{^/(\d+)/(\w+)/$} do |month, hash|
 end
 
 # update a single message
-patch %r{^/(\d{6})/(\w+)/$} do |month, hash|
+patch %r{/(\d{6})/(\w+)/} do |month, hash|
   success = false
 
   Mailbox.update(month) do |headers|
@@ -113,7 +113,7 @@ patch %r{^/(\d{6})/(\w+)/$} do |month, hash|
 end
 
 # list of parts for a single message
-get %r{^/(\d{6})/(\w+)/_index_$} do |month, hash|
+get %r{/(\d{6})/(\w+)/_index_} do |month, hash|
   message = Mailbox.new(month).find(hash)
   pass unless message
   @attachments = message.attachments
@@ -124,7 +124,7 @@ get %r{^/(\d{6})/(\w+)/_index_$} do |month, hash|
 end
 
 # message body for a single message
-get %r{^/(\d{6})/(\w+)/_body_$} do |month, hash|
+get %r{/(\d{6})/(\w+)/_body_} do |month, hash|
   @message = Mailbox.new(month).find(hash)
   @cssmtime = File.mtime('public/secmail.css').to_i
   pass unless @message
@@ -132,21 +132,21 @@ get %r{^/(\d{6})/(\w+)/_body_$} do |month, hash|
 end
 
 # header data for a single message
-get %r{^/(\d{6})/(\w+)/_headers_$} do |month, hash|
+get %r{/(\d{6})/(\w+)/_headers_} do |month, hash|
   @headers = Mailbox.new(month).headers[hash]
   pass unless @headers
   _html :headers
 end
 
 # raw data for a single message
-get %r{^/(\d{6})/(\w+)/_raw_$} do |month, hash|
+get %r{/(\d{6})/(\w+)/_raw_} do |month, hash|
   message = Mailbox.new(month).find(hash)
   pass unless message
   [200, {'Content-Type' => 'text/plain'}, message.raw]
 end
 
 # intercede for potentially dangerous message attachments
-get %r{^/(\d{6})/(\w+)/_danger_/(.*?)$} do |month, hash, name|
+get %r{/(\d{6})/(\w+)/_danger_/(.*?)} do |month, hash, name|
   message = Mailbox.new(month).find(hash)
   pass unless message
 
@@ -157,7 +157,7 @@ get %r{^/(\d{6})/(\w+)/_danger_/(.*?)$} do |month, hash, name|
 end
 
 # a specific attachment for a message
-get %r{^/(\d{6})/(\w+)/(.*?)$} do |month, hash, name|
+get %r{/(\d{6})/(\w+)/(.*?)} do |month, hash, name|
   message = Mailbox.new(month).find(hash)
   pass unless message
 

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

Mime
View raw message