Skip to content

Commit 67f9095

Browse files
committed
Update Socket.IO documentation (4.0.0)
1 parent 006b12d commit 67f9095

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ credits = [
773773
'https://raw.githubusercontent.com/sequelize/sequelize/master/LICENSE'
774774
], [
775775
'Socket.io',
776-
'2014-2015 Automattic',
776+
'2014-2018 Automattic',
777777
'MIT',
778778
'https://raw.githubusercontent.com/Automattic/socket.io/master/LICENSE'
779779
], [

lib/docs/filters/socketio/clean_html.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ def call
99
end
1010

1111
# version documentation message
12-
at_css('.warning').remove
12+
css('.warning').remove
1313

1414
css('header', 'footer', 'aside').remove
1515

1616
css('pre').each do |node|
17-
node.content = node.content
17+
if node.at_css('.line').nil?
18+
node.content = node.content
19+
else
20+
node.content = node.css('.line').map(&:content).join("\n")
21+
end
1822
node['data-language'] = node.content =~ /\A\s*</ ? 'html' : 'javascript'
1923
end
2024

lib/docs/filters/socketio/entries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def get_name
66
end
77

88
def get_type
9-
if slug =~ /events|room|emit/ && version.eql?('3')
9+
if slug =~ /events|room|emit/ && !version.eql?('2')
1010
'Events'
1111
else
1212
'Guides'

lib/docs/scrapers/socketio.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ class Socketio < UrlScraper
1414
options[:skip] = %w(/faq /glossary)
1515

1616
options[:attribution] = <<-HTML
17-
&copy; 2014&ndash;2020 Automattic<br>
17+
&copy; 2014&ndash;2021 Automattic<br>
1818
Licensed under the MIT License.
1919
HTML
2020

21+
version '4' do
22+
self.release = '4.0.0'
23+
self.base_url = "https://socket.io/docs/v#{version}"
24+
end
25+
2126
version '3' do
22-
self.release = '3.0.5'
27+
self.release = '3.1.2'
2328
self.base_url = "https://socket.io/docs/v#{version}"
2429
end
2530

0 commit comments

Comments
 (0)