Unified · Split
| @@ -25,5 +25,12 @@ module Docs · 24 unmodified lines | ||
| 25 | 25 | © 2011-2018 Nginx, Inc.<br> |
| 26 | 26 | Licensed under the BSD License. |
| 27 | 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 | 35 | end |
| 29 | 36 | end |
| @@ -4,6 +4,9 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | self.slug = 'nginx_lua_module' |
| 5 | 5 | self.release = '0.10.13' |
| 6 | 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 | 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 | 18 | © 2009–2018 Yichun "agentzh" Zhang (章亦春), OpenResty Inc.<br> |
| 16 | 19 | Licensed under the BSD License. |
| 17 | 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 | 28 | end |
| 19 | 29 | end |
| @@ -17,5 +17,11 @@ module Docs · 16 unmodified lines | ||
| 17 | 17 | © 2006–2018 Andreas Rumpf<br> |
| 18 | 18 | Licensed under the MIT License. |
| 19 | 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 | 26 | end |
| 21 | 27 | end |
| @@ -46,5 +46,11 @@ module Docs · 45 unmodified lines | ||
| 46 | 46 | self.release = '4.9.1' |
| 47 | 47 | self.base_url = 'https://nodejs.org/dist/latest-v4.x/docs/api/' |
| 48 | 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 | 55 | end |
| 50 | 56 | end |
| @@ -19,5 +19,11 @@ module Docs · 18 unmodified lines | ||
| 19 | 19 | Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid, Lars Kanis<br> |
| 20 | 20 | Licensed under the MIT License. |
| 21 | 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 | 28 | end |
| 23 | 29 | end |
| @@ -29,5 +29,11 @@ module Docs · 28 unmodified lines | ||
| 29 | 29 | Licensed under the npm License.<br> |
| 30 | 30 | npm is a trademark of npm, Inc. |
| 31 | 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 | 38 | end |
| 33 | 39 | end |
| @@ -49,5 +49,11 @@ module Docs · 48 unmodified lines | ||
| 49 | 49 | self.release = '1.10.4' |
| 50 | 50 | self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/" |
| 51 | 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 | 58 | end |
| 53 | 59 | end |
| @@ -86,5 +86,26 @@ module Docs · 85 unmodified lines | ||
| 86 | 86 | def read_file(path) |
| 87 | 87 | File.read(path).force_encoding('iso-8859-1').encode('utf-8') rescue nil |
| 88 | 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 | 110 | end |
| 90 | 111 | end |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | ||
| 18 | 18 | © 2010–2016 The OpenTSDB Authors<br> |
| 19 | 19 | Licensed under the GNU LGPLv2.1+ and GPLv3+ licenses. |
| 20 | 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 | 27 | end |
| 22 | 28 | end |
| @@ -23,5 +23,11 @@ module Docs · 22 unmodified lines | ||
| 23 | 23 | stub 'index2' do |
| 24 | 24 | request_one(url_for('index')).body |
| 25 | 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 | 32 | end |
| 27 | 33 | end |
| @@ -49,5 +49,12 @@ module Docs · 48 unmodified lines | ||
| 49 | 49 | self.release = '0.18.1' |
| 50 | 50 | self.base_url = "http://pandas.pydata.org/pandas-docs/version/#{self.release}/" |
| 51 | 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 | 59 | end |
| 53 | 60 | end |
| @@ -43,5 +43,11 @@ module Docs · 42 unmodified lines | ||
| 43 | 43 | self.release = '5.20.2' |
| 44 | 44 | self.base_url = "https://perldoc.perl.org/#{self.release}/" |
| 45 | 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 | 52 | end |
| 47 | 53 | end |
| @@ -29,5 +29,11 @@ module Docs · 28 unmodified lines | ||
| 29 | 29 | self.release = '2.0.13' |
| 30 | 30 | self.base_url = 'https://docs.phalconphp.com/en/2.0.0/' |
| 31 | 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 | 38 | end |
| 33 | 39 | end |
| @@ -25,5 +25,11 @@ module Docs · 24 unmodified lines | ||
| 25 | 25 | © 2016 Richard Davey, Photon Storm Ltd.<br> |
| 26 | 26 | Licensed under the MIT License. |
| 27 | 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 | 34 | end |
| 29 | 35 | end |
| @@ -46,5 +46,11 @@ module Docs · 45 unmodified lines | ||
| 46 | 46 | HTML |
| 47 | 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 | 55 | end |
| 50 | 56 | end |
| @@ -66,5 +66,12 @@ module Docs · 65 unmodified lines | ||
| 66 | 66 | © 1997–2018 The PHP Documentation Group<br> |
| 67 | 67 | Licensed under the Creative Commons Attribution License v3.0 or later. |
| 68 | 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 | 76 | end |
| 70 | 77 | end |
| @@ -37,5 +37,12 @@ module Docs · 36 unmodified lines | ||
| 37 | 37 | self.release = '4.8' |
| 38 | 38 | self.base_url = "https://phpunit.de/manual/#{release}/en/" |
| 39 | 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 | 47 | end |
| 41 | 48 | end |
| @@ -80,5 +80,12 @@ module Docs · 79 unmodified lines | ||
| 80 | 80 | |
| 81 | 81 | html_filters.insert_before 'postgresql/extract_metadata', 'postgresql/normalize_class_names' |
| 82 | 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 | 90 | end |
| 84 | 91 | end |
| @@ -18,6 +18,10 @@ module Docs · 17 unmodified lines | ||
| 18 | 18 | Licensed under the MIT license. |
| 19 | 19 | HTML |
| 20 | 20 | |
| 21 | + def get_latest_version(options, &block) | |
| 22 | + get_npm_version('pug', options, &block) | |
| 23 | + end | |
| 24 | + | |
| 21 | 25 | private |
| 22 | 26 | |
| 23 | 27 | def parse(response) # Hook here because Nokogori removes whitespace from textareas |
| @@ -14,5 +14,11 @@ module Docs · 13 unmodified lines | ||
| 14 | 14 | © 2017 Google Inc<br> |
| 15 | 15 | Licensed under the Apache License 2.0. |
| 16 | 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 | 23 | end |
| 18 | 24 | end |
| @@ -17,5 +17,11 @@ module Docs · 16 unmodified lines | ||
| 17 | 17 | © Pygame Developpers.<br> |
| 18 | 18 | Licensed under the GNU LGPL License version 2.1. |
| 19 | 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 | 26 | end |
| 21 | 27 | end |
| @@ -50,5 +50,11 @@ module Docs · 49 unmodified lines | ||
| 50 | 50 | |
| 51 | 51 | html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html' |
| 52 | 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 | 59 | end |
| 54 | 60 | end |
| @@ -19,5 +19,9 @@ module Docs · 18 unmodified lines | ||
| 19 | 19 | © 2009–2017 Kristopher Michael Kowal<br> |
| 20 | 20 | Licensed under the MIT License. |
| 21 | 21 | HTML |
| 22 | + | |
| 23 | + def get_latest_version(options, &block) | |
| 24 | + get_npm_version('q', options, &block) | |
| 25 | + end | |
| 22 | 26 | end |
| 23 | 27 | end |
| @@ -117,5 +117,12 @@ module Docs · 116 unmodified lines | ||
| 117 | 117 | self.release = '5.6' |
| 118 | 118 | self.base_url = 'https://doc.qt.io/qt-5.6/' |
| 119 | 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 | 127 | end |
| 121 | 128 | end |
| @@ -15,6 +15,12 @@ module Docs · 14 unmodified lines | ||
| 15 | 15 | © 2013–2016 Scott Sauyet and Michael Hurley<br> |
| 16 | 16 | Licensed under the MIT License. |
| 17 | 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 | 24 | end |
| 19 | 25 | end |
| 20 | 26 | |
| @@ -30,5 +30,11 @@ module Docs · 29 unmodified lines | ||
| 30 | 30 | © 2013–present Facebook Inc.<br> |
| 31 | 31 | Licensed under the Creative Commons Attribution 4.0 International Public License. |
| 32 | 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 | 39 | end |
| 34 | 40 | end |
| @@ -30,5 +30,11 @@ module Docs · 29 unmodified lines | ||
| 30 | 30 | © 2015–2018 Facebook Inc.<br> |
| 31 | 31 | Licensed under the Creative Commons Attribution 4.0 International Public License. |
| 32 | 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 | 39 | end |
| 34 | 40 | end |
| @@ -19,5 +19,12 @@ module Docs · 18 unmodified lines | ||
| 19 | 19 | © 2009–2018 Salvatore Sanfilippo<br> |
| 20 | 20 | Licensed under the Creative Commons Attribution-ShareAlike License 4.0. |
| 21 | 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 | 29 | end |
| 23 | 30 | end |
| @@ -20,5 +20,9 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | stub '' do |
| 21 | 21 | request_one('http://redux.js.org/index.html').body |
| 22 | 22 | end |
| 23 | + | |
| 24 | + def get_latest_version(options, &block) | |
| 25 | + get_npm_version('redux', options, &block) | |
| 26 | + end | |
| 23 | 27 | end |
| 24 | 28 | end |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | ||
| 18 | 18 | © 2013–present Facebook Inc.<br> |
| 19 | 19 | Licensed under the BSD License. |
| 20 | 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 | 27 | end |
| 22 | 28 | end |
| @@ -30,5 +30,9 @@ module Docs · 29 unmodified lines | ||
| 30 | 30 | © jQuery Foundation and other contributors<br> |
| 31 | 31 | Licensed under the MIT License. |
| 32 | 32 | HTML |
| 33 | + | |
| 34 | + def get_latest_version(options, &block) | |
| 35 | + get_npm_version('requirejs', options, &block) | |
| 36 | + end | |
| 33 | 37 | end |
| 34 | 38 | end |
| @@ -58,6 +58,12 @@ module Docs · 57 unmodified lines | ||
| 58 | 58 | CODE |
| 59 | 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 | 67 | private |
| 62 | 68 | |
| 63 | 69 | def process_response?(response) |
| @@ -39,6 +39,13 @@ module Docs · 38 unmodified lines | ||
| 39 | 39 | Licensed under the Apache License, Version 2.0 or the MIT license, at your option. |
| 40 | 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 | 49 | private |
| 43 | 50 | |
| 44 | 51 | REDIRECT_RGX = /http-equiv="refresh"/i |
| @@ -23,5 +23,11 @@ module Docs · 22 unmodified lines | ||
| 23 | 23 | © 2006–2016 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br> |
| 24 | 24 | Licensed under the MIT License. |
| 25 | 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 | 32 | end |
| 27 | 33 | end |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | © 2011 the scikit-image team<br> |
| 21 | 21 | Licensed under the BSD 3-clause License. |
| 22 | 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 | 29 | end |
| 24 | 30 | end |
| @@ -25,5 +25,11 @@ module Docs · 24 unmodified lines | ||
| 25 | 25 | Licensed under the 3-clause BSD License. |
| 26 | 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 | 34 | end |
| 29 | 35 | end |
| @@ -52,5 +52,11 @@ module Docs · 51 unmodified lines | ||
| 52 | 52 | self.release = '1.17.7' |
| 53 | 53 | self.base_url = "https://sinonjs.org/releases/v#{release}/" |
| 54 | 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 | 61 | end |
| 56 | 62 | end |
| @@ -20,5 +20,9 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | © 2014–2015 Automattic<br> |
| 21 | 21 | Licensed under the MIT License. |
| 22 | 22 | HTML |
| 23 | + | |
| 24 | + def get_latest_version(options, &block) | |
| 25 | + get_npm_version('socket.io', options, &block) | |
| 26 | + end | |
| 23 | 27 | end |
| 24 | 28 | end |
| @@ -41,6 +41,12 @@ module Docs · 40 unmodified lines | ||
| 41 | 41 | |
| 42 | 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 | 50 | private |
| 45 | 51 | |
| 46 | 52 | def parse(response) |
| @@ -21,5 +21,10 @@ module Docs · 20 unmodified lines | ||
| 21 | 21 | Licensed under the 3-clause BSD License. |
| 22 | 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 | 29 | end |
| 25 | 30 | end |
| @@ -70,5 +70,11 @@ module Docs · 69 unmodified lines | ||
| 70 | 70 | self.release = '2.7.35' |
| 71 | 71 | self.base_url = "https://api.symfony.com/#{version}/" |
| 72 | 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 | 79 | end |
| 74 | 80 | end |
| @@ -25,5 +25,12 @@ module Docs · 24 unmodified lines | ||
| 25 | 25 | options[:attribution] = <<-HTML |
| 26 | 26 | Licensed under <a href="http://tcl.tk/software/tcltk/license.html">Tcl/Tk terms</a> |
| 27 | 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 | 35 | end |
| 29 | 36 | end |
| @@ -56,6 +56,12 @@ module Docs · 55 unmodified lines | ||
| 56 | 56 | /\Aextend/] |
| 57 | 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 | 65 | private |
| 60 | 66 | |
| 61 | 67 | def parse(response) |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | ||
| 18 | 18 | © 2018 HashiCorp</br> |
| 19 | 19 | Licensed under the MPL 2.0 License. |
| 20 | 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 | 27 | end |
| 22 | 28 | end |
| @@ -28,5 +28,11 @@ module Docs · 27 unmodified lines | ||
| 28 | 28 | self.release = '1.34.3' |
| 29 | 29 | self.base_url = 'https://twig.symfony.com/doc/1.x/' |
| 30 | 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 | 37 | end |
| 32 | 38 | end |
| @@ -24,6 +24,12 @@ module Docs · 23 unmodified lines | ||
| 24 | 24 | © Microsoft and other contributors<br> |
| 25 | 25 | Licensed under the Apache License, Version 2.0. |
| 26 | 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 | 33 | end |
| 28 | 34 | end |
| 29 | 35 | |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | © 2009–2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors<br> |
| 21 | 21 | Licensed under the MIT License. |
| 22 | 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 | 29 | end |
| 24 | 30 | end |
| @@ -18,5 +18,11 @@ module Docs · 17 unmodified lines | ||
| 18 | 18 | © 2010–2018 Mitchell Hashimoto<br> |
| 19 | 19 | Licensed under the MPL 2.0 License. |
| 20 | 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 | 27 | end |
| 22 | 28 | end |
| @@ -32,5 +32,11 @@ module Docs · 31 unmodified lines | ||
| 32 | 32 | self.root_path = '/guide/index.html' |
| 33 | 33 | self.initial_paths = %w(/api/index.html) |
| 34 | 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 | 41 | end |
| 36 | 42 | end |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | Licensed under the Creative Commons Attribution 4.0 International License.<br> |
| 21 | 21 | Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc. |
| 22 | 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 | 29 | end |
| 24 | 30 | end |
| @@ -68,5 +68,9 @@ module Docs · 67 unmodified lines | ||
| 68 | 68 | Licensed under the MIT License. |
| 69 | 69 | HTML |
| 70 | 70 | end |
| 71 | + | |
| 72 | + def get_latest_version(options, &block) | |
| 73 | + get_npm_version('webpack', options, &block) | |
| 74 | + end | |
| 71 | 75 | end |
| 72 | 76 | end |
| @@ -20,5 +20,11 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | © 2016–present Yarn Contributors<br> |
| 21 | 21 | Licensed under the BSD License. |
| 22 | 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 | 29 | end |
| 24 | 30 | end |
| @@ -34,5 +34,11 @@ module Docs · 33 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | options[:container] = '.grid_9' |
| 36 | 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 | 43 | end |
| 38 | 44 | end |
| @@ -58,7 +58,7 @@ class UpdatesCLI < Thor · 57 unmodified lines | ||
| 58 | 58 | |
| 59 | 59 | private |
| 60 | 60 | |
| 61 | − def check_doc(doc, options) | |
| 61 | + def check_doc(doc, opts) | |
| 62 | 62 | # Newer scraper versions always come before older scraper versions |
| 63 | 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 | 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 | 75 | return { |
| 76 | 76 | name: doc.name, |
| 77 | 77 | scraper_version: scraper_version, |