[devdocsgjs/main: 938/1867] Fix version blocks and update patch version
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 938/1867] Fix version blocks and update patch version
- Date: Fri, 19 Nov 2021 23:47:36 +0000 (UTC)
commit f47326e787005097bade8098f0adfd87229c971e
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Fri Oct 4 18:44:44 2019 +0200
Fix version blocks and update patch version
lib/docs/scrapers/crystal.rb | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb
index 6c98dd4e..166be2f9 100644
--- a/lib/docs/scrapers/crystal.rb
+++ b/lib/docs/scrapers/crystal.rb
@@ -2,7 +2,6 @@ module Docs
class Crystal < UrlScraper
self.type = 'crystal'
self.base_url = 'https://crystal-lang.org/'
- self.root_path = "api/#{release}/index.html"
self.initial_paths = %w(docs/index.html)
self.links = {
home: 'https://crystal-lang.org/',
@@ -11,14 +10,6 @@ module Docs
html_filters.push 'crystal/entries', 'crystal/clean_html'
- options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//]
- options[:skip_patterns] = [/debug/i]
-
- options[:replace_paths] = {
- "api/#{release}/" => "api/#{release}/index.html",
- 'docs/' => 'docs/index.html'
- }
-
options[:attribution] = ->(filter) {
if filter.slug.start_with?('docs')
<<-HTML
@@ -35,11 +26,29 @@ module Docs
}
version '0.31' do
- self.release = '0.31.0'
+ self.release = '0.31.1'
+ self.root_path = "api/#{release}/index.html"
+
+ options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//]
+ options[:skip_patterns] = [/debug/i]
+
+ options[:replace_paths] = {
+ "api/#{release}/" => "api/#{release}/index.html",
+ 'docs/' => 'docs/index.html'
+ }
end
version '0.30' do
self.release = '0.30.1'
+ self.root_path = "api/#{release}/index.html"
+
+ options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//]
+ options[:skip_patterns] = [/debug/i]
+
+ options[:replace_paths] = {
+ "api/#{release}/" => "api/#{release}/index.html",
+ 'docs/' => 'docs/index.html'
+ }
end
def get_latest_version(opts)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]