History

Merge pull request #1425 from MasterEnoc/octave

Update Octave to 5.2.0 and add version 6

Simon Legner committed 5 years ago

Commit 39313ea2 parents f43b073 ee6a0221 file · +15 −5Browse files

Unified · Split

lib/docs/scrapers/octave.rb+15−5
@@ -2,8 +2,6 @@ module Docs · 1 unmodified line
2 class Octave < UrlScraper2 class Octave < UrlScraper
3 self.name = 'Octave'3 self.name = 'Octave'
4 self.type = 'octave'4 self.type = 'octave'
5 self.release = '5.1.0'
6 self.base_url = 'https://octave.org/doc/interpreter/'
7 self.root_path = 'index.html'5 self.root_path = 'index.html'
8 self.links = {6 self.links = {
9 home: 'http://www.octave.org/',7 home: 'http://www.octave.org/',
@@ -21,18 +19,30 @@ module Docs · 11 unmodified lines
21 Distribution.html)19 Distribution.html)
22 20
23 options[:title] = false21 options[:title] = false
22
24 options[:root_title] = 'GNU Octave'23 options[:root_title] = 'GNU Octave'
25 24
26 options[:attribution] = <<-HTML25 options[:attribution] = <<-HTML
27 &copy; 1996&ndash;2018 John W. Eaton<br>26 &copy; 1996&ndash;2020 John W. Eaton<br>
28 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.<br/>27 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.<br/>
29Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.</br>28 Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.</br>
30Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.29 Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
31 HTML30 HTML
32 31
32 version '6' do
33 self.release = '6.1.0'
34 self.base_url = "https://octave.org/doc/v#{self.release}/"
35 end
36
37 version '5' do
38 self.release = '5.2.0'
39 self.base_url = "https://octave.org/doc/v#{self.release}/"
40 end
41
33 def get_latest_version(opts)42 def get_latest_version(opts)
34 doc = fetch_doc('https://octave.org/doc/interpreter/', opts)43 doc = fetch_doc('https://octave.org/doc/interpreter/', opts)
35 doc.at_css('h1').content.scan(/([0-9.]+)/)[0][0]44 doc.at_css('h1').content.scan(/([0-9.]+)/)[0][0]
36 end45 end
46
37 end47 end
38end48end