History

Update Moment.js documentation (2.11.1)

Thibaut committed 10 years ago

Commit b0526c71 parent b0a55c43 files · +6 −4Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/moment/entries.rb +3 −1
  3. lib/docs/scrapers/moment.rb +2 −2
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -256,7 +256,7 @@ credits = [ · 255 unmodified lines
256 'http://modernizr.com/license/'256 'http://modernizr.com/license/'
257 ], [257 ], [
258 'Moment.js',258 'Moment.js',
259 '2011-2015 Tim Wood, Iskren Chernev, Moment.js contributors',259 '2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors',
260 'MIT',260 'MIT',
261 'https://raw.github.com/moment/moment/master/LICENSE'261 'https://raw.github.com/moment/moment/master/LICENSE'
262 ], [262 ], [
lib/docs/filters/moment/entries.rb+3−1
@@ -22,8 +22,10 @@ module Docs · 21 unmodified lines
22 22
23 if node['id'] == 'utilities-invalid' # bug fix23 if node['id'] == 'utilities-invalid' # bug fix
24 name = 'moment.invalid()'24 name = 'moment.invalid()'
25 elsif node['id'] == 'customization-now'
26 name = 'moment.now'
25 elsif %w(Display Durations Get\ +\ Set i18n Manipulate Query Utilities).include?(type) ||27 elsif %w(Display Durations Get\ +\ Set i18n Manipulate Query Utilities).include?(type) ||
26 %w(parsing-is-valid parsing-parse-zone parsing-unix-timestamp parsing-utc customization-relative-time-threshold).include?(node['id'])28 %w(parsing-is-valid parsing-parse-zone parsing-unix-timestamp parsing-utc parsing-creation-data customization-relative-time-threshold).include?(node['id'])
27 name = node.next_element.content[/moment(?:\(.*?\))?\.(?:duration\(\)\.)?\w+/]29 name = node.next_element.content[/moment(?:\(.*?\))?\.(?:duration\(\)\.)?\w+/]
28 name.sub! %r{\(.*?\)\.}, '#'30 name.sub! %r{\(.*?\)\.}, '#'
29 name << '()'31 name << '()'
lib/docs/scrapers/moment.rb+2−2
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 self.name = 'Moment.js'3 self.name = 'Moment.js'
4 self.slug = 'moment'4 self.slug = 'moment'
5 self.type = 'moment'5 self.type = 'moment'
6 self.version = '2.10.2'6 self.version = '2.11.1'
7 self.base_url = 'http://momentjs.com/docs/'7 self.base_url = 'http://momentjs.com/docs/'
8 8
9 html_filters.push 'moment/clean_html', 'moment/entries', 'title'9 html_filters.push 'moment/clean_html', 'moment/entries', 'title'
@@ -13,7 +13,7 @@ module Docs · 3 unmodified lines
13 options[:skip_links] = true13 options[:skip_links] = true
14 14
15 options[:attribution] = <<-HTML15 options[:attribution] = <<-HTML
16 &copy; 2011&ndash;2015 Tim Wood, Iskren Chernev, Moment.js contributors<br>16 &copy; 2011&ndash;2016 Tim Wood, Iskren Chernev, Moment.js contributors<br>
17 Licensed under the MIT License.17 Licensed under the MIT License.
18 HTML18 HTML
19 end19 end