devdocs/lib/docs/scrapers/zig.rb
2024-06-12 21:04:59 +02:00

25 lines
639 B
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Docs
class Zig < UrlScraper
self.name = 'Zig'
self.type = 'simple'
self.release = '0.13.0'
self.base_url = "https://ziglang.org/documentation/#{self.release}/"
self.links = {
home: 'https://ziglang.org/',
code: 'https://github.com/ziglang/zig'
}
html_filters.push 'zig/entries', 'zig/clean_html'
options[:follow_links] = false
options[:attribution] = <<-HTML
&copy; 20152024, Zig contributors<br>
Licensed under the MIT License.
HTML
def get_latest_version(opts)
tags = get_github_tags('ziglang', 'zig', opts)
tags[0]['name']
end
end
end