File tree Expand file tree Collapse file tree 7 files changed +9
-9
lines changed
Expand file tree Collapse file tree 7 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ def url_for(path)
150150 if path . empty? || path == '/'
151151 root_url . to_s
152152 else
153- File . join ( base_url . to_s , path )
153+ File . join ( base_url . to_s , path . to_s )
154154 end
155155 end
156156
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Cppref < UrlScraper
2323
2424 # Check if the 'headers' page has changed
2525 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 )
2727 date = doc . at_css ( '#footer-info-lastmod' ) . content
2828 date = date . match ( /[[:digit:]]{1,2} .* [[:digit:]]{4}/ ) . to_s
2929 date = DateTime . strptime ( date , '%e %B %Y' ) . to_time . to_i
Original file line number Diff line number Diff 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 > h1[id^="version-"] ' ) . content . strip
99+ latest_version = doc . at_css ( '.content > section > h2 ' ) . content . strip
100100 latest_version . rpartition ( ' ' ) [ -1 ]
101101 end
102102 end
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class Electron < UrlScraper
2727
2828 def get_latest_version ( opts )
2929 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 ]
3131 end
3232 end
3333end
Original file line number Diff line number Diff line change @@ -156,8 +156,8 @@ class Gcc < Gnu
156156
157157 def get_latest_version ( opts )
158158 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 ]
161161 end
162162 end
163163end
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ class GnuFortran < Gnu
5353
5454 def get_latest_version ( opts )
5555 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 ]
5858 end
5959 end
6060end
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class ReactBootstrap < UrlScraper
2929
3030 def get_latest_version ( opts )
3131 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 ]
3333 end
3434 end
3535end
You can’t perform that action at this time.
0 commit comments