Unified · Split
| @@ -25,5 +25,12 @@ module Docs · 24 unmodified lines | |||
| 25 | © 2011-2018 Nginx, Inc.<br> | 25 | © 2011-2018 Nginx, Inc.<br> |
| 26 | Licensed under the BSD License. | 26 | Licensed under the BSD License. |
| 27 | HTML | 27 | HTML |
| 28 | |||
| 29 | def get_latest_version(options, &block) | ||
| 30 | fetch_doc('https://nginx.org/en/download.html', options) do |doc| | ||
| 31 | table = doc.at_css('#content > table').inner_html | ||
| 32 | block.call table.scan(/nginx-([0-9.]+)</)[0][0] | ||
| 33 | end | ||
| 34 | end | ||
| 28 | end | 35 | end |
| 29 | end | 36 | end |
| @@ -4,6 +4,9 @@ module Docs · 3 unmodified lines | |||
| 4 | self.slug = 'nginx_lua_module' | 4 | self.slug = 'nginx_lua_module' |
| 5 | self.release = '0.10.13' | 5 | self.release = '0.10.13' |
| 6 | self.base_url = "https://github.com/openresty/lua-nginx-module/tree/v#{self.release}/" | 6 | self.base_url = "https://github.com/openresty/lua-nginx-module/tree/v#{self.release}/" |
| 7 | self.links = { | ||
| 8 | code: 'https://github.com/openresty/lua-nginx-module' | ||
| 9 | } | ||
| 7 | 10 | ||
| 8 | html_filters.push 'nginx_lua_module/clean_html', 'nginx_lua_module/entries', 'title' | 11 | html_filters.push 'nginx_lua_module/clean_html', 'nginx_lua_module/entries', 'title' |
| 9 | 12 | ||
| @@ -15,5 +18,12 @@ module Docs · 5 unmodified lines | |||
| 15 | © 2009–2018 Yichun "agentzh" Zhang (章亦春), OpenResty Inc.<br> | 18 | © 2009–2018 Yichun "agentzh" Zhang (章亦春), OpenResty Inc.<br> |
| 16 | Licensed under the BSD License. | 19 | Licensed under the BSD License. |
| 17 | HTML | 20 | HTML |
| 21 | |||
| 22 | def get_latest_version(options, &block) | ||
| 23 | get_github_tags('openresty', 'lua-nginx-module', options) do |tags| | ||
| 24 | tag = tags.find { |tag| !tag['name'].include?('rc') } | ||
| 25 | block.call tag['name'][1..-1] | ||
| 26 | end | ||
| 27 | end | ||
| 18 | end | 28 | end |
| 19 | end | 29 | end |
| @@ -17,5 +17,11 @@ module Docs · 16 unmodified lines | |||
| 17 | © 2006–2018 Andreas Rumpf<br> | 17 | © 2006–2018 Andreas Rumpf<br> |
| 18 | Licensed under the MIT License. | 18 | Licensed under the MIT License. |
| 19 | HTML | 19 | HTML |
| 20 | |||
| 21 | def get_latest_version(options, &block) | ||
| 22 | fetch_doc('https://nim-lang.org/docs/overview.html', options) do |doc| | ||
| 23 | block.call doc.at_css('.container > .docinfo > tbody > tr:last-child > td').content.strip | ||
| 24 | end | ||
| 25 | end | ||
| 20 | end | 26 | end |
| 21 | end | 27 | end |
| @@ -46,5 +46,11 @@ module Docs · 45 unmodified lines | |||
| 46 | self.release = '4.9.1' | 46 | self.release = '4.9.1' |
| 47 | self.base_url = 'https://nodejs.org/dist/latest-v4.x/docs/api/' | 47 | self.base_url = 'https://nodejs.org/dist/latest-v4.x/docs/api/' |
| 48 | end | 48 | end |
| 49 | |||
| 50 | def get_latest_version(options, &block) | ||
| 51 | fetch_doc('https://nodejs.org/en/', options) do |doc| | ||
| 52 | block.call doc.at_css('#home-intro > .home-downloadblock:last-of-type > a')['data-version'][1..-1] | ||
| 53 | end | ||
| 54 | end | ||
| 49 | end | 55 | end |
| 50 | end | 56 | end |
| @@ -19,5 +19,11 @@ module Docs · 18 unmodified lines | |||
| 19 | Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid, Lars Kanis<br> | 19 | Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid, Lars Kanis<br> |
| 20 | Licensed under the MIT License. | 20 | Licensed under the MIT License. |
| 21 | HTML | 21 | HTML |
| 22 | |||
| 23 | def get_latest_version(options, &block) | ||
| 24 | get_latest_github_release('sparklemotion', 'nokogiri', options) do |release| | ||
| 25 | block.call release['tag_name'][1..-1] | ||
| 26 | end | ||
| 27 | end | ||
| 22 | end | 28 | end |
| 23 | end | 29 | end |
| @@ -29,5 +29,11 @@ module Docs · 28 unmodified lines | |||
| 29 | Licensed under the npm License.<br> | 29 | Licensed under the npm License.<br> |
| 30 | npm is a trademark of npm, Inc. | 30 | npm is a trademark of npm, Inc. |
| 31 | HTML | 31 | HTML |
| 32 | |||
| 33 | def get_latest_version(options, &block) | ||
| 34 | get_latest_github_release('npm', 'cli', options) do |release| | ||
| 35 | block.call release['tag_name'][1..-1] | ||
| 36 | end | ||
| 37 | end | ||
| 32 | end | 38 | end |
| 33 | end | 39 | end |
| @@ -49,5 +49,11 @@ module Docs · 48 unmodified lines | |||
| 49 | self.release = '1.10.4' | 49 | self.release = '1.10.4' |
| 50 | self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/" | 50 | self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/" |
| 51 | end | 51 | end |
| 52 | |||
| 53 | def get_latest_version(options, &block) | ||
| 54 | get_latest_github_release('numpy', 'numpy', options) do |release| | ||
| 55 | block.call release['tag_name'][1..-1] | ||
| 56 | end | ||
| 57 | end | ||
| 52 | end | 58 | end |
| 53 | end | 59 | end |
| @@ -86,5 +86,26 @@ module Docs · 85 unmodified lines | |||
| 86 | def read_file(path) | 86 | def read_file(path) |
| 87 | File.read(path).force_encoding('iso-8859-1').encode('utf-8') rescue nil | 87 | File.read(path).force_encoding('iso-8859-1').encode('utf-8') rescue nil |
| 88 | end | 88 | end |
| 89 | |||
| 90 | def get_latest_version(options, &block) | ||
| 91 | latest_version = 8 | ||
| 92 | current_attempt = latest_version | ||
| 93 | attempts = 0 | ||
| 94 | |||
| 95 | while attempts < 3 | ||
| 96 | current_attempt += 1 | ||
| 97 | |||
| 98 | fetch_doc("https://packages.debian.org/sid/openjdk-#{current_attempt}-doc", options) do |doc| | ||
| 99 | if doc.at_css('.perror').nil? | ||
| 100 | latest_version = current_attempt | ||
| 101 | attempts = 0 | ||
| 102 | else | ||
| 103 | attempts += 1 | ||
| 104 | end | ||
| 105 | end | ||
| 106 | end | ||
| 107 | |||
| 108 | block.call latest_version.to_s | ||
| 109 | end | ||
| 89 | end | 110 | end |
| 90 | end | 111 | end |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | |||
| 18 | © 2010–2016 The OpenTSDB Authors<br> | 18 | © 2010–2016 The OpenTSDB Authors<br> |
| 19 | Licensed under the GNU LGPLv2.1+ and GPLv3+ licenses. | 19 | Licensed under the GNU LGPLv2.1+ and GPLv3+ licenses. |
| 20 | HTML | 20 | HTML |
| 21 | |||
| 22 | def get_latest_version(options, &block) | ||
| 23 | get_latest_github_release('OpenTSDB', 'opentsdb', options) do |release| | ||
| 24 | block.call release['tag_name'][1..-1] | ||
| 25 | end | ||
| 26 | end | ||
| 21 | end | 27 | end |
| 22 | end | 28 | end |
| @@ -23,5 +23,11 @@ module Docs · 22 unmodified lines | |||
| 23 | stub 'index2' do | 23 | stub 'index2' do |
| 24 | request_one(url_for('index')).body | 24 | request_one(url_for('index')).body |
| 25 | end | 25 | end |
| 26 | |||
| 27 | def get_latest_version(options, &block) | ||
| 28 | get_github_tags('padrino', 'padrino-framework', options) do |tags| | ||
| 29 | block.call tags[0]['name'] | ||
| 30 | end | ||
| 31 | end | ||
| 26 | end | 32 | end |
| 27 | end | 33 | end |
| @@ -49,5 +49,12 @@ module Docs · 48 unmodified lines | |||
| 49 | self.release = '0.18.1' | 49 | self.release = '0.18.1' |
| 50 | self.base_url = "http://pandas.pydata.org/pandas-docs/version/#{self.release}/" | 50 | self.base_url = "http://pandas.pydata.org/pandas-docs/version/#{self.release}/" |
| 51 | end | 51 | end |
| 52 | |||
| 53 | def get_latest_version(options, &block) | ||
| 54 | fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', options) do |doc| | ||
| 55 | label = doc.at_css('.body > .section > p').content | ||
| 56 | block.call label.scan(/Version: ([0-9.]+)/)[0][0] | ||
| 57 | end | ||
| 58 | end | ||
| 52 | end | 59 | end |
| 53 | end | 60 | end |
| @@ -43,5 +43,11 @@ module Docs · 42 unmodified lines | |||
| 43 | self.release = '5.20.2' | 43 | self.release = '5.20.2' |
| 44 | self.base_url = "https://perldoc.perl.org/#{self.release}/" | 44 | self.base_url = "https://perldoc.perl.org/#{self.release}/" |
| 45 | end | 45 | end |
| 46 | |||
| 47 | def get_latest_version(options, &block) | ||
| 48 | fetch('https://perldoc.perl.org/static/perlversion.js', options) do |body| | ||
| 49 | block.call body.scan(/>Perl ([0-9.]+)/)[0][0] | ||
| 50 | end | ||
| 51 | end | ||
| 46 | end | 52 | end |
| 47 | end | 53 | end |
| @@ -29,5 +29,11 @@ module Docs · 28 unmodified lines | |||
| 29 | self.release = '2.0.13' | 29 | self.release = '2.0.13' |
| 30 | self.base_url = 'https://docs.phalconphp.com/en/2.0.0/' | 30 | self.base_url = 'https://docs.phalconphp.com/en/2.0.0/' |
| 31 | end | 31 | end |
| 32 | |||
| 33 | def get_latest_version(options, &block) | ||
| 34 | fetch_doc('https://docs.phalconphp.com/', options) do |doc| | ||
| 35 | block.call doc.at_css('.custom-select__version').content.strip.sub(/Version /, '') | ||
| 36 | end | ||
| 37 | end | ||
| 32 | end | 38 | end |
| 33 | end | 39 | end |
| @@ -25,5 +25,11 @@ module Docs · 24 unmodified lines | |||
| 25 | © 2016 Richard Davey, Photon Storm Ltd.<br> | 25 | © 2016 Richard Davey, Photon Storm Ltd.<br> |
| 26 | Licensed under the MIT License. | 26 | Licensed under the MIT License. |
| 27 | HTML | 27 | HTML |
| 28 | |||
| 29 | def get_latest_version(options, &block) | ||
| 30 | get_latest_github_release('photonstorm', 'phaser', options) do |release| | ||
| 31 | block.call release['tag_name'][1..-1] | ||
| 32 | end | ||
| 33 | end | ||
| 28 | end | 34 | end |
| 29 | end | 35 | end |
| @@ -46,5 +46,11 @@ module Docs · 45 unmodified lines | |||
| 46 | HTML | 46 | HTML |
| 47 | end | 47 | end |
| 48 | } | 48 | } |
| 49 | |||
| 50 | def get_latest_version(options, &block) | ||
| 51 | fetch_doc('https://hexdocs.pm/phoenix/Phoenix.html', options) do |doc| | ||
| 52 | block.call doc.at_css('.sidebar-projectVersion').content.strip[1..-1] | ||
| 53 | end | ||
| 54 | end | ||
| 49 | end | 55 | end |
| 50 | end | 56 | end |
| @@ -66,5 +66,12 @@ module Docs · 65 unmodified lines | |||
| 66 | © 1997–2018 The PHP Documentation Group<br> | 66 | © 1997–2018 The PHP Documentation Group<br> |
| 67 | Licensed under the Creative Commons Attribution License v3.0 or later. | 67 | Licensed under the Creative Commons Attribution License v3.0 or later. |
| 68 | HTML | 68 | HTML |
| 69 | |||
| 70 | def get_latest_version(options, &block) | ||
| 71 | fetch_doc('https://secure.php.net/manual/en/doc.changelog.php', options) do |doc| | ||
| 72 | label = doc.at_css('tbody.gen-changelog > tr > td').content | ||
| 73 | block.call label.split(',').last.strip | ||
| 74 | end | ||
| 75 | end | ||
| 69 | end | 76 | end |
| 70 | end | 77 | end |
| @@ -37,5 +37,12 @@ module Docs · 36 unmodified lines | |||
| 37 | self.release = '4.8' | 37 | self.release = '4.8' |
| 38 | self.base_url = "https://phpunit.de/manual/#{release}/en/" | 38 | self.base_url = "https://phpunit.de/manual/#{release}/en/" |
| 39 | end | 39 | end |
| 40 | |||
| 41 | def get_latest_version(options, &block) | ||
| 42 | fetch_doc('https://phpunit.readthedocs.io/', options) do |doc| | ||
| 43 | label = doc.at_css('.rst-current-version').content.strip | ||
| 44 | block.call label.scan(/v: ([0-9.]+)/)[0][0] | ||
| 45 | end | ||
| 46 | end | ||
| 40 | end | 47 | end |
| 41 | end | 48 | end |
| @@ -80,5 +80,12 @@ module Docs · 79 unmodified lines | |||
| 80 | 80 | ||
| 81 | html_filters.insert_before 'postgresql/extract_metadata', 'postgresql/normalize_class_names' | 81 | html_filters.insert_before 'postgresql/extract_metadata', 'postgresql/normalize_class_names' |
| 82 | end | 82 | end |
| 83 | |||
| 84 | def get_latest_version(options, &block) | ||
| 85 | fetch_doc('https://www.postgresql.org/docs/current/index.html', options) do |doc| | ||
| 86 | label = doc.at_css('#pgContentWrap h1.title').content | ||
| 87 | block.call label.scan(/([0-9.]+)/)[0][0] | ||
| 88 | end | ||
| 89 | end | ||
| 83 | end | 90 | end |
| 84 | end | 91 | end |
| @@ -18,6 +18,10 @@ module Docs · 17 unmodified lines | |||
| 18 | Licensed under the MIT license. | 18 | Licensed under the MIT license. |
| 19 | HTML | 19 | HTML |
| 20 | 20 | ||
| 21 | def get_latest_version(options, &block) | ||
| 22 | get_npm_version('pug', options, &block) | ||
| 23 | end | ||
| 24 | |||
| 21 | private | 25 | private |
| 22 | 26 | ||
| 23 | def parse(response) # Hook here because Nokogori removes whitespace from textareas | 27 | def parse(response) # Hook here because Nokogori removes whitespace from textareas |
| @@ -14,5 +14,11 @@ module Docs · 13 unmodified lines | |||
| 14 | © 2017 Google Inc<br> | 14 | © 2017 Google Inc<br> |
| 15 | Licensed under the Apache License 2.0. | 15 | Licensed under the Apache License 2.0. |
| 16 | HTML | 16 | HTML |
| 17 | |||
| 18 | def get_latest_version(options, &block) | ||
| 19 | get_github_file_contents('GoogleChrome', 'puppeteer', 'README.md', options) do |contents| | ||
| 20 | block.call contents.scan(/\/v([0-9.]+)\/docs\/api\.md/)[0][0] | ||
| 21 | end | ||
| 22 | end | ||
| 17 | end | 23 | end |
| 18 | end | 24 | end |
| @@ -17,5 +17,11 @@ module Docs · 16 unmodified lines | |||
| 17 | © Pygame Developpers.<br> | 17 | © Pygame Developpers.<br> |
| 18 | Licensed under the GNU LGPL License version 2.1. | 18 | Licensed under the GNU LGPL License version 2.1. |
| 19 | HTML | 19 | HTML |
| 20 | |||
| 21 | def get_latest_version(options, &block) | ||
| 22 | get_latest_github_release('pygame', 'pygame', options) do |release| | ||
| 23 | block.call release['tag_name'] | ||
| 24 | end | ||
| 25 | end | ||
| 20 | end | 26 | end |
| 21 | end | 27 | end |
| @@ -50,5 +50,11 @@ module Docs · 49 unmodified lines | |||
| 50 | 50 | ||
| 51 | html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html' | 51 | html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html' |
| 52 | end | 52 | end |
| 53 | |||
| 54 | def get_latest_version(options, &block) | ||
| 55 | fetch_doc('https://docs.python.org/', options) do |doc| | ||
| 56 | block.call doc.at_css('.version_switcher_placeholder').content | ||
| 57 | end | ||
| 58 | end | ||
| 53 | end | 59 | end |
| 54 | end | 60 | end |
| @@ -19,5 +19,9 @@ module Docs · 18 unmodified lines | |||
| 19 | © 2009–2017 Kristopher Michael Kowal<br> | 19 | © 2009–2017 Kristopher Michael Kowal<br> |
| 20 | Licensed under the MIT License. | 20 | Licensed under the MIT License. |
| 21 | HTML | 21 | HTML |
| 22 | |||
| 23 | def get_latest_version(options, &block) | ||
| 24 | get_npm_version('q', options, &block) | ||
| 25 | end | ||
| 22 | end | 26 | end |
| 23 | end | 27 | end |
| @@ -117,5 +117,12 @@ module Docs · 116 unmodified lines | |||
| 117 | self.release = '5.6' | 117 | self.release = '5.6' |
| 118 | self.base_url = 'https://doc.qt.io/qt-5.6/' | 118 | self.base_url = 'https://doc.qt.io/qt-5.6/' |
| 119 | end | 119 | end |
| 120 | |||
| 121 | def get_latest_version(options, &block) | ||
| 122 | fetch_doc('https://doc.qt.io/qt-5/index.html', options) do |doc| | ||
| 123 | label = doc.at_css('.mainContent h1.title').content | ||
| 124 | block.call label.sub(/Qt /, '') | ||
| 125 | end | ||
| 126 | end | ||
| 120 | end | 127 | end |
| 121 | end | 128 | end |
| @@ -15,6 +15,12 @@ module Docs · 14 unmodified lines | |||
| 15 | © 2013–2016 Scott Sauyet and Michael Hurley<br> | 15 | © 2013–2016 Scott Sauyet and Michael Hurley<br> |
| 16 | Licensed under the MIT License. | 16 | Licensed under the MIT License. |
| 17 | HTML | 17 | HTML |
| 18 | |||
| 19 | def get_latest_version(options, &block) | ||
| 20 | fetch_doc('https://ramdajs.com/docs/', options) do |doc| | ||
| 21 | block.call doc.at_css('.navbar-brand > .version').content[1..-1] | ||
| 22 | end | ||
| 23 | end | ||
| 18 | end | 24 | end |
| 19 | end | 25 | end |
| 20 | 26 | ||
| @@ -30,5 +30,11 @@ module Docs · 29 unmodified lines | |||
| 30 | © 2013–present Facebook Inc.<br> | 30 | © 2013–present Facebook Inc.<br> |
| 31 | Licensed under the Creative Commons Attribution 4.0 International Public License. | 31 | Licensed under the Creative Commons Attribution 4.0 International Public License. |
| 32 | HTML | 32 | HTML |
| 33 | |||
| 34 | def get_latest_version(options, &block) | ||
| 35 | fetch_doc('https://reactjs.org/docs/getting-started.html', options) do |doc| | ||
| 36 | block.call doc.at_css('a[href="/versions"]').content.strip[1..-1] | ||
| 37 | end | ||
| 38 | end | ||
| 33 | end | 39 | end |
| 34 | end | 40 | end |
| @@ -30,5 +30,11 @@ module Docs · 29 unmodified lines | |||
| 30 | © 2015–2018 Facebook Inc.<br> | 30 | © 2015–2018 Facebook Inc.<br> |
| 31 | Licensed under the Creative Commons Attribution 4.0 International Public License. | 31 | Licensed under the Creative Commons Attribution 4.0 International Public License. |
| 32 | HTML | 32 | HTML |
| 33 | |||
| 34 | def get_latest_version(options, &block) | ||
| 35 | fetch_doc('https://facebook.github.io/react-native/docs/getting-started.html', options) do |doc| | ||
| 36 | block.call doc.at_css('header > a > h3').content | ||
| 37 | end | ||
| 38 | end | ||
| 33 | end | 39 | end |
| 34 | end | 40 | end |
| @@ -19,5 +19,12 @@ module Docs · 18 unmodified lines | |||
| 19 | © 2009–2018 Salvatore Sanfilippo<br> | 19 | © 2009–2018 Salvatore Sanfilippo<br> |
| 20 | Licensed under the Creative Commons Attribution-ShareAlike License 4.0. | 20 | Licensed under the Creative Commons Attribution-ShareAlike License 4.0. |
| 21 | HTML | 21 | HTML |
| 22 | |||
| 23 | def get_latest_version(options, &block) | ||
| 24 | fetch('http://download.redis.io/redis-stable/00-RELEASENOTES', options) do |body| | ||
| 25 | body = body.lines[1..-1].join | ||
| 26 | block.call body.scan(/Redis ([0-9.]+)/)[0][0] | ||
| 27 | end | ||
| 28 | end | ||
| 22 | end | 29 | end |
| 23 | end | 30 | end |
| @@ -20,5 +20,9 @@ module Docs · 19 unmodified lines | |||
| 20 | stub '' do | 20 | stub '' do |
| 21 | request_one('http://redux.js.org/index.html').body | 21 | request_one('http://redux.js.org/index.html').body |
| 22 | end | 22 | end |
| 23 | |||
| 24 | def get_latest_version(options, &block) | ||
| 25 | get_npm_version('redux', options, &block) | ||
| 26 | end | ||
| 23 | end | 27 | end |
| 24 | end | 28 | end |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | |||
| 18 | © 2013–present Facebook Inc.<br> | 18 | © 2013–present Facebook Inc.<br> |
| 19 | Licensed under the BSD License. | 19 | Licensed under the BSD License. |
| 20 | HTML | 20 | HTML |
| 21 | |||
| 22 | def get_latest_version(options, &block) | ||
| 23 | fetch_doc('http://facebook.github.io/relay/en/', options) do |doc| | ||
| 24 | block.call doc.at_css('header > a > h3').content[1..-1] | ||
| 25 | end | ||
| 26 | end | ||
| 21 | end | 27 | end |
| 22 | end | 28 | end |
| @@ -30,5 +30,9 @@ module Docs · 29 unmodified lines | |||
| 30 | © jQuery Foundation and other contributors<br> | 30 | © jQuery Foundation and other contributors<br> |
| 31 | Licensed under the MIT License. | 31 | Licensed under the MIT License. |
| 32 | HTML | 32 | HTML |
| 33 | |||
| 34 | def get_latest_version(options, &block) | ||
| 35 | get_npm_version('requirejs', options, &block) | ||
| 36 | end | ||
| 33 | end | 37 | end |
| 34 | end | 38 | end |
| @@ -58,6 +58,12 @@ module Docs · 57 unmodified lines | |||
| 58 | CODE | 58 | CODE |
| 59 | end | 59 | end |
| 60 | 60 | ||
| 61 | def get_latest_version(options, &block) | ||
| 62 | get_latest_github_release('rethinkdb', 'rethinkdb', options) do |release| | ||
| 63 | block.call release['tag_name'][1..-1] | ||
| 64 | end | ||
| 65 | end | ||
| 66 | |||
| 61 | private | 67 | private |
| 62 | 68 | ||
| 63 | def process_response?(response) | 69 | def process_response?(response) |
| @@ -39,6 +39,13 @@ module Docs · 38 unmodified lines | |||
| 39 | Licensed under the Apache License, Version 2.0 or the MIT license, at your option. | 39 | Licensed under the Apache License, Version 2.0 or the MIT license, at your option. |
| 40 | HTML | 40 | HTML |
| 41 | 41 | ||
| 42 | def get_latest_version(options, &block) | ||
| 43 | fetch_doc('https://www.rust-lang.org/', options) do |doc| | ||
| 44 | label = doc.at_css('.button-download + p > a').content | ||
| 45 | block.call label.sub(/Version /, '') | ||
| 46 | end | ||
| 47 | end | ||
| 48 | |||
| 42 | private | 49 | private |
| 43 | 50 | ||
| 44 | REDIRECT_RGX = /http-equiv="refresh"/i | 51 | REDIRECT_RGX = /http-equiv="refresh"/i |
| @@ -23,5 +23,11 @@ module Docs · 22 unmodified lines | |||
| 23 | © 2006–2016 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br> | 23 | © 2006–2016 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br> |
| 24 | Licensed under the MIT License. | 24 | Licensed under the MIT License. |
| 25 | HTML | 25 | HTML |
| 26 | |||
| 27 | def get_latest_version(options, &block) | ||
| 28 | get_github_file_contents('sass', 'sass', 'VERSION', options) do |contents| | ||
| 29 | block.call contents.strip | ||
| 30 | end | ||
| 31 | end | ||
| 26 | end | 32 | end |
| 27 | end | 33 | end |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | |||
| 20 | © 2011 the scikit-image team<br> | 20 | © 2011 the scikit-image team<br> |
| 21 | Licensed under the BSD 3-clause License. | 21 | Licensed under the BSD 3-clause License. |
| 22 | HTML | 22 | HTML |
| 23 | |||
| 24 | def get_latest_version(options, &block) | ||
| 25 | get_github_tags('scikit-image', 'scikit-image', options) do |tags| | ||
| 26 | block.call tags[0]['name'][1..-1] | ||
| 27 | end | ||
| 28 | end | ||
| 23 | end | 29 | end |
| 24 | end | 30 | end |
| @@ -25,5 +25,11 @@ module Docs · 24 unmodified lines | |||
| 25 | Licensed under the 3-clause BSD License. | 25 | Licensed under the 3-clause BSD License. |
| 26 | HTML | 26 | HTML |
| 27 | 27 | ||
| 28 | def get_latest_version(options, &block) | ||
| 29 | fetch_doc('https://scikit-learn.org/stable/documentation.html', options) do |doc| | ||
| 30 | label = doc.at_css('.body h1').content | ||
| 31 | block.call label.scan(/([0-9.]+)/)[0][0] | ||
| 32 | end | ||
| 33 | end | ||
| 28 | end | 34 | end |
| 29 | end | 35 | end |
| @@ -52,5 +52,11 @@ module Docs · 51 unmodified lines | |||
| 52 | self.release = '1.17.7' | 52 | self.release = '1.17.7' |
| 53 | self.base_url = "https://sinonjs.org/releases/v#{release}/" | 53 | self.base_url = "https://sinonjs.org/releases/v#{release}/" |
| 54 | end | 54 | end |
| 55 | |||
| 56 | def get_latest_version(options, &block) | ||
| 57 | fetch('https://sinonjs.org/', options) do |body| | ||
| 58 | block.call body.scan(/\/releases\/v([0-9.]+)/)[0][0] | ||
| 59 | end | ||
| 60 | end | ||
| 55 | end | 61 | end |
| 56 | end | 62 | end |
| @@ -20,5 +20,9 @@ module Docs · 19 unmodified lines | |||
| 20 | © 2014–2015 Automattic<br> | 20 | © 2014–2015 Automattic<br> |
| 21 | Licensed under the MIT License. | 21 | Licensed under the MIT License. |
| 22 | HTML | 22 | HTML |
| 23 | |||
| 24 | def get_latest_version(options, &block) | ||
| 25 | get_npm_version('socket.io', options, &block) | ||
| 26 | end | ||
| 23 | end | 27 | end |
| 24 | end | 28 | end |
| @@ -41,6 +41,12 @@ module Docs · 40 unmodified lines | |||
| 41 | 41 | ||
| 42 | options[:attribution] = 'SQLite is in the Public Domain.' | 42 | options[:attribution] = 'SQLite is in the Public Domain.' |
| 43 | 43 | ||
| 44 | def get_latest_version(options, &block) | ||
| 45 | fetch_doc('https://sqlite.org/chronology.html', options) do |doc| | ||
| 46 | block.call doc.at_css('#chrontab > tbody > tr > td:last-child > a').content | ||
| 47 | end | ||
| 48 | end | ||
| 49 | |||
| 44 | private | 50 | private |
| 45 | 51 | ||
| 46 | def parse(response) | 52 | def parse(response) |
| @@ -21,5 +21,10 @@ module Docs · 20 unmodified lines | |||
| 21 | Licensed under the 3-clause BSD License. | 21 | Licensed under the 3-clause BSD License. |
| 22 | HTML | 22 | HTML |
| 23 | 23 | ||
| 24 | def get_latest_version(options, &block) | ||
| 25 | fetch_doc('http://www.statsmodels.org/stable/', options) do |doc| | ||
| 26 | block.call doc.at_css('.sphinxsidebarwrapper h3 + p > b').content | ||
| 27 | end | ||
| 28 | end | ||
| 24 | end | 29 | end |
| 25 | end | 30 | end |
| @@ -70,5 +70,11 @@ module Docs · 69 unmodified lines | |||
| 70 | self.release = '2.7.35' | 70 | self.release = '2.7.35' |
| 71 | self.base_url = "https://api.symfony.com/#{version}/" | 71 | self.base_url = "https://api.symfony.com/#{version}/" |
| 72 | end | 72 | end |
| 73 | |||
| 74 | def get_latest_version(options, &block) | ||
| 75 | get_latest_github_release('symfony', 'symfony', options) do |release| | ||
| 76 | block.call release['tag_name'][1..-1] | ||
| 77 | end | ||
| 78 | end | ||
| 73 | end | 79 | end |
| 74 | end | 80 | end |
| @@ -25,5 +25,12 @@ module Docs · 24 unmodified lines | |||
| 25 | options[:attribution] = <<-HTML | 25 | options[:attribution] = <<-HTML |
| 26 | Licensed under <a href="http://tcl.tk/software/tcltk/license.html">Tcl/Tk terms</a> | 26 | Licensed under <a href="http://tcl.tk/software/tcltk/license.html">Tcl/Tk terms</a> |
| 27 | HTML | 27 | HTML |
| 28 | |||
| 29 | def get_latest_version(options, &block) | ||
| 30 | fetch_doc('https://www.tcl.tk/man/tcl/contents.htm', options) do |doc| | ||
| 31 | label = doc.at_css('h2').content | ||
| 32 | block.call label.scan(/Tk([0-9.]+)/)[0][0] | ||
| 33 | end | ||
| 34 | end | ||
| 28 | end | 35 | end |
| 29 | end | 36 | end |
| @@ -56,6 +56,12 @@ module Docs · 55 unmodified lines | |||
| 56 | /\Aextend/] | 56 | /\Aextend/] |
| 57 | end | 57 | end |
| 58 | 58 | ||
| 59 | def get_latest_version(options, &block) | ||
| 60 | get_latest_github_release('tensorflow', 'tensorflow', options) do |release| | ||
| 61 | block.call release['tag_name'][1..-1] | ||
| 62 | end | ||
| 63 | end | ||
| 64 | |||
| 59 | private | 65 | private |
| 60 | 66 | ||
| 61 | def parse(response) | 67 | def parse(response) |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | |||
| 18 | © 2018 HashiCorp</br> | 18 | © 2018 HashiCorp</br> |
| 19 | Licensed under the MPL 2.0 License. | 19 | Licensed under the MPL 2.0 License. |
| 20 | HTML | 20 | HTML |
| 21 | |||
| 22 | def get_latest_version(options, &block) | ||
| 23 | get_github_file_contents('hashicorp', 'terraform-website', 'content/config.rb', options) do |contents| | ||
| 24 | block.call contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0] | ||
| 25 | end | ||
| 26 | end | ||
| 21 | end | 27 | end |
| 22 | end | 28 | end |
| @@ -28,5 +28,11 @@ module Docs · 27 unmodified lines | |||
| 28 | self.release = '1.34.3' | 28 | self.release = '1.34.3' |
| 29 | self.base_url = 'https://twig.symfony.com/doc/1.x/' | 29 | self.base_url = 'https://twig.symfony.com/doc/1.x/' |
| 30 | end | 30 | end |
| 31 | |||
| 32 | def get_latest_version(options, &block) | ||
| 33 | get_github_tags('twigphp', 'Twig', options) do |tags| | ||
| 34 | block.call tags[0]['name'][1..-1] | ||
| 35 | end | ||
| 36 | end | ||
| 31 | end | 37 | end |
| 32 | end | 38 | end |
| @@ -24,6 +24,12 @@ module Docs · 23 unmodified lines | |||
| 24 | © Microsoft and other contributors<br> | 24 | © Microsoft and other contributors<br> |
| 25 | Licensed under the Apache License, Version 2.0. | 25 | Licensed under the Apache License, Version 2.0. |
| 26 | HTML | 26 | HTML |
| 27 | |||
| 28 | def get_latest_version(options, &block) | ||
| 29 | get_latest_github_release('Microsoft', 'TypeScript', options) do |release| | ||
| 30 | block.call release['tag_name'][1..-1] | ||
| 31 | end | ||
| 32 | end | ||
| 27 | end | 33 | end |
| 28 | end | 34 | end |
| 29 | 35 | ||
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | |||
| 20 | © 2009–2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors<br> | 20 | © 2009–2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors<br> |
| 21 | Licensed under the MIT License. | 21 | Licensed under the MIT License. |
| 22 | HTML | 22 | HTML |
| 23 | |||
| 24 | def get_latest_version(options, &block) | ||
| 25 | fetch_doc('https://underscorejs.org/', options) do |doc| | ||
| 26 | block.call doc.at_css('.version').content[1...-1] | ||
| 27 | end | ||
| 28 | end | ||
| 23 | end | 29 | end |
| 24 | end | 30 | end |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | |||
| 18 | © 2010–2018 Mitchell Hashimoto<br> | 18 | © 2010–2018 Mitchell Hashimoto<br> |
| 19 | Licensed under the MPL 2.0 License. | 19 | Licensed under the MPL 2.0 License. |
| 20 | HTML | 20 | HTML |
| 21 | |||
| 22 | def get_latest_version(options, &block) | ||
| 23 | get_github_file_contents('hashicorp', 'vagrant', 'website/config.rb', options) do |contents| | ||
| 24 | block.call contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0] | ||
| 25 | end | ||
| 26 | end | ||
| 21 | end | 27 | end |
| 22 | end | 28 | end |
| @@ -32,5 +32,11 @@ module Docs · 31 unmodified lines | |||
| 32 | self.root_path = '/guide/index.html' | 32 | self.root_path = '/guide/index.html' |
| 33 | self.initial_paths = %w(/api/index.html) | 33 | self.initial_paths = %w(/api/index.html) |
| 34 | end | 34 | end |
| 35 | |||
| 36 | def get_latest_version(options, &block) | ||
| 37 | get_latest_github_release('vuejs', 'vue', options) do |release| | ||
| 38 | block.call release['tag_name'][1..-1] | ||
| 39 | end | ||
| 40 | end | ||
| 35 | end | 41 | end |
| 36 | end | 42 | end |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | |||
| 20 | Licensed under the Creative Commons Attribution 4.0 International License.<br> | 20 | Licensed under the Creative Commons Attribution 4.0 International License.<br> |
| 21 | Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc. | 21 | Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc. |
| 22 | HTML | 22 | HTML |
| 23 | |||
| 24 | def get_latest_version(options, &block) | ||
| 25 | get_github_tags('KhronosGroup', 'Vulkan-Docs', options) do |tags| | ||
| 26 | block.call tags[0]['name'][1..-1] | ||
| 27 | end | ||
| 28 | end | ||
| 23 | end | 29 | end |
| 24 | end | 30 | end |
| @@ -68,5 +68,9 @@ module Docs · 67 unmodified lines | |||
| 68 | Licensed under the MIT License. | 68 | Licensed under the MIT License. |
| 69 | HTML | 69 | HTML |
| 70 | end | 70 | end |
| 71 | |||
| 72 | def get_latest_version(options, &block) | ||
| 73 | get_npm_version('webpack', options, &block) | ||
| 74 | end | ||
| 71 | end | 75 | end |
| 72 | end | 76 | end |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | |||
| 20 | © 2016–present Yarn Contributors<br> | 20 | © 2016–present Yarn Contributors<br> |
| 21 | Licensed under the BSD License. | 21 | Licensed under the BSD License. |
| 22 | HTML | 22 | HTML |
| 23 | |||
| 24 | def get_latest_version(options, &block) | ||
| 25 | get_latest_github_release('yarnpkg', 'yarn', options) do |release| | ||
| 26 | block.call release['tag_name'][1..-1] | ||
| 27 | end | ||
| 28 | end | ||
| 23 | end | 29 | end |
| 24 | end | 30 | end |
| @@ -34,5 +34,11 @@ module Docs · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | options[:container] = '.grid_9' | 35 | options[:container] = '.grid_9' |
| 36 | end | 36 | end |
| 37 | |||
| 38 | def get_latest_version(options, &block) | ||
| 39 | get_latest_github_release('yiisoft', 'yii2', options) do |release| | ||
| 40 | block.call release['tag_name'] | ||
| 41 | end | ||
| 42 | end | ||
| 37 | end | 43 | end |
| 38 | end | 44 | end |
| @@ -58,7 +58,7 @@ class UpdatesCLI < Thor · 57 unmodified lines | |||
| 58 | 58 | ||
| 59 | private | 59 | private |
| 60 | 60 | ||
| 61 | def check_doc(doc, options) | 61 | def check_doc(doc, opts) |
| 62 | # Newer scraper versions always come before older scraper versions | 62 | # Newer scraper versions always come before older scraper versions |
| 63 | # Therefore, the first item's release value is the latest scraper version | 63 | # Therefore, the first item's release value is the latest scraper version |
| 64 | # | 64 | # |
| @@ -71,7 +71,7 @@ class UpdatesCLI < Thor · 6 unmodified lines | |||
| 71 | 71 | ||
| 72 | logger.debug("Checking #{doc.name}") | 72 | logger.debug("Checking #{doc.name}") |
| 73 | 73 | ||
| 74 | instance.get_latest_version(options) do |latest_version| | 74 | instance.get_latest_version(opts) do |latest_version| |
| 75 | return { | 75 | return { |
| 76 | name: doc.name, | 76 | name: doc.name, |
| 77 | scraper_version: scraper_version, | 77 | scraper_version: scraper_version, |