From 852ce62df76c8696209d473f3524db59b84a279a Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sun, 1 Mar 2015 10:26:42 -0500 Subject: [PATCH] Update Angular.js documentation (1.3.14) Fixes #159. --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/angular/clean_html.rb | 2 +- lib/docs/filters/angular/entries.rb | 4 ++++ lib/docs/scrapers/angular.rb | 5 ++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8a7a883e..fc08d1bc 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -77,7 +77,7 @@ app.templates.aboutPage = -> """ credits = [ [ 'Angular.js', - '2010-2014 Google, Inc.', + '2010-2015 Google, Inc.', 'CC BY', 'http://creativecommons.org/licenses/by/3.0/' ], [ diff --git a/lib/docs/filters/angular/clean_html.rb b/lib/docs/filters/angular/clean_html.rb index 0f3de133..44ffcfbc 100644 --- a/lib/docs/filters/angular/clean_html.rb +++ b/lib/docs/filters/angular/clean_html.rb @@ -36,7 +36,7 @@ module Docs node.before(node.children).remove end - at_css('h1').add_child(css('.view-source', '.improve-docs')) + at_css('h1').prepend_child(css('.view-source', '.improve-docs')) # Remove root-level
while div = at_css('h1 + div') diff --git a/lib/docs/filters/angular/entries.rb b/lib/docs/filters/angular/entries.rb index 5559c2dc..761d14c1 100644 --- a/lib/docs/filters/angular/entries.rb +++ b/lib/docs/filters/angular/entries.rb @@ -37,6 +37,10 @@ module Docs entries end + + def include_default_entry? + !at_css('h1 + .definition-table:last-child') + end end end end diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 4f2d92ad..20214c5b 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -3,7 +3,7 @@ module Docs self.name = 'Angular.js' self.slug = 'angular' self.type = 'angular' - self.version = '1.3.8' + self.version = '1.3.14' self.base_url = "https://code.angularjs.org/#{version}/docs/partials/api/" html_filters.push 'angular/clean_html', 'angular/entries', 'title' @@ -20,10 +20,9 @@ module Docs end options[:skip] = %w(ng.html) - options[:skip_patterns] = [/\/(function|directive|object|type|provider|service|filter)\.html\z/] options[:attribution] = <<-HTML - © 2010–2014 Google, Inc.
+ © 2010–2015 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0. HTML