Bladeren bron

Update Angular.js documentation (1.3.14)

Fixes #159.
Thibaut 10 jaren geleden
bovenliggende
commit
852ce62df7

+ 1 - 1
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/'
   ], [

+ 1 - 1
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 <div>
         while div = at_css('h1 + div')

+ 4 - 0
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

+ 2 - 3
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
-      &copy; 2010&ndash;2014 Google, Inc.<br>
+      &copy; 2010&ndash;2015 Google, Inc.<br>
       Licensed under the Creative Commons Attribution License 3.0.
     HTML