devdocs/lib/docs/scrapers/async.rb

27 lines
703 B
Ruby
Raw Normal View History

2016-11-20 17:44:41 +01:00
module Docs
class Async < UrlScraper
self.type = 'async'
2020-11-19 03:21:48 +01:00
self.release = '3.2.0'
2019-09-02 23:47:01 +02:00
self.base_url = 'https://caolan.github.io/async/v3/'
2016-11-20 17:44:41 +01:00
self.root_path = 'docs.html'
self.links = {
home: 'https://caolan.github.io/async/',
code: 'https://github.com/caolan/async'
}
html_filters.push 'async/entries', 'async/clean_html'
options[:skip_links] = true
options[:attribution] = <<-HTML
2018-11-04 15:12:32 +01:00
&copy; 2010&ndash;2018 Caolan McMahon<br>
2016-11-20 17:44:41 +01:00
Licensed under the MIT License.
HTML
2019-03-10 03:02:24 +01:00
def get_latest_version(opts)
doc = fetch_doc('https://caolan.github.io/async/v3/', opts)
2019-03-10 03:02:24 +01:00
doc.at_css('#version-dropdown > a').content.strip[1..-1]
end
2016-11-20 17:44:41 +01:00
end
end