|
|
@@ -1,80 +1,60 @@
|
|
|
module Docs
|
|
|
class Scala < FileScraper
|
|
|
- include FixInternalUrlsBehavior
|
|
|
-
|
|
|
- self.name = 'scala'
|
|
|
+ self.name = 'Scala'
|
|
|
self.type = 'scala'
|
|
|
self.links = {
|
|
|
home: 'http://www.scala-lang.org/',
|
|
|
code: 'https://github.com/scala/scala'
|
|
|
}
|
|
|
|
|
|
- version '2.12 Library' do
|
|
|
- self.release = '2.12.3'
|
|
|
- self.dir = '/Users/Thibaut/DevDocs/Docs/Scala212/api/scala-library' # https://downloads.lightbend.com/scala/2.12.3/scala-docs-2.12.3.zip
|
|
|
- self.base_url = 'http://www.scala-lang.org/api/2.12.3/'
|
|
|
+ options[:container] = '#content-container'
|
|
|
+ options[:attribution] = <<-HTML
|
|
|
+ © 2002-2019 EPFL, with contributions from Lightbend.
|
|
|
+ HTML
|
|
|
+
|
|
|
+ # https://downloads.lightbend.com/scala/2.13.0/scala-docs-2.13.0.zip
|
|
|
+ # Extract api/scala-library into docs/scala~2.13_library
|
|
|
+ version '2.13 Library' do
|
|
|
+ self.release = '2.13.0'
|
|
|
+ self.base_url = 'https://www.scala-lang.org/api/2.13.0/'
|
|
|
self.root_path = 'index.html'
|
|
|
- options[:attribution] = <<-HTML
|
|
|
- Scala programming documentation. Copyright (c) 2003-2017 <a
|
|
|
- href="http://www.epfl.ch" target="_blank">EPFL</a>, with contributions from <a
|
|
|
- href="http://www.lightbend.com" target="_blank">Lightbend</a>.
|
|
|
- HTML
|
|
|
- html_filters.push 'scala/entries', 'scala/clean_html', 'scala/clean_html_212'
|
|
|
+
|
|
|
+ html_filters.push 'scala/entries', 'scala/clean_html'
|
|
|
end
|
|
|
|
|
|
- version '2.12 Reflection' do
|
|
|
- self.release = '2.12.3'
|
|
|
- self.dir = '/Users/Thibaut/DevDocs/Docs/Scala212/api/scala-reflect' # https://downloads.lightbend.com/scala/2.12.3/scala-docs-2.12.3.zip
|
|
|
- self.base_url = 'http://www.scala-lang.org/api/2.12.3/scala-reflect/'
|
|
|
+ # https://downloads.lightbend.com/scala/2.13.0/scala-docs-2.13.0.zip
|
|
|
+ # Extract api/scala-reflect into docs/scala~2.13_reflection
|
|
|
+ version '2.13 Reflection' do
|
|
|
+ self.release = '2.13.0'
|
|
|
+ self.base_url = 'https://www.scala-lang.org/api/2.13.0/scala-reflect/'
|
|
|
self.root_path = 'index.html'
|
|
|
- options[:attribution] = <<-HTML
|
|
|
- Scala programming documentation. Copyright (c) 2003-2017 <a
|
|
|
- href="http://www.epfl.ch" target="_blank">EPFL</a>, with contributions from <a
|
|
|
- href="http://www.lightbend.com" target="_blank">Lightbend</a>.
|
|
|
- HTML
|
|
|
- html_filters.push 'scala/entries', 'scala/clean_html', 'scala/clean_html_212'
|
|
|
+
|
|
|
+ html_filters.push 'scala/entries', 'scala/clean_html'
|
|
|
end
|
|
|
|
|
|
- version '2.11 Library' do
|
|
|
- self.release = '2.11.8'
|
|
|
- self.dir = '/Users/Thibaut/DevDocs/Docs/Scala211/api/scala-library' # https://downloads.lightbend.com/scala/2.11.8/scala-docs-2.11.8.zip
|
|
|
- self.base_url = 'http://www.scala-lang.org/api/2.11.8/'
|
|
|
- self.root_path = 'package.html'
|
|
|
- options[:skip_patterns] = [/^index.html/, /index\/index-/]
|
|
|
- options[:attribution] = <<-HTML
|
|
|
- Scala programming documentation. Copyright (c) 2003-2016 <a
|
|
|
- href="http://www.epfl.ch" target="_blank">EPFL</a>, with contributions from <a
|
|
|
- href="http://www.lightbend.com" target="_blank">Lightbend</a>.
|
|
|
- HTML
|
|
|
- html_filters.push 'scala/entries', 'scala/clean_html', 'scala/clean_html_210'
|
|
|
+ # https://downloads.lightbend.com/scala/2.12.6/scala-docs-2.12.6.zip
|
|
|
+ # Extract api/scala-library into docs/scala~2.12_library
|
|
|
+ version '2.12 Library' do
|
|
|
+ self.release = '2.12.6'
|
|
|
+ self.base_url = 'https://www.scala-lang.org/api/2.12.6/'
|
|
|
+ self.root_path = 'index.html'
|
|
|
+
|
|
|
+ html_filters.push 'scala/entries', 'scala/clean_html'
|
|
|
end
|
|
|
|
|
|
- version '2.11 Reflection' do
|
|
|
- self.release = '2.11.8'
|
|
|
- self.dir = '/Users/Thibaut/DevDocs/Docs/Scala211/api/scala-reflect' # https://downloads.lightbend.com/scala/2.11.8/scala-docs-2.11.8.zip
|
|
|
- self.base_url = 'http://www.scala-lang.org/api/2.11.8/scala-reflect/'
|
|
|
- self.root_path = 'package.html'
|
|
|
- options[:skip_patterns] = [/^index.html/, /index\/index-/]
|
|
|
- options[:attribution] = <<-HTML
|
|
|
- Scala programming documentation. Copyright (c) 2003-2016 <a
|
|
|
- href="http://www.epfl.ch" target="_blank">EPFL</a>, with contributions from <a
|
|
|
- href="http://www.lightbend.com" target="_blank">Lightbend</a>.
|
|
|
- HTML
|
|
|
- html_filters.push 'scala/entries', 'scala/clean_html', 'scala/clean_html_210'
|
|
|
+ # https://downloads.lightbend.com/scala/2.12.6/scala-docs-2.12.6.zip
|
|
|
+ # Extract api/scala-reflect into docs/scala~2.12_reflection
|
|
|
+ version '2.12 Reflection' do
|
|
|
+ self.release = '2.12.6'
|
|
|
+ self.base_url = 'https://www.scala-lang.org/api/2.12.6/scala-reflect/'
|
|
|
+ self.root_path = 'index.html'
|
|
|
+
|
|
|
+ html_filters.push 'scala/entries', 'scala/clean_html'
|
|
|
end
|
|
|
|
|
|
- version '2.10' do
|
|
|
- self.release = '2.10.6'
|
|
|
- self.dir = '/Users/Thibaut/DevDocs/Docs/Scala210' # https://downloads.lightbend.com/scala/2.10.6/scala-docs-2.10.6.zip
|
|
|
- self.base_url = 'http://www.scala-lang.org/api/2.10.6/'
|
|
|
- self.root_path = 'package.html'
|
|
|
- options[:skip_patterns] = [/^index.html/, /index\/index-/]
|
|
|
- options[:attribution] = <<-HTML
|
|
|
- Scala programming documentation. Copyright (c) 2003-2013 <a
|
|
|
- href="http://www.epfl.ch" target="_blank">EPFL</a>, with contributions from <a
|
|
|
- href="http://typesafe.com" target="_blank">Typesafe</a>.
|
|
|
- HTML
|
|
|
- html_filters.push 'scala/entries', 'scala/clean_html', 'scala/clean_html_210'
|
|
|
+ def get_latest_version(opts)
|
|
|
+ doc = fetch_doc('https://www.scala-lang.org/api/current/', opts)
|
|
|
+ doc.at_css('#doc-version').content
|
|
|
end
|
|
|
end
|
|
|
end
|