History

Update multiple "current version" checks

ClasherKasten committed 3 years ago

Commit 2943d691 parent f8161057 files · +9 −9Browse files

Showing the changes to lib/docs/scrapers/cppref/cppref.rb (1 of 7 files). Show all

Unified · Split

lib/docs/scrapers/cppref/cppref.rb+1−1
@@ -23,7 +23,7 @@ module Docs · 22 unmodified lines
23 23
24 # Check if the 'headers' page has changed24 # Check if the 'headers' page has changed
25 def get_latest_version(opts)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 date = doc.at_css('#footer-info-lastmod').content27 date = doc.at_css('#footer-info-lastmod').content
28 date = date.match(/[[:digit:]]{1,2} .* [[:digit:]]{4}/).to_s28 date = date.match(/[[:digit:]]{1,2} .* [[:digit:]]{4}/).to_s
29 date = DateTime.strptime(date, '%e %B %Y').to_time.to_i29 date = DateTime.strptime(date, '%e %B %Y').to_time.to_i