mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
4 years ago
|
module Docs
|
||
|
class Groovy < UrlScraper
|
||
|
self.type = 'groovy'
|
||
|
self.root_path = 'overview-summary.html'
|
||
|
self.links = {
|
||
|
home: 'https://groovy-lang.org/',
|
||
|
code: 'https://github.com/apache/groovy'
|
||
|
}
|
||
|
|
||
|
html_filters.push 'groovy/clean_html', 'groovy/entries'
|
||
|
|
||
|
options[:skip] = %w(
|
||
|
index-all.html
|
||
|
deprecated-list.html
|
||
|
help-doc.html
|
||
|
)
|
||
|
options[:skip_patterns] = [
|
||
|
/\Aindex.html/
|
||
|
]
|
||
|
|
||
|
options[:attribution] = <<-HTML
|
||
|
© 2003-2020 The Apache Software Foundation<br>
|
||
|
Licensed under the Apache license.
|
||
|
HTML
|
||
|
|
||
|
version '3.0' do
|
||
|
self.release = '3.0.7'
|
||
|
self.base_url = "https://docs.groovy-lang.org/#{self.release}/html/gapi/"
|
||
|
end
|
||
|
|
||
|
version '2.5' do
|
||
|
self.release = '2.5.14'
|
||
|
self.base_url = "https://docs.groovy-lang.org/#{self.release}/html/gapi/"
|
||
|
end
|
||
|
|
||
|
version '2.4' do
|
||
|
self.release = '2.4.21'
|
||
|
self.base_url = "https://docs.groovy-lang.org/#{self.release}/html/gapi/"
|
||
|
end
|
||
|
|
||
|
def get_latest_version(opts)
|
||
|
doc = fetch_doc('https://groovy.apache.org/download.html', opts)
|
||
|
doc.at_css('#big-download-button').content.split(' ').last
|
||
|
end
|
||
|
end
|
||
|
end
|