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.
25 lines
767 B
25 lines
767 B
module Docs
|
|
class Bash < FileScraper
|
|
self.type = 'bash'
|
|
self.release = '5.1'
|
|
self.base_url = 'https://www.gnu.org/software/bash/manual/html_node'
|
|
self.root_path = 'index.html'
|
|
self.links = {
|
|
home: 'https://www.gnu.org/software/bash/',
|
|
code: 'http://git.savannah.gnu.org/cgit/bash.git'
|
|
}
|
|
|
|
html_filters.push 'bash/entries', 'bash/clean_html'
|
|
|
|
options[:attribution] = <<-HTML
|
|
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>
|
|
Licensed under the GNU Free Documentation License.
|
|
HTML
|
|
|
|
def get_latest_version(opts)
|
|
body = fetch('https://www.gnu.org/software/bash/manual/html_node/index.html', opts)
|
|
body.scan(/, Version ([0-9.]+)/)[0][0][0...-1]
|
|
end
|
|
end
|
|
end
|