Skip to content

Commit c362943

Browse files
committed
Fix broken version checks
1 parent 66dd20d commit c362943

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

lib/docs/scrapers/crystal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def initial_urls
3636

3737
def get_latest_version(opts)
3838
doc = fetch_doc('https://crystal-lang.org/', opts)
39-
doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0]
39+
doc.at_css('.latest-release-info > a > strong').content.scan(/([0-9.]+)/)[0][0]
4040
end
4141
end
4242
end

lib/docs/scrapers/docker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Docker < UrlScraper
9696

9797
def get_latest_version(opts)
9898
doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts)
99-
latest_version = doc.at_css('.content > section > h2').content.strip
99+
latest_version = doc.at_css('.DocSearch-content > h2 > a').content.strip
100100
latest_version.rpartition(' ')[-1]
101101
end
102102
end

lib/docs/scrapers/node.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class Node < UrlScraper
7474
end
7575

7676
def get_latest_version(opts)
77-
doc = fetch_doc('https://nodejs.org/en/', opts)
78-
doc.at_css('#home-intro > .home-downloadblock:last-of-type > a')['data-version'][1..-1]
77+
tags = get_github_tags('nodejs', 'node', opts)
78+
tags[0]['name'][1..-1]
7979
end
8080
end
8181
end

lib/docs/scrapers/octave.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Octave < UrlScraper
5151

5252
def get_latest_version(opts)
5353
doc = fetch_doc('https://octave.org/doc/interpreter/', opts)
54-
doc.at_css('h1').content.scan(/([0-9.]+)/)[0][0]
54+
doc.at_css('#SEC_Top + p').content.scan(/([0-9.]+)/)[1][0][0..-2]
5555
end
5656

5757
end

lib/docs/scrapers/phalcon.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class Phalcon < UrlScraper
3131
end
3232

3333
def get_latest_version(opts)
34-
doc = fetch_doc('https://docs.phalconphp.com/', opts)
35-
doc.at_css('.header__lang.expand > div > ul > li > a').content
34+
tags = get_github_tags('phalcon', 'cphalcon', opts)
35+
tags[0]['name'][1..-1]
3636
end
3737
end
3838
end

lib/docs/scrapers/sanctuary_type_classes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SanctuaryTypeClasses < Github
2323
HTML
2424

2525
def get_latest_version(opts)
26-
get-npm-version("sanctuary-type-classes", opts)
26+
get_npm_version("sanctuary-type-classes", opts)
2727
end
2828
end
2929
end

0 commit comments

Comments
 (0)