Update Socket.IO documentation (4.0.0)

pull/1500/head
Simon Legner 4 years ago
parent 006b12dc2d
commit 67f90950ad

@ -773,7 +773,7 @@ credits = [
'https://raw.githubusercontent.com/sequelize/sequelize/master/LICENSE' 'https://raw.githubusercontent.com/sequelize/sequelize/master/LICENSE'
], [ ], [
'Socket.io', 'Socket.io',
'2014-2015 Automattic', '2014-2018 Automattic',
'MIT', 'MIT',
'https://raw.githubusercontent.com/Automattic/socket.io/master/LICENSE' 'https://raw.githubusercontent.com/Automattic/socket.io/master/LICENSE'
], [ ], [

@ -9,12 +9,16 @@ module Docs
end end
# version documentation message # version documentation message
at_css('.warning').remove css('.warning').remove
css('header', 'footer', 'aside').remove css('header', 'footer', 'aside').remove
css('pre').each do |node| css('pre').each do |node|
if node.at_css('.line').nil?
node.content = node.content node.content = node.content
else
node.content = node.css('.line').map(&:content).join("\n")
end
node['data-language'] = node.content =~ /\A\s*</ ? 'html' : 'javascript' node['data-language'] = node.content =~ /\A\s*</ ? 'html' : 'javascript'
end end

@ -6,7 +6,7 @@ module Docs
end end
def get_type def get_type
if slug =~ /events|room|emit/ && version.eql?('3') if slug =~ /events|room|emit/ && !version.eql?('2')
'Events' 'Events'
else else
'Guides' 'Guides'

@ -14,12 +14,17 @@ module Docs
options[:skip] = %w(/faq /glossary) options[:skip] = %w(/faq /glossary)
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2014&ndash;2020 Automattic<br> &copy; 2014&ndash;2021 Automattic<br>
Licensed under the MIT License. Licensed under the MIT License.
HTML HTML
version '4' do
self.release = '4.0.0'
self.base_url = "https://socket.io/docs/v#{version}"
end
version '3' do version '3' do
self.release = '3.0.5' self.release = '3.1.2'
self.base_url = "https://socket.io/docs/v#{version}" self.base_url = "https://socket.io/docs/v#{version}"
end end

Loading…
Cancel
Save