Skip to content

Commit f60fa84

Browse files
committed
Update and version Elixir documentation (1.4.0, 1.3.3)
1 parent 55ea7e3 commit f60fa84

3 files changed

Lines changed: 38 additions & 15 deletions

File tree

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ credits = [
221221
'https://raw.githubusercontent.com/emberjs/ember.js/master/LICENSE'
222222
], [
223223
'Elixir',
224-
'2012-2016 Plataformatec',
224+
'2012-2017 Plataformatec',
225225
'Apache',
226226
'https://raw.githubusercontent.com/elixir-lang/elixir/master/LICENSE'
227227
], [

lib/docs/filters/elixir/clean_html.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def api
3737
end
3838

3939
css('.details-list').each do |list|
40-
type = list['id'].remove(/s\z/)
40+
type = list['id'].remove(/s\z/) if list['id']
4141
list.css('.detail-header').each do |node|
4242
node.name = 'h3'
43-
node['class'] += " #{type}"
43+
node['class'] += " #{type}" if type
4444
end
4545
end
4646

lib/docs/scrapers/elixir.rb

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@ class Elixir < UrlScraper
44

55
self.name = 'Elixir'
66
self.type = 'elixir'
7-
self.release = '1.3.4'
8-
self.base_urls = ['http://elixir-lang.org/docs/stable/', 'http://elixir-lang.org/getting-started/']
9-
self.root_path = 'elixir/api-reference.html'
10-
self.initial_paths = %w(
11-
eex/EEx.html
12-
ex_unit/ExUnit.html
13-
iex/IEx.html
14-
logger/Logger.html
15-
mix/Mix.html
16-
)
7+
self.root_path = 'api-reference.html'
178
self.links = {
189
home: 'http://elixir-lang.org/',
1910
code: 'https://github.com/elixir-lang/elixir'
@@ -28,12 +19,44 @@ class Elixir < UrlScraper
2819
options[:root_title] = 'Elixir'
2920

3021
options[:attribution] = <<-HTML
31-
&copy; 2012&ndash;2016 Plataformatec<br>
22+
&copy; 2012&ndash;2017 Plataformatec<br>
3223
Licensed under the Apache License, Version 2.0.
3324
HTML
3425

3526
def initial_urls
36-
super.tap { |urls| urls.last << 'introduction.html' }
27+
[ "https://hexdocs.pm/elixir/#{self.class.release}/api-reference.html",
28+
"https://hexdocs.pm/eex/#{self.class.release}/EEx.html",
29+
"https://hexdocs.pm/ex_unit/#{self.class.release}/ExUnit.html",
30+
"https://hexdocs.pm/iex/#{self.class.release}/IEx.html",
31+
"https://hexdocs.pm/logger/#{self.class.release}/Logger.html",
32+
"https://hexdocs.pm/mix/#{self.class.release}/Mix.html",
33+
"http://elixir-lang.org/getting-started/introduction.html" ]
34+
end
35+
36+
version '1.4' do
37+
self.release = '1.4.0'
38+
self.base_urls = [
39+
"https://hexdocs.pm/elixir/#{release}/",
40+
"https://hexdocs.pm/eex/#{release}/",
41+
"https://hexdocs.pm/ex_unit/#{release}/",
42+
"https://hexdocs.pm/iex/#{release}/",
43+
"https://hexdocs.pm/logger/#{release}/",
44+
"https://hexdocs.pm/mix/#{release}/",
45+
'http://elixir-lang.org/getting-started/'
46+
]
47+
end
48+
49+
version '1.3' do
50+
self.release = '1.3.3'
51+
self.base_urls = [
52+
"https://hexdocs.pm/elixir/#{release}/",
53+
"https://hexdocs.pm/eex/#{release}/",
54+
"https://hexdocs.pm/ex_unit/#{release}/",
55+
"https://hexdocs.pm/iex/#{release}/",
56+
"https://hexdocs.pm/logger/#{release}/",
57+
"https://hexdocs.pm/mix/#{release}/",
58+
'http://elixir-lang.org/getting-started/'
59+
]
3760
end
3861
end
3962
end

0 commit comments

Comments
 (0)