logster 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/Guardfile +8 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +38 -0
  7. data/Rakefile +18 -0
  8. data/assets/javascript/app.js +377 -0
  9. data/assets/javascript/external/ember.js +44267 -0
  10. data/assets/javascript/external/ember.min.js +19 -0
  11. data/assets/javascript/external/handlebars.min.js +28 -0
  12. data/assets/javascript/external/jquery.min.js +5 -0
  13. data/assets/javascript/external/lodash.min.js +56 -0
  14. data/assets/javascript/external/moment.min.js +6 -0
  15. data/assets/javascript/templates/application.handlebars +1 -0
  16. data/assets/javascript/templates/index.handlebars +48 -0
  17. data/assets/javascript/templates/message.handlebars +7 -0
  18. data/assets/stylesheets/app.css +188 -0
  19. data/bower_components/ember/.bower.json +22 -0
  20. data/bower_components/ember/.gitignore +5 -0
  21. data/bower_components/ember/Makefile +9 -0
  22. data/bower_components/ember/README.md +12 -0
  23. data/bower_components/ember/bower.json +11 -0
  24. data/bower_components/ember/component.json +13 -0
  25. data/bower_components/ember/composer.json +27 -0
  26. data/bower_components/ember/ember-template-compiler.js +320 -0
  27. data/bower_components/ember/ember.js +44267 -0
  28. data/bower_components/ember/ember.min.js +19 -0
  29. data/bower_components/ember/ember.prod.js +42649 -0
  30. data/bower_components/ember/package.json +11 -0
  31. data/bower_components/handlebars/.bower.json +16 -0
  32. data/bower_components/handlebars/.gitignore +2 -0
  33. data/bower_components/handlebars/README.md +11 -0
  34. data/bower_components/handlebars/bower.json +6 -0
  35. data/bower_components/handlebars/component.json +9 -0
  36. data/bower_components/handlebars/composer.json +35 -0
  37. data/bower_components/handlebars/handlebars-source.gemspec +21 -0
  38. data/bower_components/handlebars/handlebars.amd.js +2719 -0
  39. data/bower_components/handlebars/handlebars.amd.min.js +28 -0
  40. data/bower_components/handlebars/handlebars.js +2746 -0
  41. data/bower_components/handlebars/handlebars.js.nuspec +17 -0
  42. data/bower_components/handlebars/handlebars.min.js +28 -0
  43. data/bower_components/handlebars/handlebars.runtime.amd.js +515 -0
  44. data/bower_components/handlebars/handlebars.runtime.amd.min.js +27 -0
  45. data/bower_components/handlebars/handlebars.runtime.js +530 -0
  46. data/bower_components/handlebars/handlebars.runtime.min.js +27 -0
  47. data/bower_components/handlebars/lib/handlebars/source.rb +11 -0
  48. data/bower_components/jquery/.bower.json +37 -0
  49. data/bower_components/jquery/MIT-LICENSE.txt +21 -0
  50. data/bower_components/jquery/bower.json +27 -0
  51. data/bower_components/jquery/dist/jquery.js +9111 -0
  52. data/bower_components/jquery/dist/jquery.min.js +5 -0
  53. data/bower_components/jquery/dist/jquery.min.map +1 -0
  54. data/bower_components/jquery/src/ajax.js +806 -0
  55. data/bower_components/jquery/src/ajax/jsonp.js +89 -0
  56. data/bower_components/jquery/src/ajax/load.js +75 -0
  57. data/bower_components/jquery/src/ajax/parseJSON.js +13 -0
  58. data/bower_components/jquery/src/ajax/parseXML.js +28 -0
  59. data/bower_components/jquery/src/ajax/script.js +64 -0
  60. data/bower_components/jquery/src/ajax/var/nonce.js +5 -0
  61. data/bower_components/jquery/src/ajax/var/rquery.js +3 -0
  62. data/bower_components/jquery/src/ajax/xhr.js +130 -0
  63. data/bower_components/jquery/src/attributes.js +11 -0
  64. data/bower_components/jquery/src/attributes/attr.js +143 -0
  65. data/bower_components/jquery/src/attributes/classes.js +158 -0
  66. data/bower_components/jquery/src/attributes/prop.js +96 -0
  67. data/bower_components/jquery/src/attributes/support.js +35 -0
  68. data/bower_components/jquery/src/attributes/val.js +153 -0
  69. data/bower_components/jquery/src/callbacks.js +205 -0
  70. data/bower_components/jquery/src/core.js +500 -0
  71. data/bower_components/jquery/src/core/access.js +60 -0
  72. data/bower_components/jquery/src/core/init.js +123 -0
  73. data/bower_components/jquery/src/core/parseHTML.js +39 -0
  74. data/bower_components/jquery/src/core/ready.js +96 -0
  75. data/bower_components/jquery/src/core/var/rsingleTag.js +4 -0
  76. data/bower_components/jquery/src/css.js +455 -0
  77. data/bower_components/jquery/src/css/addGetHookIf.js +24 -0
  78. data/bower_components/jquery/src/css/curCSS.js +57 -0
  79. data/bower_components/jquery/src/css/defaultDisplay.js +69 -0
  80. data/bower_components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  81. data/bower_components/jquery/src/css/support.js +83 -0
  82. data/bower_components/jquery/src/css/swap.js +28 -0
  83. data/bower_components/jquery/src/css/var/cssExpand.js +3 -0
  84. data/bower_components/jquery/src/css/var/getStyles.js +5 -0
  85. data/bower_components/jquery/src/css/var/isHidden.js +13 -0
  86. data/bower_components/jquery/src/css/var/rmargin.js +3 -0
  87. data/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
  88. data/bower_components/jquery/src/data.js +175 -0
  89. data/bower_components/jquery/src/data/Data.js +181 -0
  90. data/bower_components/jquery/src/data/accepts.js +20 -0
  91. data/bower_components/jquery/src/data/var/data_priv.js +5 -0
  92. data/bower_components/jquery/src/data/var/data_user.js +5 -0
  93. data/bower_components/jquery/src/deferred.js +149 -0
  94. data/bower_components/jquery/src/deprecated.js +13 -0
  95. data/bower_components/jquery/src/dimensions.js +50 -0
  96. data/bower_components/jquery/src/effects.js +642 -0
  97. data/bower_components/jquery/src/effects/Tween.js +114 -0
  98. data/bower_components/jquery/src/effects/animatedSelector.js +13 -0
  99. data/bower_components/jquery/src/event.js +859 -0
  100. data/bower_components/jquery/src/event/alias.js +39 -0
  101. data/bower_components/jquery/src/event/support.js +9 -0
  102. data/bower_components/jquery/src/exports/amd.js +18 -0
  103. data/bower_components/jquery/src/exports/global.js +32 -0
  104. data/bower_components/jquery/src/intro.js +44 -0
  105. data/bower_components/jquery/src/jquery.js +36 -0
  106. data/bower_components/jquery/src/manipulation.js +583 -0
  107. data/bower_components/jquery/src/manipulation/_evalUrl.js +18 -0
  108. data/bower_components/jquery/src/manipulation/support.js +24 -0
  109. data/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
  110. data/bower_components/jquery/src/offset.js +204 -0
  111. data/bower_components/jquery/src/outro.js +1 -0
  112. data/bower_components/jquery/src/queue.js +142 -0
  113. data/bower_components/jquery/src/queue/delay.js +22 -0
  114. data/bower_components/jquery/src/selector-native.js +171 -0
  115. data/bower_components/jquery/src/selector-sizzle.js +14 -0
  116. data/bower_components/jquery/src/selector.js +1 -0
  117. data/bower_components/jquery/src/serialize.js +111 -0
  118. data/bower_components/jquery/src/sizzle/dist/sizzle.js +2015 -0
  119. data/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  120. data/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  121. data/bower_components/jquery/src/traversing.js +200 -0
  122. data/bower_components/jquery/src/traversing/findFilter.js +100 -0
  123. data/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
  124. data/bower_components/jquery/src/var/arr.js +3 -0
  125. data/bower_components/jquery/src/var/class2type.js +4 -0
  126. data/bower_components/jquery/src/var/concat.js +5 -0
  127. data/bower_components/jquery/src/var/hasOwn.js +5 -0
  128. data/bower_components/jquery/src/var/indexOf.js +5 -0
  129. data/bower_components/jquery/src/var/pnum.js +3 -0
  130. data/bower_components/jquery/src/var/push.js +5 -0
  131. data/bower_components/jquery/src/var/rnotwhite.js +3 -0
  132. data/bower_components/jquery/src/var/slice.js +5 -0
  133. data/bower_components/jquery/src/var/strundefined.js +3 -0
  134. data/bower_components/jquery/src/var/support.js +4 -0
  135. data/bower_components/jquery/src/var/toString.js +5 -0
  136. data/bower_components/jquery/src/var/trim.js +3 -0
  137. data/bower_components/jquery/src/wrap.js +78 -0
  138. data/bower_components/lodash/.bower.json +34 -0
  139. data/bower_components/lodash/LICENSE.txt +22 -0
  140. data/bower_components/lodash/bower.json +23 -0
  141. data/bower_components/lodash/dist/lodash.compat.js +7157 -0
  142. data/bower_components/lodash/dist/lodash.compat.min.js +61 -0
  143. data/bower_components/lodash/dist/lodash.js +6785 -0
  144. data/bower_components/lodash/dist/lodash.min.js +56 -0
  145. data/bower_components/lodash/dist/lodash.underscore.js +4979 -0
  146. data/bower_components/lodash/dist/lodash.underscore.min.js +39 -0
  147. data/bower_components/moment/.bower.json +31 -0
  148. data/bower_components/moment/LICENSE +22 -0
  149. data/bower_components/moment/bower.json +20 -0
  150. data/bower_components/moment/lang/ar-ma.js +56 -0
  151. data/bower_components/moment/lang/ar.js +56 -0
  152. data/bower_components/moment/lang/bg.js +86 -0
  153. data/bower_components/moment/lang/br.js +107 -0
  154. data/bower_components/moment/lang/bs.js +139 -0
  155. data/bower_components/moment/lang/ca.js +66 -0
  156. data/bower_components/moment/lang/cs.js +155 -0
  157. data/bower_components/moment/lang/cv.js +59 -0
  158. data/bower_components/moment/lang/cy.js +77 -0
  159. data/bower_components/moment/lang/da.js +56 -0
  160. data/bower_components/moment/lang/de.js +71 -0
  161. data/bower_components/moment/lang/el.js +79 -0
  162. data/bower_components/moment/lang/en-au.js +62 -0
  163. data/bower_components/moment/lang/en-ca.js +59 -0
  164. data/bower_components/moment/lang/en-gb.js +63 -0
  165. data/bower_components/moment/lang/eo.js +65 -0
  166. data/bower_components/moment/lang/es.js +75 -0
  167. data/bower_components/moment/lang/et.js +76 -0
  168. data/bower_components/moment/lang/eu.js +60 -0
  169. data/bower_components/moment/lang/fa.js +97 -0
  170. data/bower_components/moment/lang/fi.js +103 -0
  171. data/bower_components/moment/lang/fo.js +56 -0
  172. data/bower_components/moment/lang/fr-ca.js +54 -0
  173. data/bower_components/moment/lang/fr.js +58 -0
  174. data/bower_components/moment/lang/gl.js +71 -0
  175. data/bower_components/moment/lang/he.js +77 -0
  176. data/bower_components/moment/lang/hi.js +105 -0
  177. data/bower_components/moment/lang/hr.js +140 -0
  178. data/bower_components/moment/lang/hu.js +105 -0
  179. data/bower_components/moment/lang/hy-am.js +113 -0
  180. data/bower_components/moment/lang/id.js +67 -0
  181. data/bower_components/moment/lang/is.js +124 -0
  182. data/bower_components/moment/lang/it.js +59 -0
  183. data/bower_components/moment/lang/ja.js +58 -0
  184. data/bower_components/moment/lang/ka.js +108 -0
  185. data/bower_components/moment/lang/km.js +55 -0
  186. data/bower_components/moment/lang/ko.js +63 -0
  187. data/bower_components/moment/lang/lb.js +160 -0
  188. data/bower_components/moment/lang/lt.js +118 -0
  189. data/bower_components/moment/lang/lv.js +77 -0
  190. data/bower_components/moment/lang/mk.js +86 -0
  191. data/bower_components/moment/lang/ml.js +64 -0
  192. data/bower_components/moment/lang/mr.js +104 -0
  193. data/bower_components/moment/lang/ms-my.js +66 -0
  194. data/bower_components/moment/lang/nb.js +57 -0
  195. data/bower_components/moment/lang/ne.js +105 -0
  196. data/bower_components/moment/lang/nl.js +67 -0
  197. data/bower_components/moment/lang/nn.js +56 -0
  198. data/bower_components/moment/lang/pl.js +98 -0
  199. data/bower_components/moment/lang/pt-br.js +56 -0
  200. data/bower_components/moment/lang/pt.js +60 -0
  201. data/bower_components/moment/lang/ro.js +72 -0
  202. data/bower_components/moment/lang/ru.js +163 -0
  203. data/bower_components/moment/lang/sk.js +156 -0
  204. data/bower_components/moment/lang/sl.js +144 -0
  205. data/bower_components/moment/lang/sq.js +61 -0
  206. data/bower_components/moment/lang/sr-cyr.js +106 -0
  207. data/bower_components/moment/lang/sr.js +106 -0
  208. data/bower_components/moment/lang/sv.js +63 -0
  209. data/bower_components/moment/lang/ta.js +112 -0
  210. data/bower_components/moment/lang/th.js +58 -0
  211. data/bower_components/moment/lang/tl-ph.js +58 -0
  212. data/bower_components/moment/lang/tr.js +93 -0
  213. data/bower_components/moment/lang/tzm-la.js +55 -0
  214. data/bower_components/moment/lang/tzm.js +55 -0
  215. data/bower_components/moment/lang/uk.js +157 -0
  216. data/bower_components/moment/lang/uz.js +55 -0
  217. data/bower_components/moment/lang/vi.js +62 -0
  218. data/bower_components/moment/lang/zh-cn.js +108 -0
  219. data/bower_components/moment/lang/zh-tw.js +84 -0
  220. data/bower_components/moment/min/langs.js +5991 -0
  221. data/bower_components/moment/min/langs.min.js +3 -0
  222. data/bower_components/moment/min/moment-with-langs.js +7993 -0
  223. data/bower_components/moment/min/moment-with-langs.min.js +9 -0
  224. data/bower_components/moment/min/moment.min.js +6 -0
  225. data/bower_components/moment/moment.js +2489 -0
  226. data/bower_components/moment/readme.md +368 -0
  227. data/lib/logster.rb +9 -0
  228. data/lib/logster/logger.rb +31 -0
  229. data/lib/logster/message.rb +42 -0
  230. data/lib/logster/middleware/reporter.rb +13 -0
  231. data/lib/logster/middleware/viewer.rb +122 -0
  232. data/lib/logster/rails/railtie.rb +39 -0
  233. data/lib/logster/redis_store.rb +124 -0
  234. data/lib/logster/version.rb +3 -0
  235. data/logster.gemspec +30 -0
  236. data/test/logster/middleware/test_viewer.rb +34 -0
  237. data/test/logster/test_redis_store.rb +112 -0
  238. data/test/test_helper.rb +6 -0
  239. data/website/Gemfile +6 -0
  240. data/website/config.ru +2 -0
  241. data/website/data/data.json +1 -0
  242. data/website/docker_container/logster.yml +95 -0
  243. data/website/sample.rb +85 -0
  244. data/website/scripts/persist_logs.rb +13 -0
  245. metadata +375 -0
@@ -0,0 +1,27 @@
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});
@@ -0,0 +1,530 @@
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
+ })();