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,368 @@
1
+ A lightweight javascript date library for parsing, validating, manipulating, and formatting dates.
2
+
3
+ # [Documentation](http://momentjs.com/docs/)
4
+
5
+ Upgrading to 2.0.0
6
+ ==================
7
+
8
+ There are a number of small backwards incompatible changes with version 2.0.0.
9
+
10
+ [See them and their descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes)
11
+
12
+ Changed language ordinal method to return the number + ordinal instead of just the ordinal.
13
+
14
+ Changed two digit year parsing cutoff to match strptime.
15
+
16
+ Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
17
+
18
+ Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
19
+
20
+ Removed the lang data objects from the top level namespace.
21
+
22
+ Duplicate `Date` passed to `moment()` instead of referencing it.
23
+
24
+ Travis Build Status
25
+ ===================
26
+
27
+ Develop [![Build Status](https://travis-ci.org/moment/moment.png?branch=develop)](https://travis-ci.org/moment/moment)
28
+
29
+ Master [![Build Status](https://travis-ci.org/moment/moment.png?branch=master)](https://travis-ci.org/moment/moment)
30
+
31
+ For developers
32
+ ==============
33
+
34
+ You need [node](http://nodejs.org/), use [nvm](https://github.com/creationix/nvm) or [nenv](https://github.com/ryuone/nenv) to install it.
35
+
36
+ Then, in your shell
37
+
38
+ ```bash
39
+ git clone https://github.com/moment/moment.git
40
+ cd moment
41
+ npm install -g grunt-cli
42
+ npm install
43
+ git checkout develop # all patches against develop branch, please!
44
+ grunt # this runs tests and jshint
45
+ ```
46
+
47
+ Changelog
48
+ =========
49
+
50
+ ### 2.6.0 [See changelog](https://gist.github.com/ichernev/10544682)
51
+
52
+ * languages
53
+ * [#1529] Serbian-Cyrillic (sr-cyr)
54
+ * [#1544], [#1546] Khmer Cambodia (km)
55
+
56
+ * features
57
+ * [#1419](https://github.com/moment/moment/issues/1419), [#1468](https://github.com/moment/moment/issues/1468), [#1467](https://github.com/moment/moment/issues/1467), [#1546](https://github.com/moment/moment/issues/1546) better handling of timezone-d moments around DST
58
+ * [#1462](https://github.com/moment/moment/issues/1462) add weeksInYear and isoWeeksInYear
59
+ * [#1475](https://github.com/moment/moment/issues/1475) support ordinal parsing
60
+ * [#1499](https://github.com/moment/moment/issues/1499) composer support
61
+ * [#1577](https://github.com/moment/moment/issues/1577), [#1604](https://github.com/moment/moment/issues/1604) put Date parsing in moment.createFromInputFallback so it can be properly deprecated and controlled in the future
62
+ * [#1545](https://github.com/moment/moment/issues/1545) extract two-digit year parsing in moment.parseTwoDigitYear, so it can be overwritten
63
+ * [#1590](https://github.com/moment/moment/issues/1590) (see [#1574](https://github.com/moment/moment/issues/1574)) set AMD global before module definition to better support non AMD module dependencies used in AMD environment
64
+ * [#1589](https://github.com/moment/moment/issues/1589) remove global in Node.JS environment (was not working before, nobody complained, was scheduled for removal anyway)
65
+ * [#1586](https://github.com/moment/moment/issues/1586) support quarter setting and parsing
66
+
67
+ * 18 bugs fixed
68
+
69
+ ### 2.5.1
70
+
71
+ * languages
72
+ * [#1392](https://github.com/moment/moment/issues/1392) Armenian (hy-am)
73
+
74
+ * bugfixes
75
+ * [#1429](https://github.com/moment/moment/issues/1429) fixes [#1423](https://github.com/moment/moment/issues/1423) weird chrome-32 bug with js object creation
76
+ * [#1421](https://github.com/moment/moment/issues/1421) remove html entities from Welsh
77
+ * [#1418](https://github.com/moment/moment/issues/1418) fixes [#1401](https://github.com/moment/moment/issues/1401) improved non-padded tokens in strict matching
78
+ * [#1417](https://github.com/moment/moment/issues/1417) fixes [#1404](https://github.com/moment/moment/issues/1404) handle buggy moment object created by property cloning
79
+ * [#1398](https://github.com/moment/moment/issues/1398) fixes [#1397](https://github.com/moment/moment/issues/1397) fix Arabic-like week number parsing
80
+ * [#1396](https://github.com/moment/moment/issues/1396) add leftZeroFill(4) to GGGG and gggg formats
81
+ * [#1373](https://github.com/moment/moment/issues/1373) use lowercase for months and days in Catalan
82
+
83
+ * testing
84
+ * [#1374](https://github.com/moment/moment/issues/1374) run tests on multiple browser/os combos via SauceLabs and Travis
85
+
86
+ ### 2.5.0 [See changelog](https://gist.github.com/ichernev/8104451)
87
+
88
+ * New languages
89
+ * Luxemburish (lb) [1247](https://github.com/moment/moment/issues/1247)
90
+ * Serbian (rs) [1319](https://github.com/moment/moment/issues/1319)
91
+ * Tamil (ta) [1324](https://github.com/moment/moment/issues/1324)
92
+ * Macedonian (mk) [1337](https://github.com/moment/moment/issues/1337)
93
+
94
+ * Features
95
+ * [1311](https://github.com/moment/moment/issues/1311) Add quarter getter and format token `Q`
96
+ * [1303](https://github.com/moment/moment/issues/1303) strict parsing now respects number of digits per token (fix [1196](https://github.com/moment/moment/issues/1196))
97
+ * 0d30bb7 add jspm support
98
+ * [1347](https://github.com/moment/moment/issues/1347) improve zone parsing
99
+ * [1362](https://github.com/moment/moment/issues/1362) support merideam parsing in Korean
100
+
101
+ * 22 bugfixes
102
+
103
+ ### 2.4.0
104
+
105
+ * **Deprecate** globally exported moment, will be removed in next major
106
+ * New languages
107
+ * Farose (fo) [#1206](https://github.com/moment/moment/issues/1206)
108
+ * Tagalog/Filipino (tl-ph) [#1197](https://github.com/moment/moment/issues/1197)
109
+ * Welsh (cy) [#1215](https://github.com/moment/moment/issues/1215)
110
+ * Bugfixes
111
+ * properly handle Z at the end of iso RegExp [#1187](https://github.com/moment/moment/issues/1187)
112
+ * chinese meridian time improvements [#1076](https://github.com/moment/moment/issues/1076)
113
+ * fix language tests [#1177](https://github.com/moment/moment/issues/1177)
114
+ * remove some failing tests (that should have never existed :))
115
+ [#1185](https://github.com/moment/moment/issues/1185)
116
+ [#1183](https://github.com/moment/moment/issues/1183)
117
+ * handle russian noun cases in weird cases [#1195](https://github.com/moment/moment/issues/1195)
118
+
119
+ ### 2.3.1
120
+
121
+ Removed a trailing comma [1169] and fixed a bug with `months`, `weekdays` getters [#1171](https://github.com/moment/moment/issues/1171).
122
+
123
+ ### 2.3.0 [See changelog](https://gist.github.com/ichernev/6864354)
124
+
125
+ Changed isValid, added strict parsing.
126
+ Week tokens parsing.
127
+
128
+ ### 2.2.1
129
+
130
+ Fixed bug in string prototype test.
131
+ Updated authors and contributors.
132
+
133
+ ### 2.2.0 [See changelog](https://gist.github.com/ichernev/00f837a9baf46a3565e4)
134
+
135
+ Added bower support.
136
+
137
+ Language files now use UMD.
138
+
139
+ Creating moment defaults to current date/month/year.
140
+
141
+ Added a bundle of moment and all language files.
142
+
143
+ ### 2.1.0 [See changelog](https://gist.github.com/timrwood/b8c2d90d528eddb53ab5)
144
+
145
+ Added better week support.
146
+
147
+ Added ability to set offset with `moment#zone`.
148
+
149
+ Added ability to set month or weekday from a string.
150
+
151
+ Added `moment#min` and `moment#max`
152
+
153
+ ### 2.0.0 [See changelog](https://gist.github.com/timrwood/e72f2eef320ed9e37c51)
154
+
155
+ Added short form localized tokens.
156
+
157
+ Added ability to define language a string should be parsed in.
158
+
159
+ Added support for reversed add/subtract arguments.
160
+
161
+ Added support for `endOf('week')` and `startOf('week')`.
162
+
163
+ Fixed the logic for `moment#diff(Moment, 'months')` and `moment#diff(Moment, 'years')`
164
+
165
+ `moment#diff` now floors instead of rounds.
166
+
167
+ Normalized `moment#toString`.
168
+
169
+ Added `isSame`, `isAfter`, and `isBefore` methods.
170
+
171
+ Added better week support.
172
+
173
+ Added `moment#toJSON`
174
+
175
+ Bugfix: Fixed parsing of first century dates
176
+
177
+ Bugfix: Parsing 10Sep2001 should work as expected
178
+
179
+ Bugfix: Fixed wierdness with `moment.utc()` parsing.
180
+
181
+ Changed language ordinal method to return the number + ordinal instead of just the ordinal.
182
+
183
+ Changed two digit year parsing cutoff to match strptime.
184
+
185
+ Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
186
+
187
+ Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
188
+
189
+ Removed the lang data objects from the top level namespace.
190
+
191
+ Duplicate `Date` passed to `moment()` instead of referencing it.
192
+
193
+ ### 1.7.2 [See discussion](https://github.com/timrwood/moment/issues/456)
194
+
195
+ Bugfixes
196
+
197
+ ### 1.7.1 [See discussion](https://github.com/timrwood/moment/issues/384)
198
+
199
+ Bugfixes
200
+
201
+ ### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288)
202
+
203
+ Added `moment.fn.endOf()` and `moment.fn.startOf()`.
204
+
205
+ Added validation via `moment.fn.isValid()`.
206
+
207
+ Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions
208
+
209
+ Add support for month/weekday callbacks in `moment.fn.format()`
210
+
211
+ Added instance specific languages.
212
+
213
+ Added two letter weekday abbreviations with the formatting token `dd`.
214
+
215
+ Various language updates.
216
+
217
+ Various bugfixes.
218
+
219
+ ### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268)
220
+
221
+ Added Durations.
222
+
223
+ Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).
224
+
225
+ Added support for millisecond parsing and formatting tokens (S SS SSS)
226
+
227
+ Added a getter for `moment.lang()`
228
+
229
+ Various bugfixes.
230
+
231
+ There are a few things deprecated in the 1.6.0 release.
232
+
233
+ 1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background.
234
+
235
+ 2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances.
236
+
237
+ 3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222).
238
+
239
+ ### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed)
240
+
241
+ Added UTC mode.
242
+
243
+ Added automatic ISO8601 parsing.
244
+
245
+ Various bugfixes.
246
+
247
+ ### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed)
248
+
249
+ Added `moment.fn.toDate` as a replacement for `moment.fn.native`.
250
+
251
+ Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day.
252
+
253
+ Various bugfixes.
254
+
255
+ ### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed)
256
+
257
+ Added support for parsing month names in the current language.
258
+
259
+ Added escape blocks for parsing tokens.
260
+
261
+ Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'.
262
+
263
+ Added `moment.fn.day` as a setter.
264
+
265
+ Various bugfixes
266
+
267
+ ### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed)
268
+
269
+ Added timezones to parser and formatter.
270
+
271
+ Added `moment.fn.isDST`.
272
+
273
+ Added `moment.fn.zone` to get the timezone offset in minutes.
274
+
275
+ ### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed)
276
+
277
+ Various bugfixes
278
+
279
+ ### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed)
280
+
281
+ Added time specific diffs (months, days, hours, etc)
282
+
283
+ ### 1.1.0
284
+
285
+ Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29)
286
+
287
+ Fixed [issue 31](https://github.com/timrwood/moment/pull/31).
288
+
289
+ ### 1.0.1
290
+
291
+ Added `moment.version` to get the current version.
292
+
293
+ Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25)
294
+
295
+ ### 1.0.0
296
+
297
+ Added convenience methods for getting and setting date parts.
298
+
299
+ Added better support for `moment.add()`.
300
+
301
+ Added better lang support in NodeJS.
302
+
303
+ Renamed library from underscore.date to Moment.js
304
+
305
+ ### 0.6.1
306
+
307
+ Added Portuguese, Italian, and French language support
308
+
309
+ ### 0.6.0
310
+
311
+ Added _date.lang() support.
312
+ Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]);
313
+ Made parse from string and single format 25% faster.
314
+
315
+ ### 0.5.2
316
+
317
+ Bugfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9).
318
+
319
+ ### 0.5.1
320
+
321
+ Bugfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5).
322
+
323
+ ### 0.5.0
324
+
325
+ Dropped the redundant `_date.date()` in favor of `_date()`.
326
+ Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters.
327
+ Removed `_date.isLeapYear(yearNumber)`. Use `_date([yearNumber]).isLeapYear()` instead.
328
+ Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function.
329
+
330
+ ### 0.4.1
331
+
332
+ Added date input formats for input strings.
333
+
334
+ ### 0.4.0
335
+
336
+ Added underscore.date to npm. Removed dependencies on underscore.
337
+
338
+ ### 0.3.2
339
+
340
+ Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes.
341
+
342
+ ### 0.3.1
343
+
344
+ Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object.
345
+
346
+ ### 0.3.0
347
+
348
+ Switched to the Underscore methodology of not mucking with the native objects' prototypes.
349
+ Made chaining possible.
350
+
351
+ ### 0.2.1
352
+
353
+ Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'.
354
+ Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`.
355
+
356
+ ### 0.2.0
357
+
358
+ Changed function names to be more concise.
359
+ Changed date format from php date format to custom format.
360
+
361
+ ### 0.1.0
362
+
363
+ Initial release
364
+
365
+ License
366
+ =======
367
+
368
+ Moment.js is freely distributable under the terms of the MIT license.
@@ -0,0 +1,9 @@
1
+ require 'logster/logger'
2
+ require 'logster/message'
3
+
4
+ module Logster
5
+ end
6
+
7
+ if defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
8
+ require 'logster/rails/railtie'
9
+ end
@@ -0,0 +1,31 @@
1
+ require 'logger'
2
+
3
+ module Logster
4
+ class Logger < ::Logger
5
+ attr_accessor :store
6
+
7
+ def initialize(store)
8
+ super(nil)
9
+ @store = store
10
+ end
11
+
12
+ def add(severity, message, progname, &block)
13
+ if severity < @level
14
+ return true
15
+ end
16
+
17
+ progname ||= @progname
18
+ if message.nil?
19
+ if block_given?
20
+ message = yield
21
+ else
22
+ message = progname
23
+ progname = @progname
24
+ end
25
+ end
26
+
27
+ @store.report(severity, progname, message)
28
+
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,42 @@
1
+ module Logster
2
+ class Message
3
+ attr_accessor :timestamp, :severity, :progname, :message, :key
4
+
5
+ def initialize(severity, progname, message, timestamp = nil, key = nil)
6
+ @timestamp = timestamp || get_timestamp
7
+ @severity = severity
8
+ @progname = progname
9
+ @message = message
10
+ @key = key || SecureRandom.hex
11
+ end
12
+
13
+ def to_h
14
+ {
15
+ message: @message,
16
+ progname: @progname,
17
+ severity: @severity,
18
+ timestamp: @timestamp,
19
+ key: @key
20
+ }
21
+ end
22
+
23
+ def to_json(opts=nil)
24
+ JSON.fast_generate(to_h,opts)
25
+ end
26
+
27
+ def self.from_json(json)
28
+ parsed = ::JSON.parse(json)
29
+ new( parsed["severity"],
30
+ parsed["progname"],
31
+ parsed["message"],
32
+ parsed["timestamp"],
33
+ parsed["key"] )
34
+ end
35
+
36
+ protected
37
+
38
+ def get_timestamp
39
+ (Time.new.to_f * 1000).to_i
40
+ end
41
+ end
42
+ end