Unified · Split
| @@ -61,7 +61,7 @@ In addition to the [guidelines for contributing code](#contributing-code-and-fea · 60 unmodified lines | ||
| 61 | 61 | |
| 62 | 62 | Please don't submit a pull request updating the version number of a documentation, unless a change is required in the scraper and you've verified that it works. |
| 63 | 63 | |
| 64 | −To ask that an existing documentation be updated, first check the last two [Documentation versions reports](https://github.com/freeCodeCamp/devdocs/issues?utf8=%E2%9C%93&q=Documentation+versions+report+is%3Aissue+author%3Adevdocs-bot+sort%3Aupdated-desc). Only create an issue if the documentation has been wrongly marked as up-to-date for at least 2 reports (a new report is automatically created every month). | |
| 64 | +To ask that an existing documentation be updated, first check the last two [Documentation versions reports](https://github.com/freeCodeCamp/devdocs/issues?utf8=%E2%9C%93&q=Documentation+versions+report+is%3Aissue+author%3Adevdocs-bot+sort%3Aupdated-desc). Only create an issue if the documentation has been wrongly marked as up-to-date. | |
| 65 | 65 | |
| 66 | 66 | ## Coding conventions |
| 67 | 67 | |
| @@ -19,7 +19,7 @@ module Docs · 18 unmodified lines | ||
| 19 | 19 | HTML |
| 20 | 20 | |
| 21 | 21 | def get_latest_version(opts) |
| 22 | − doc = fetch_doc('https://caolan.github.io/async/', opts) | |
| 22 | + doc = fetch_doc('https://caolan.github.io/async/v3/', opts) | |
| 23 | 23 | doc.at_css('#version-dropdown > a').content.strip[1..-1] |
| 24 | 24 | end |
| 25 | 25 | end |
| @@ -100,13 +100,8 @@ module Docs · 99 unmodified lines | ||
| 100 | 100 | end |
| 101 | 101 | |
| 102 | 102 | def get_latest_version(opts) |
| 103 | − doc = fetch_doc('http://cgit.drupalcode.org/drupal', opts) | |
| 104 | − | |
| 105 | − version = doc.at_css('td.form > form > select > option[selected]').content | |
| 106 | − version = version.scan(/([0-9.]+)/)[0][0] | |
| 107 | − version = version[0...-1] if version.end_with?('.') | |
| 108 | − | |
| 109 | − version | |
| 103 | + json = fetch_json('https://packagist.org/packages/drupal/drupal.json', opts) | |
| 104 | + json['package']['versions'].keys.find {|version| !version.end_with?('-dev')} | |
| 110 | 105 | end |
| 111 | 106 | end |
| 112 | 107 | end |
| @@ -45,8 +45,9 @@ module Docs · 44 unmodified lines | ||
| 45 | 45 | end |
| 46 | 46 | |
| 47 | 47 | def get_latest_version(opts) |
| 48 | − body = fetch('https://perldoc.perl.org/static/perlversion.js', opts) | |
| 49 | − body.scan(/>Perl ([0-9.]+)/)[0][0] | |
| 48 | + doc = fetch_doc('https://perldoc.perl.org/', opts) | |
| 49 | + header = doc.at_css('h2.h1').content | |
| 50 | + header.scan(/Perl ([0-9.]+)/)[0][0] | |
| 50 | 51 | end |
| 51 | 52 | end |
| 52 | 53 | end |
| @@ -32,7 +32,7 @@ module Docs · 31 unmodified lines | ||
| 32 | 32 | |
| 33 | 33 | def get_latest_version(opts) |
| 34 | 34 | doc = fetch_doc('https://docs.phalconphp.com/', opts) |
| 35 | − doc.at_css('.custom-select__version').content.strip.sub(/Version /, '') | |
| 35 | + doc.at_css('.header__lang.expand > div > ul > li > a').content | |
| 36 | 36 | end |
| 37 | 37 | end |
| 38 | 38 | end |
| @@ -25,7 +25,7 @@ module Docs · 24 unmodified lines | ||
| 25 | 25 | HTML |
| 26 | 26 | |
| 27 | 27 | def get_latest_version(opts) |
| 28 | − get_github_file_contents('sass', 'sass', 'VERSION', opts).strip | |
| 28 | + get_latest_github_release('sass', 'libsass', opts)['tag_name'] | |
| 29 | 29 | end |
| 30 | 30 | end |
| 31 | 31 | end |
| @@ -23,7 +23,7 @@ module Docs · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | def get_latest_version(opts) |
| 25 | 25 | doc = fetch_doc('http://www.statsmodels.org/stable/', opts) |
| 26 | − doc.at_css('.sphinxsidebarwrapper h3 + p > b').content | |
| 26 | + doc.at_css('.sphinxsidebarwrapper h3 + p > b').content[1..-1] | |
| 27 | 27 | end |
| 28 | 28 | end |
| 29 | 29 | end |
| @@ -139,7 +139,7 @@ class UpdatesCLI < Thor · 138 unmodified lines | ||
| 139 | 139 | def upload_results(outdated_results, up_to_date_results, failed_results) |
| 140 | 140 | # We can't create issues without a GitHub token |
| 141 | 141 | unless options.key?(:github_token) |
| 142 | − logger.error('Please specify a GitHub token with the public_repo permission for devdocs-bot with the --github-token parameter') | |
| 142 | + logger.error("Please specify a GitHub token with the public_repo permission for #{UPLOAD_USER} with the --github-token parameter") | |
| 143 | 143 | return |
| 144 | 144 | end |
| 145 | 145 | |