|
|
@ -14,14 +14,14 @@ module Docs
|
|
|
|
options[:skip_links] = true
|
|
|
|
options[:skip_links] = true
|
|
|
|
|
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
© 2010–2019 Vladimir Agafonkin<br>
|
|
|
|
© 2010–2021 Vladimir Agafonkin<br>
|
|
|
|
© 2010–2011, CloudMade<br>
|
|
|
|
© 2010–2011, CloudMade<br>
|
|
|
|
Maps © OpenStreetMap contributors.
|
|
|
|
Maps © OpenStreetMap contributors.
|
|
|
|
HTML
|
|
|
|
HTML
|
|
|
|
|
|
|
|
|
|
|
|
version '1.7' do
|
|
|
|
version '1.7' do
|
|
|
|
self.release = '1.7.1'
|
|
|
|
self.release = '1.7.1'
|
|
|
|
self.base_url = "https://leafletjs.com/reference-#{release}.html"
|
|
|
|
self.base_url = "https://leafletjs.com/reference.html"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
version '1.6' do
|
|
|
|
version '1.6' do
|
|
|
@ -60,9 +60,9 @@ module Docs
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def get_latest_version(opts)
|
|
|
|
def get_latest_version(opts)
|
|
|
|
doc = fetch_doc('https://leafletjs.com/index.html', opts)
|
|
|
|
doc = fetch_doc('https://leafletjs.com/reference-versions.html', opts)
|
|
|
|
link = doc.css('ul > li > a').to_a.select {|node| node.content == 'Docs'}.first
|
|
|
|
link = doc.at_css('.container > ul > li:last-child > a').content
|
|
|
|
link['href'].scan(/reference-([0-9.]+)\.html/)[0][0]
|
|
|
|
link.sub(/[a-zA-Z\s]*/, '')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|