devdocs/lib/docs/scrapers/async.rb

27 lines
697 B
Ruby
Raw Normal View History

2016-11-20 17:44:41 +01:00
module Docs
class Async < UrlScraper
self.type = 'async'
2018-11-04 15:12:32 +01:00
self.release = '2.6.1'
2016-11-20 17:44:41 +01:00
self.base_url = 'https://caolan.github.io/async/'
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/', opts)
doc.at_css('#version-dropdown > a').content.strip[1..-1]
end
2016-11-20 17:44:41 +01:00
end
end