From 76b82ac2708090a3397618dfc2d4ac2d4c276dbc Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 19:54:07 +0100 Subject: [PATCH] angular: add version 9 --- .../templates/pages/about_tmpl.coffee | 7 +++++- lib/docs/scrapers/angular.rb | 24 +++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index e747cf6c..64bb94d6 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -82,10 +82,15 @@ app.templates.aboutPage = -> """ """ credits = [ - [ 'Angular
Angular.js', + [ 'Angular.js', '2010-2020 Google, Inc.', 'CC BY 3.0', 'https://creativecommons.org/licenses/by/3.0/' + ], [ + 'Angular', + '2010-2020 Google, Inc.', + 'CC BY', + 'https://creativecommons.org/licenses/by/4.0/' ], [ 'Ansible', '2012-2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.', diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 5ca1a35d..2ef3c9a1 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -11,7 +11,7 @@ module Docs options[:max_image_size] = 256_000 options[:attribution] = <<-HTML - © 2010–2019 Google, Inc.
+ © 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0. HTML @@ -59,8 +59,28 @@ module Docs end version do + self.release = '9.1.12' + self.base_url = 'https://v9.angular.io/' + self.root_path = 'docs' + + html_filters.push 'angular/clean_html', 'angular/entries' + + options[:follow_links] = false + options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/] + options[:fix_urls_before_parse] = ->(url) do + url.sub! %r{\Aguide/}, '/guide/' + url.sub! %r{\Atutorial/}, '/tutorial/' + url.sub! %r{\Aapi/}, '/api/' + url.sub! %r{\Agenerated/}, '/generated/' + url + end + + include Docs::Angular::Common + end + + version '8' do self.release = '8.2.14' - self.base_url = 'https://angular.io/' + self.base_url = 'https://v8.angular.io/' self.root_path = 'docs' html_filters.push 'angular/clean_html', 'angular/entries'