[devdocsgjs/main: 1557/1867] Update Socket.IO documentation (4.0.0)
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1557/1867] Update Socket.IO documentation (4.0.0)
- Date: Fri, 19 Nov 2021 23:48:08 +0000 (UTC)
commit 67f90950ad497e6a0653fd2185b1b0d2499a0537
Author: Simon Legner <Simon Legner gmail com>
Date: Thu Mar 11 19:32:40 2021 +0000
Update Socket.IO documentation (4.0.0)
assets/javascripts/templates/pages/about_tmpl.coffee | 2 +-
lib/docs/filters/socketio/clean_html.rb | 8 ++++++--
lib/docs/filters/socketio/entries.rb | 2 +-
lib/docs/scrapers/socketio.rb | 9 +++++++--
4 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee
b/assets/javascripts/templates/pages/about_tmpl.coffee
index b996a670..a0919a29 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -773,7 +773,7 @@ credits = [
'https://raw.githubusercontent.com/sequelize/sequelize/master/LICENSE'
], [
'Socket.io',
- '2014-2015 Automattic',
+ '2014-2018 Automattic',
'MIT',
'https://raw.githubusercontent.com/Automattic/socket.io/master/LICENSE'
], [
diff --git a/lib/docs/filters/socketio/clean_html.rb b/lib/docs/filters/socketio/clean_html.rb
index d0002c33..ec7da521 100644
--- a/lib/docs/filters/socketio/clean_html.rb
+++ b/lib/docs/filters/socketio/clean_html.rb
@@ -9,12 +9,16 @@ module Docs
end
# version documentation message
- at_css('.warning').remove
+ css('.warning').remove
css('header', 'footer', 'aside').remove
css('pre').each do |node|
- node.content = node.content
+ if node.at_css('.line').nil?
+ node.content = node.content
+ else
+ node.content = node.css('.line').map(&:content).join("\n")
+ end
node['data-language'] = node.content =~ /\A\s*</ ? 'html' : 'javascript'
end
diff --git a/lib/docs/filters/socketio/entries.rb b/lib/docs/filters/socketio/entries.rb
index 240d1921..871bed5d 100644
--- a/lib/docs/filters/socketio/entries.rb
+++ b/lib/docs/filters/socketio/entries.rb
@@ -6,7 +6,7 @@ module Docs
end
def get_type
- if slug =~ /events|room|emit/ && version.eql?('3')
+ if slug =~ /events|room|emit/ && !version.eql?('2')
'Events'
else
'Guides'
diff --git a/lib/docs/scrapers/socketio.rb b/lib/docs/scrapers/socketio.rb
index f3fc8fee..34a88cc3 100644
--- a/lib/docs/scrapers/socketio.rb
+++ b/lib/docs/scrapers/socketio.rb
@@ -14,12 +14,17 @@ module Docs
options[:skip] = %w(/faq /glossary)
options[:attribution] = <<-HTML
- © 2014–2020 Automattic<br>
+ © 2014–2021 Automattic<br>
Licensed under the MIT License.
HTML
+ version '4' do
+ self.release = '4.0.0'
+ self.base_url = "https://socket.io/docs/v#{version}"
+ end
+
version '3' do
- self.release = '3.0.5'
+ self.release = '3.1.2'
self.base_url = "https://socket.io/docs/v#{version}"
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]