logster 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/lib/logster/version.rb +1 -1
  3. data/logster.gemspec +1 -1
  4. metadata +1 -216
  5. data/bower_components/ember/.bower.json +0 -22
  6. data/bower_components/ember/.gitignore +0 -5
  7. data/bower_components/ember/Makefile +0 -9
  8. data/bower_components/ember/README.md +0 -12
  9. data/bower_components/ember/bower.json +0 -11
  10. data/bower_components/ember/component.json +0 -13
  11. data/bower_components/ember/composer.json +0 -27
  12. data/bower_components/ember/ember-template-compiler.js +0 -320
  13. data/bower_components/ember/ember.js +0 -44267
  14. data/bower_components/ember/ember.min.js +0 -19
  15. data/bower_components/ember/ember.prod.js +0 -42649
  16. data/bower_components/ember/package.json +0 -11
  17. data/bower_components/handlebars/.bower.json +0 -16
  18. data/bower_components/handlebars/.gitignore +0 -2
  19. data/bower_components/handlebars/README.md +0 -11
  20. data/bower_components/handlebars/bower.json +0 -6
  21. data/bower_components/handlebars/component.json +0 -9
  22. data/bower_components/handlebars/composer.json +0 -35
  23. data/bower_components/handlebars/handlebars-source.gemspec +0 -21
  24. data/bower_components/handlebars/handlebars.amd.js +0 -2719
  25. data/bower_components/handlebars/handlebars.amd.min.js +0 -28
  26. data/bower_components/handlebars/handlebars.js +0 -2746
  27. data/bower_components/handlebars/handlebars.js.nuspec +0 -17
  28. data/bower_components/handlebars/handlebars.min.js +0 -28
  29. data/bower_components/handlebars/handlebars.runtime.amd.js +0 -515
  30. data/bower_components/handlebars/handlebars.runtime.amd.min.js +0 -27
  31. data/bower_components/handlebars/handlebars.runtime.js +0 -530
  32. data/bower_components/handlebars/handlebars.runtime.min.js +0 -27
  33. data/bower_components/handlebars/lib/handlebars/source.rb +0 -11
  34. data/bower_components/jquery/.bower.json +0 -37
  35. data/bower_components/jquery/MIT-LICENSE.txt +0 -21
  36. data/bower_components/jquery/bower.json +0 -27
  37. data/bower_components/jquery/dist/jquery.js +0 -9111
  38. data/bower_components/jquery/dist/jquery.min.js +0 -5
  39. data/bower_components/jquery/dist/jquery.min.map +0 -1
  40. data/bower_components/jquery/src/ajax.js +0 -806
  41. data/bower_components/jquery/src/ajax/jsonp.js +0 -89
  42. data/bower_components/jquery/src/ajax/load.js +0 -75
  43. data/bower_components/jquery/src/ajax/parseJSON.js +0 -13
  44. data/bower_components/jquery/src/ajax/parseXML.js +0 -28
  45. data/bower_components/jquery/src/ajax/script.js +0 -64
  46. data/bower_components/jquery/src/ajax/var/nonce.js +0 -5
  47. data/bower_components/jquery/src/ajax/var/rquery.js +0 -3
  48. data/bower_components/jquery/src/ajax/xhr.js +0 -130
  49. data/bower_components/jquery/src/attributes.js +0 -11
  50. data/bower_components/jquery/src/attributes/attr.js +0 -143
  51. data/bower_components/jquery/src/attributes/classes.js +0 -158
  52. data/bower_components/jquery/src/attributes/prop.js +0 -96
  53. data/bower_components/jquery/src/attributes/support.js +0 -35
  54. data/bower_components/jquery/src/attributes/val.js +0 -153
  55. data/bower_components/jquery/src/callbacks.js +0 -205
  56. data/bower_components/jquery/src/core.js +0 -500
  57. data/bower_components/jquery/src/core/access.js +0 -60
  58. data/bower_components/jquery/src/core/init.js +0 -123
  59. data/bower_components/jquery/src/core/parseHTML.js +0 -39
  60. data/bower_components/jquery/src/core/ready.js +0 -96
  61. data/bower_components/jquery/src/core/var/rsingleTag.js +0 -4
  62. data/bower_components/jquery/src/css.js +0 -455
  63. data/bower_components/jquery/src/css/addGetHookIf.js +0 -24
  64. data/bower_components/jquery/src/css/curCSS.js +0 -57
  65. data/bower_components/jquery/src/css/defaultDisplay.js +0 -69
  66. data/bower_components/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  67. data/bower_components/jquery/src/css/support.js +0 -83
  68. data/bower_components/jquery/src/css/swap.js +0 -28
  69. data/bower_components/jquery/src/css/var/cssExpand.js +0 -3
  70. data/bower_components/jquery/src/css/var/getStyles.js +0 -5
  71. data/bower_components/jquery/src/css/var/isHidden.js +0 -13
  72. data/bower_components/jquery/src/css/var/rmargin.js +0 -3
  73. data/bower_components/jquery/src/css/var/rnumnonpx.js +0 -5
  74. data/bower_components/jquery/src/data.js +0 -175
  75. data/bower_components/jquery/src/data/Data.js +0 -181
  76. data/bower_components/jquery/src/data/accepts.js +0 -20
  77. data/bower_components/jquery/src/data/var/data_priv.js +0 -5
  78. data/bower_components/jquery/src/data/var/data_user.js +0 -5
  79. data/bower_components/jquery/src/deferred.js +0 -149
  80. data/bower_components/jquery/src/deprecated.js +0 -13
  81. data/bower_components/jquery/src/dimensions.js +0 -50
  82. data/bower_components/jquery/src/effects.js +0 -642
  83. data/bower_components/jquery/src/effects/Tween.js +0 -114
  84. data/bower_components/jquery/src/effects/animatedSelector.js +0 -13
  85. data/bower_components/jquery/src/event.js +0 -859
  86. data/bower_components/jquery/src/event/alias.js +0 -39
  87. data/bower_components/jquery/src/event/support.js +0 -9
  88. data/bower_components/jquery/src/exports/amd.js +0 -18
  89. data/bower_components/jquery/src/exports/global.js +0 -32
  90. data/bower_components/jquery/src/intro.js +0 -44
  91. data/bower_components/jquery/src/jquery.js +0 -36
  92. data/bower_components/jquery/src/manipulation.js +0 -583
  93. data/bower_components/jquery/src/manipulation/_evalUrl.js +0 -18
  94. data/bower_components/jquery/src/manipulation/support.js +0 -24
  95. data/bower_components/jquery/src/manipulation/var/rcheckableType.js +0 -3
  96. data/bower_components/jquery/src/offset.js +0 -204
  97. data/bower_components/jquery/src/outro.js +0 -1
  98. data/bower_components/jquery/src/queue.js +0 -142
  99. data/bower_components/jquery/src/queue/delay.js +0 -22
  100. data/bower_components/jquery/src/selector-native.js +0 -171
  101. data/bower_components/jquery/src/selector-sizzle.js +0 -14
  102. data/bower_components/jquery/src/selector.js +0 -1
  103. data/bower_components/jquery/src/serialize.js +0 -111
  104. data/bower_components/jquery/src/sizzle/dist/sizzle.js +0 -2015
  105. data/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
  106. data/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
  107. data/bower_components/jquery/src/traversing.js +0 -200
  108. data/bower_components/jquery/src/traversing/findFilter.js +0 -100
  109. data/bower_components/jquery/src/traversing/var/rneedsContext.js +0 -6
  110. data/bower_components/jquery/src/var/arr.js +0 -3
  111. data/bower_components/jquery/src/var/class2type.js +0 -4
  112. data/bower_components/jquery/src/var/concat.js +0 -5
  113. data/bower_components/jquery/src/var/hasOwn.js +0 -5
  114. data/bower_components/jquery/src/var/indexOf.js +0 -5
  115. data/bower_components/jquery/src/var/pnum.js +0 -3
  116. data/bower_components/jquery/src/var/push.js +0 -5
  117. data/bower_components/jquery/src/var/rnotwhite.js +0 -3
  118. data/bower_components/jquery/src/var/slice.js +0 -5
  119. data/bower_components/jquery/src/var/strundefined.js +0 -3
  120. data/bower_components/jquery/src/var/support.js +0 -4
  121. data/bower_components/jquery/src/var/toString.js +0 -5
  122. data/bower_components/jquery/src/var/trim.js +0 -3
  123. data/bower_components/jquery/src/wrap.js +0 -78
  124. data/bower_components/lodash/.bower.json +0 -34
  125. data/bower_components/lodash/LICENSE.txt +0 -22
  126. data/bower_components/lodash/bower.json +0 -23
  127. data/bower_components/lodash/dist/lodash.compat.js +0 -7157
  128. data/bower_components/lodash/dist/lodash.compat.min.js +0 -61
  129. data/bower_components/lodash/dist/lodash.js +0 -6785
  130. data/bower_components/lodash/dist/lodash.min.js +0 -56
  131. data/bower_components/lodash/dist/lodash.underscore.js +0 -4979
  132. data/bower_components/lodash/dist/lodash.underscore.min.js +0 -39
  133. data/bower_components/moment/.bower.json +0 -31
  134. data/bower_components/moment/LICENSE +0 -22
  135. data/bower_components/moment/bower.json +0 -20
  136. data/bower_components/moment/lang/ar-ma.js +0 -56
  137. data/bower_components/moment/lang/ar.js +0 -56
  138. data/bower_components/moment/lang/bg.js +0 -86
  139. data/bower_components/moment/lang/br.js +0 -107
  140. data/bower_components/moment/lang/bs.js +0 -139
  141. data/bower_components/moment/lang/ca.js +0 -66
  142. data/bower_components/moment/lang/cs.js +0 -155
  143. data/bower_components/moment/lang/cv.js +0 -59
  144. data/bower_components/moment/lang/cy.js +0 -77
  145. data/bower_components/moment/lang/da.js +0 -56
  146. data/bower_components/moment/lang/de.js +0 -71
  147. data/bower_components/moment/lang/el.js +0 -79
  148. data/bower_components/moment/lang/en-au.js +0 -62
  149. data/bower_components/moment/lang/en-ca.js +0 -59
  150. data/bower_components/moment/lang/en-gb.js +0 -63
  151. data/bower_components/moment/lang/eo.js +0 -65
  152. data/bower_components/moment/lang/es.js +0 -75
  153. data/bower_components/moment/lang/et.js +0 -76
  154. data/bower_components/moment/lang/eu.js +0 -60
  155. data/bower_components/moment/lang/fa.js +0 -97
  156. data/bower_components/moment/lang/fi.js +0 -103
  157. data/bower_components/moment/lang/fo.js +0 -56
  158. data/bower_components/moment/lang/fr-ca.js +0 -54
  159. data/bower_components/moment/lang/fr.js +0 -58
  160. data/bower_components/moment/lang/gl.js +0 -71
  161. data/bower_components/moment/lang/he.js +0 -77
  162. data/bower_components/moment/lang/hi.js +0 -105
  163. data/bower_components/moment/lang/hr.js +0 -140
  164. data/bower_components/moment/lang/hu.js +0 -105
  165. data/bower_components/moment/lang/hy-am.js +0 -113
  166. data/bower_components/moment/lang/id.js +0 -67
  167. data/bower_components/moment/lang/is.js +0 -124
  168. data/bower_components/moment/lang/it.js +0 -59
  169. data/bower_components/moment/lang/ja.js +0 -58
  170. data/bower_components/moment/lang/ka.js +0 -108
  171. data/bower_components/moment/lang/km.js +0 -55
  172. data/bower_components/moment/lang/ko.js +0 -63
  173. data/bower_components/moment/lang/lb.js +0 -160
  174. data/bower_components/moment/lang/lt.js +0 -118
  175. data/bower_components/moment/lang/lv.js +0 -77
  176. data/bower_components/moment/lang/mk.js +0 -86
  177. data/bower_components/moment/lang/ml.js +0 -64
  178. data/bower_components/moment/lang/mr.js +0 -104
  179. data/bower_components/moment/lang/ms-my.js +0 -66
  180. data/bower_components/moment/lang/nb.js +0 -57
  181. data/bower_components/moment/lang/ne.js +0 -105
  182. data/bower_components/moment/lang/nl.js +0 -67
  183. data/bower_components/moment/lang/nn.js +0 -56
  184. data/bower_components/moment/lang/pl.js +0 -98
  185. data/bower_components/moment/lang/pt-br.js +0 -56
  186. data/bower_components/moment/lang/pt.js +0 -60
  187. data/bower_components/moment/lang/ro.js +0 -72
  188. data/bower_components/moment/lang/ru.js +0 -163
  189. data/bower_components/moment/lang/sk.js +0 -156
  190. data/bower_components/moment/lang/sl.js +0 -144
  191. data/bower_components/moment/lang/sq.js +0 -61
  192. data/bower_components/moment/lang/sr-cyr.js +0 -106
  193. data/bower_components/moment/lang/sr.js +0 -106
  194. data/bower_components/moment/lang/sv.js +0 -63
  195. data/bower_components/moment/lang/ta.js +0 -112
  196. data/bower_components/moment/lang/th.js +0 -58
  197. data/bower_components/moment/lang/tl-ph.js +0 -58
  198. data/bower_components/moment/lang/tr.js +0 -93
  199. data/bower_components/moment/lang/tzm-la.js +0 -55
  200. data/bower_components/moment/lang/tzm.js +0 -55
  201. data/bower_components/moment/lang/uk.js +0 -157
  202. data/bower_components/moment/lang/uz.js +0 -55
  203. data/bower_components/moment/lang/vi.js +0 -62
  204. data/bower_components/moment/lang/zh-cn.js +0 -108
  205. data/bower_components/moment/lang/zh-tw.js +0 -84
  206. data/bower_components/moment/min/langs.js +0 -5991
  207. data/bower_components/moment/min/langs.min.js +0 -3
  208. data/bower_components/moment/min/moment-with-langs.js +0 -7993
  209. data/bower_components/moment/min/moment-with-langs.min.js +0 -9
  210. data/bower_components/moment/min/moment.min.js +0 -6
  211. data/bower_components/moment/moment.js +0 -2489
  212. data/bower_components/moment/readme.md +0 -368
  213. data/website/Gemfile +0 -6
  214. data/website/config.ru +0 -2
  215. data/website/data/data.json +0 -1
  216. data/website/docker_container/logster.yml +0 -95
  217. data/website/sample.rb +0 -85
  218. data/website/scripts/persist_logs.rb +0 -13
@@ -1,27 +0,0 @@
1
- /*!
2
-
3
- handlebars v1.3.0
4
-
5
- Copyright (C) 2011 by Yehuda Katz
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
24
-
25
- @license
26
- */
27
- define("handlebars/safe-string",["exports"],function(a){function b(a){this.string=a}b.prototype.toString=function(){return""+this.string},a["default"]=b}),define("handlebars/utils",["./safe-string","exports"],function(a,b){function c(a){return h[a]||"&amp;"}function d(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])}function e(a){return a instanceof g?a.toString():a||0===a?(a=""+a,j.test(a)?a.replace(i,c):a):""}function f(a){return a||0===a?m(a)&&0===a.length?!0:!1:!0}var g=a["default"],h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/[&<>"'`]/g,j=/[&<>"'`]/;b.extend=d;var k=Object.prototype.toString;b.toString=k;var l=function(a){return"function"==typeof a};l(/x/)&&(l=function(a){return"function"==typeof a&&"[object Function]"===k.call(a)});var l;b.isFunction=l;var m=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===k.call(a):!1};b.isArray=m,b.escapeExpression=e,b.isEmpty=f}),define("handlebars/exception",["exports"],function(a){function b(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f<c.length;f++)this[c[f]]=e[c[f]];d&&(this.lineNumber=d,this.column=b.firstColumn)}var c=["description","fileName","lineNumber","message","name","number","stack"];b.prototype=new Error,a["default"]=b}),define("handlebars/base",["./utils","./exception","exports"],function(a,b,c){function d(a,b){this.helpers=a||{},this.partials=b||{},e(this)}function e(a){a.registerHelper("helperMissing",function(a){if(2===arguments.length)return void 0;throw new h("Missing helper: '"+a+"'")}),a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse||function(){},e=c.fn;return m(b)&&(b=b.call(this)),b===!0?e(this):b===!1||null==b?d(this):l(b)?b.length>0?a.helpers.each(b,c):d(this):e(b)}),a.registerHelper("each",function(a,b){var c,d=b.fn,e=b.inverse,f=0,g="";if(m(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(l(a))for(var h=a.length;h>f;f++)c&&(c.index=f,c.first=0===f,c.last=f===a.length-1),g+=d(a[f],{data:c});else for(var i in a)a.hasOwnProperty(i)&&(c&&(c.key=i,c.index=f,c.first=0===f),g+=d(a[i],{data:c}),f++);return 0===f&&(g=e(this)),g}),a.registerHelper("if",function(a,b){return m(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||g.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){return m(a)&&(a=a.call(this)),g.isEmpty(a)?void 0:b.fn(a)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function f(a,b){p.log(a,b)}var g=a,h=b["default"],i="1.3.0";c.VERSION=i;var j=4;c.COMPILER_REVISION=j;var k={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};c.REVISION_CHANGES=k;var l=g.isArray,m=g.isFunction,n=g.toString,o="[object Object]";c.HandlebarsEnvironment=d,d.prototype={constructor:d,logger:p,log:f,registerHelper:function(a,b,c){if(n.call(a)===o){if(c||b)throw new h("Arg not supported with multiple helpers");g.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){n.call(a)===o?g.extend(this.partials,a):this.partials[a]=b}};var p={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(p.level<=a){var c=p.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};c.logger=p,c.log=f;var q=function(a){var b={};return g.extend(b,a),b};c.createFrame=q}),define("handlebars/runtime",["./utils","./exception","./base","exports"],function(a,b,c,d){function e(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function f(a,b){if(!b)throw new l("No environment passed to template");var c=function(a,c,d,e,f,g){var h=b.VM.invokePartial.apply(this,arguments);if(null!=h)return h;if(b.compile){var i={helpers:e,partials:f,data:g};return f[c]=b.compile(a,{data:void 0!==g},b),f[c](d,i)}throw new l("The partial "+c+" could not be compiled when running in runtime-only mode")},d={escapeExpression:k.escapeExpression,invokePartial:c,programs:[],program:function(a,b,c){var d=this.programs[a];return c?d=h(a,b,c):d||(d=this.programs[a]=h(a,b)),d},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c={},k.extend(c,b),k.extend(c,a)),c},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop,compilerInfo:null};return function(c,e){e=e||{};var f,g,h=e.partial?e:b;e.partial||(f=e.helpers,g=e.partials);var i=a.call(d,h,c,f,g,e.data);return e.partial||b.VM.checkRevision(d.compilerInfo),i}}function g(a,b,c){var d=Array.prototype.slice.call(arguments,3),e=function(a,e){return e=e||{},b.apply(this,[a,e.data||c].concat(d))};return e.program=a,e.depth=d.length,e}function h(a,b,c){var d=function(a,d){return d=d||{},b(a,d.data||c)};return d.program=a,d.depth=0,d}function i(a,b,c,d,e,f){var g={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,g):void 0}function j(){return""}var k=a,l=b["default"],m=c.COMPILER_REVISION,n=c.REVISION_CHANGES;d.checkRevision=e,d.template=f,d.programWithDepth=g,d.program=h,d.invokePartial=i,d.noop=j}),define("handlebars.runtime",["./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","exports"],function(a,b,c,d,e,f){var g=a,h=b["default"],i=c["default"],j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();m.create=l,f["default"]=m});
@@ -1,530 +0,0 @@
1
- /*!
2
-
3
- handlebars v1.3.0
4
-
5
- Copyright (C) 2011 by Yehuda Katz
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
24
-
25
- @license
26
- */
27
- /* exported Handlebars */
28
- var Handlebars = (function() {
29
- // handlebars/safe-string.js
30
- var __module3__ = (function() {
31
- "use strict";
32
- var __exports__;
33
- // Build out our basic SafeString type
34
- function SafeString(string) {
35
- this.string = string;
36
- }
37
-
38
- SafeString.prototype.toString = function() {
39
- return "" + this.string;
40
- };
41
-
42
- __exports__ = SafeString;
43
- return __exports__;
44
- })();
45
-
46
- // handlebars/utils.js
47
- var __module2__ = (function(__dependency1__) {
48
- "use strict";
49
- var __exports__ = {};
50
- /*jshint -W004 */
51
- var SafeString = __dependency1__;
52
-
53
- var escape = {
54
- "&": "&amp;",
55
- "<": "&lt;",
56
- ">": "&gt;",
57
- '"': "&quot;",
58
- "'": "&#x27;",
59
- "`": "&#x60;"
60
- };
61
-
62
- var badChars = /[&<>"'`]/g;
63
- var possible = /[&<>"'`]/;
64
-
65
- function escapeChar(chr) {
66
- return escape[chr] || "&amp;";
67
- }
68
-
69
- function extend(obj, value) {
70
- for(var key in value) {
71
- if(Object.prototype.hasOwnProperty.call(value, key)) {
72
- obj[key] = value[key];
73
- }
74
- }
75
- }
76
-
77
- __exports__.extend = extend;var toString = Object.prototype.toString;
78
- __exports__.toString = toString;
79
- // Sourced from lodash
80
- // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
81
- var isFunction = function(value) {
82
- return typeof value === 'function';
83
- };
84
- // fallback for older versions of Chrome and Safari
85
- if (isFunction(/x/)) {
86
- isFunction = function(value) {
87
- return typeof value === 'function' && toString.call(value) === '[object Function]';
88
- };
89
- }
90
- var isFunction;
91
- __exports__.isFunction = isFunction;
92
- var isArray = Array.isArray || function(value) {
93
- return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;
94
- };
95
- __exports__.isArray = isArray;
96
-
97
- function escapeExpression(string) {
98
- // don't escape SafeStrings, since they're already safe
99
- if (string instanceof SafeString) {
100
- return string.toString();
101
- } else if (!string && string !== 0) {
102
- return "";
103
- }
104
-
105
- // Force a string conversion as this will be done by the append regardless and
106
- // the regex test will do this transparently behind the scenes, causing issues if
107
- // an object's to string has escaped characters in it.
108
- string = "" + string;
109
-
110
- if(!possible.test(string)) { return string; }
111
- return string.replace(badChars, escapeChar);
112
- }
113
-
114
- __exports__.escapeExpression = escapeExpression;function isEmpty(value) {
115
- if (!value && value !== 0) {
116
- return true;
117
- } else if (isArray(value) && value.length === 0) {
118
- return true;
119
- } else {
120
- return false;
121
- }
122
- }
123
-
124
- __exports__.isEmpty = isEmpty;
125
- return __exports__;
126
- })(__module3__);
127
-
128
- // handlebars/exception.js
129
- var __module4__ = (function() {
130
- "use strict";
131
- var __exports__;
132
-
133
- var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
134
-
135
- function Exception(message, node) {
136
- var line;
137
- if (node && node.firstLine) {
138
- line = node.firstLine;
139
-
140
- message += ' - ' + line + ':' + node.firstColumn;
141
- }
142
-
143
- var tmp = Error.prototype.constructor.call(this, message);
144
-
145
- // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
146
- for (var idx = 0; idx < errorProps.length; idx++) {
147
- this[errorProps[idx]] = tmp[errorProps[idx]];
148
- }
149
-
150
- if (line) {
151
- this.lineNumber = line;
152
- this.column = node.firstColumn;
153
- }
154
- }
155
-
156
- Exception.prototype = new Error();
157
-
158
- __exports__ = Exception;
159
- return __exports__;
160
- })();
161
-
162
- // handlebars/base.js
163
- var __module1__ = (function(__dependency1__, __dependency2__) {
164
- "use strict";
165
- var __exports__ = {};
166
- var Utils = __dependency1__;
167
- var Exception = __dependency2__;
168
-
169
- var VERSION = "1.3.0";
170
- __exports__.VERSION = VERSION;var COMPILER_REVISION = 4;
171
- __exports__.COMPILER_REVISION = COMPILER_REVISION;
172
- var REVISION_CHANGES = {
173
- 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
174
- 2: '== 1.0.0-rc.3',
175
- 3: '== 1.0.0-rc.4',
176
- 4: '>= 1.0.0'
177
- };
178
- __exports__.REVISION_CHANGES = REVISION_CHANGES;
179
- var isArray = Utils.isArray,
180
- isFunction = Utils.isFunction,
181
- toString = Utils.toString,
182
- objectType = '[object Object]';
183
-
184
- function HandlebarsEnvironment(helpers, partials) {
185
- this.helpers = helpers || {};
186
- this.partials = partials || {};
187
-
188
- registerDefaultHelpers(this);
189
- }
190
-
191
- __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {
192
- constructor: HandlebarsEnvironment,
193
-
194
- logger: logger,
195
- log: log,
196
-
197
- registerHelper: function(name, fn, inverse) {
198
- if (toString.call(name) === objectType) {
199
- if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }
200
- Utils.extend(this.helpers, name);
201
- } else {
202
- if (inverse) { fn.not = inverse; }
203
- this.helpers[name] = fn;
204
- }
205
- },
206
-
207
- registerPartial: function(name, str) {
208
- if (toString.call(name) === objectType) {
209
- Utils.extend(this.partials, name);
210
- } else {
211
- this.partials[name] = str;
212
- }
213
- }
214
- };
215
-
216
- function registerDefaultHelpers(instance) {
217
- instance.registerHelper('helperMissing', function(arg) {
218
- if(arguments.length === 2) {
219
- return undefined;
220
- } else {
221
- throw new Exception("Missing helper: '" + arg + "'");
222
- }
223
- });
224
-
225
- instance.registerHelper('blockHelperMissing', function(context, options) {
226
- var inverse = options.inverse || function() {}, fn = options.fn;
227
-
228
- if (isFunction(context)) { context = context.call(this); }
229
-
230
- if(context === true) {
231
- return fn(this);
232
- } else if(context === false || context == null) {
233
- return inverse(this);
234
- } else if (isArray(context)) {
235
- if(context.length > 0) {
236
- return instance.helpers.each(context, options);
237
- } else {
238
- return inverse(this);
239
- }
240
- } else {
241
- return fn(context);
242
- }
243
- });
244
-
245
- instance.registerHelper('each', function(context, options) {
246
- var fn = options.fn, inverse = options.inverse;
247
- var i = 0, ret = "", data;
248
-
249
- if (isFunction(context)) { context = context.call(this); }
250
-
251
- if (options.data) {
252
- data = createFrame(options.data);
253
- }
254
-
255
- if(context && typeof context === 'object') {
256
- if (isArray(context)) {
257
- for(var j = context.length; i<j; i++) {
258
- if (data) {
259
- data.index = i;
260
- data.first = (i === 0);
261
- data.last = (i === (context.length-1));
262
- }
263
- ret = ret + fn(context[i], { data: data });
264
- }
265
- } else {
266
- for(var key in context) {
267
- if(context.hasOwnProperty(key)) {
268
- if(data) {
269
- data.key = key;
270
- data.index = i;
271
- data.first = (i === 0);
272
- }
273
- ret = ret + fn(context[key], {data: data});
274
- i++;
275
- }
276
- }
277
- }
278
- }
279
-
280
- if(i === 0){
281
- ret = inverse(this);
282
- }
283
-
284
- return ret;
285
- });
286
-
287
- instance.registerHelper('if', function(conditional, options) {
288
- if (isFunction(conditional)) { conditional = conditional.call(this); }
289
-
290
- // Default behavior is to render the positive path if the value is truthy and not empty.
291
- // The `includeZero` option may be set to treat the condtional as purely not empty based on the
292
- // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
293
- if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {
294
- return options.inverse(this);
295
- } else {
296
- return options.fn(this);
297
- }
298
- });
299
-
300
- instance.registerHelper('unless', function(conditional, options) {
301
- return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});
302
- });
303
-
304
- instance.registerHelper('with', function(context, options) {
305
- if (isFunction(context)) { context = context.call(this); }
306
-
307
- if (!Utils.isEmpty(context)) return options.fn(context);
308
- });
309
-
310
- instance.registerHelper('log', function(context, options) {
311
- var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
312
- instance.log(level, context);
313
- });
314
- }
315
-
316
- var logger = {
317
- methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },
318
-
319
- // State enum
320
- DEBUG: 0,
321
- INFO: 1,
322
- WARN: 2,
323
- ERROR: 3,
324
- level: 3,
325
-
326
- // can be overridden in the host environment
327
- log: function(level, obj) {
328
- if (logger.level <= level) {
329
- var method = logger.methodMap[level];
330
- if (typeof console !== 'undefined' && console[method]) {
331
- console[method].call(console, obj);
332
- }
333
- }
334
- }
335
- };
336
- __exports__.logger = logger;
337
- function log(level, obj) { logger.log(level, obj); }
338
-
339
- __exports__.log = log;var createFrame = function(object) {
340
- var obj = {};
341
- Utils.extend(obj, object);
342
- return obj;
343
- };
344
- __exports__.createFrame = createFrame;
345
- return __exports__;
346
- })(__module2__, __module4__);
347
-
348
- // handlebars/runtime.js
349
- var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
350
- "use strict";
351
- var __exports__ = {};
352
- var Utils = __dependency1__;
353
- var Exception = __dependency2__;
354
- var COMPILER_REVISION = __dependency3__.COMPILER_REVISION;
355
- var REVISION_CHANGES = __dependency3__.REVISION_CHANGES;
356
-
357
- function checkRevision(compilerInfo) {
358
- var compilerRevision = compilerInfo && compilerInfo[0] || 1,
359
- currentRevision = COMPILER_REVISION;
360
-
361
- if (compilerRevision !== currentRevision) {
362
- if (compilerRevision < currentRevision) {
363
- var runtimeVersions = REVISION_CHANGES[currentRevision],
364
- compilerVersions = REVISION_CHANGES[compilerRevision];
365
- throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. "+
366
- "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").");
367
- } else {
368
- // Use the embedded version info since the runtime doesn't know about this revision yet
369
- throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. "+
370
- "Please update your runtime to a newer version ("+compilerInfo[1]+").");
371
- }
372
- }
373
- }
374
-
375
- __exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial
376
-
377
- function template(templateSpec, env) {
378
- if (!env) {
379
- throw new Exception("No environment passed to template");
380
- }
381
-
382
- // Note: Using env.VM references rather than local var references throughout this section to allow
383
- // for external users to override these as psuedo-supported APIs.
384
- var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {
385
- var result = env.VM.invokePartial.apply(this, arguments);
386
- if (result != null) { return result; }
387
-
388
- if (env.compile) {
389
- var options = { helpers: helpers, partials: partials, data: data };
390
- partials[name] = env.compile(partial, { data: data !== undefined }, env);
391
- return partials[name](context, options);
392
- } else {
393
- throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
394
- }
395
- };
396
-
397
- // Just add water
398
- var container = {
399
- escapeExpression: Utils.escapeExpression,
400
- invokePartial: invokePartialWrapper,
401
- programs: [],
402
- program: function(i, fn, data) {
403
- var programWrapper = this.programs[i];
404
- if(data) {
405
- programWrapper = program(i, fn, data);
406
- } else if (!programWrapper) {
407
- programWrapper = this.programs[i] = program(i, fn);
408
- }
409
- return programWrapper;
410
- },
411
- merge: function(param, common) {
412
- var ret = param || common;
413
-
414
- if (param && common && (param !== common)) {
415
- ret = {};
416
- Utils.extend(ret, common);
417
- Utils.extend(ret, param);
418
- }
419
- return ret;
420
- },
421
- programWithDepth: env.VM.programWithDepth,
422
- noop: env.VM.noop,
423
- compilerInfo: null
424
- };
425
-
426
- return function(context, options) {
427
- options = options || {};
428
- var namespace = options.partial ? options : env,
429
- helpers,
430
- partials;
431
-
432
- if (!options.partial) {
433
- helpers = options.helpers;
434
- partials = options.partials;
435
- }
436
- var result = templateSpec.call(
437
- container,
438
- namespace, context,
439
- helpers,
440
- partials,
441
- options.data);
442
-
443
- if (!options.partial) {
444
- env.VM.checkRevision(container.compilerInfo);
445
- }
446
-
447
- return result;
448
- };
449
- }
450
-
451
- __exports__.template = template;function programWithDepth(i, fn, data /*, $depth */) {
452
- var args = Array.prototype.slice.call(arguments, 3);
453
-
454
- var prog = function(context, options) {
455
- options = options || {};
456
-
457
- return fn.apply(this, [context, options.data || data].concat(args));
458
- };
459
- prog.program = i;
460
- prog.depth = args.length;
461
- return prog;
462
- }
463
-
464
- __exports__.programWithDepth = programWithDepth;function program(i, fn, data) {
465
- var prog = function(context, options) {
466
- options = options || {};
467
-
468
- return fn(context, options.data || data);
469
- };
470
- prog.program = i;
471
- prog.depth = 0;
472
- return prog;
473
- }
474
-
475
- __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
476
- var options = { partial: true, helpers: helpers, partials: partials, data: data };
477
-
478
- if(partial === undefined) {
479
- throw new Exception("The partial " + name + " could not be found");
480
- } else if(partial instanceof Function) {
481
- return partial(context, options);
482
- }
483
- }
484
-
485
- __exports__.invokePartial = invokePartial;function noop() { return ""; }
486
-
487
- __exports__.noop = noop;
488
- return __exports__;
489
- })(__module2__, __module4__, __module1__);
490
-
491
- // handlebars.runtime.js
492
- var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
493
- "use strict";
494
- var __exports__;
495
- /*globals Handlebars: true */
496
- var base = __dependency1__;
497
-
498
- // Each of these augment the Handlebars object. No need to setup here.
499
- // (This is done to easily share code between commonjs and browse envs)
500
- var SafeString = __dependency2__;
501
- var Exception = __dependency3__;
502
- var Utils = __dependency4__;
503
- var runtime = __dependency5__;
504
-
505
- // For compatibility and usage outside of module systems, make the Handlebars object a namespace
506
- var create = function() {
507
- var hb = new base.HandlebarsEnvironment();
508
-
509
- Utils.extend(hb, base);
510
- hb.SafeString = SafeString;
511
- hb.Exception = Exception;
512
- hb.Utils = Utils;
513
-
514
- hb.VM = runtime;
515
- hb.template = function(spec) {
516
- return runtime.template(spec, hb);
517
- };
518
-
519
- return hb;
520
- };
521
-
522
- var Handlebars = create();
523
- Handlebars.create = create;
524
-
525
- __exports__ = Handlebars;
526
- return __exports__;
527
- })(__module1__, __module3__, __module4__, __module2__, __module5__);
528
-
529
- return __module0__;
530
- })();