Unified · Split
| @@ -150,7 +150,7 @@ module Docs · 149 unmodified lines | ||
| 150 | 150 | if path.empty? || path == '/' |
| 151 | 151 | root_url.to_s |
| 152 | 152 | else |
| 153 | − File.join(base_url.to_s, path) | |
| 153 | + File.join(base_url.to_s, path.to_s) | |
| 154 | 154 | end |
| 155 | 155 | end |
| 156 | 156 | |
| @@ -23,7 +23,7 @@ module Docs · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | # Check if the 'headers' page has changed |
| 25 | 25 | def get_latest_version(opts) |
| 26 | − doc = fetch_doc(self.base_url + self.root_path, opts) | |
| 26 | + doc = fetch_doc((self.base_url + self.root_path).to_s, opts) | |
| 27 | 27 | date = doc.at_css('#footer-info-lastmod').content |
| 28 | 28 | date = date.match(/[[:digit:]]{1,2} .* [[:digit:]]{4}/).to_s |
| 29 | 29 | date = DateTime.strptime(date, '%e %B %Y').to_time.to_i |
| @@ -96,7 +96,7 @@ module Docs · 95 unmodified lines | ||
| 96 | 96 | |
| 97 | 97 | def get_latest_version(opts) |
| 98 | 98 | doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts) |
| 99 | − latest_version = doc.at_css('.content > section > h1[id^="version-"]').content.strip | |
| 99 | + latest_version = doc.at_css('.content > section > h2').content.strip | |
| 100 | 100 | latest_version.rpartition(' ')[-1] |
| 101 | 101 | end |
| 102 | 102 | end |
| @@ -27,7 +27,7 @@ module Docs · 26 unmodified lines | ||
| 27 | 27 | |
| 28 | 28 | def get_latest_version(opts) |
| 29 | 29 | doc = fetch_doc('https://www.electronjs.org/releases/stable', opts) |
| 30 | − doc.at_css(".tag").content.gsub!(/[a-zA-Z]/, '') | |
| 30 | + doc.at_css('.release-card__metadata>a')['href'].gsub!(/[a-zA-Z\/:]/, '')[1..-1] | |
| 31 | 31 | end |
| 32 | 32 | end |
| 33 | 33 | end |
| @@ -156,8 +156,8 @@ module Docs · 155 unmodified lines | ||
| 156 | 156 | |
| 157 | 157 | def get_latest_version(opts) |
| 158 | 158 | doc = fetch_doc('https://gcc.gnu.org/onlinedocs/', opts) |
| 159 | − label = doc.at_css('ul > li > ul > li > a').content.strip | |
| 160 | − label.scan(/([0-9.]+)/)[0][0] | |
| 159 | + label = doc.at_css('details > ul > li > a')['href'].strip | |
| 160 | + label.scan(/([0-9.]+)/)[2..-1][0][0] | |
| 161 | 161 | end |
| 162 | 162 | end |
| 163 | 163 | end |
| @@ -53,8 +53,8 @@ module Docs · 52 unmodified lines | ||
| 53 | 53 | |
| 54 | 54 | def get_latest_version(opts) |
| 55 | 55 | doc = fetch_doc('https://gcc.gnu.org/onlinedocs/', opts) |
| 56 | − label = doc.at_css('ul > li > ul > li > a').content.strip | |
| 57 | − label.scan(/([0-9.]+)/)[0][0] | |
| 56 | + label = doc.at_css('details > ul > li > a')['href'].strip | |
| 57 | + label.scan(/([0-9.]+)/)[2..-1][0][0] | |
| 58 | 58 | end |
| 59 | 59 | end |
| 60 | 60 | end |
| @@ -29,7 +29,7 @@ module Docs · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | def get_latest_version(opts) |
| 31 | 31 | doc = fetch_doc('https://react-bootstrap.github.io/', opts) |
| 32 | − doc.at_css('#t-version>a').content.split()[0].strip[1..-1] | |
| 32 | + doc.at_css('.my-2').content.split()[-1].strip[0..-1] | |
| 33 | 33 | end |
| 34 | 34 | end |
| 35 | 35 | end |