History

Update Ansible documentation ()

Simon Legner committed 4 years ago

Commit 2fa27c31 parent 0b8f7c62 files · +7 −2Browse files

Unified · Split

2 files
  1. lib/docs/filters/ansible/entries.rb +3 −2
  2. lib/docs/scrapers/ansible.rb +4 −0
lib/docs/filters/ansible/entries.rb+3−2
@@ -4,11 +4,12 @@ module Docs · 3 unmodified lines
44 def get_name
55 name = at_css('h1').content.strip
66 name.remove! "\u{00B6}"
7+ name.remove! "\u{f0c1}"
78 name.remove! %r{ \- .*}
89 name.remove! 'Introduction To '
910 name.remove! %r{ Guide\z}
1011
11− if version == "2.10"
12+ if version >= "2.10" || version == ""
1213 if slug =~ /\Acollections\// and slug !~ /index$/
1314 name = name.split('.')[2]
1415 end
@@ -28,7 +29,7 @@ module Docs · 13 unmodified lines
2829 end
2930 end
3031
31− if version >= "2.10"
32+ if version >= "2.10" || version == ""
3233 if slug =~ /\Acollections\//
3334 return "Collection #{slug.split('/')[1..-2].join(".")}"
3435 end
lib/docs/scrapers/ansible.rb+4−0
@@ -32,6 +32,10 @@ module Docs · 31 unmodified lines
3232 /\Aroadmap.*/i,
3333 ]
3434
35+ version do
36+ self.base_url = "https://docs.ansible.com/ansible/latest/"
37+ end
38+
3539 version '2.11' do
3640 self.release = '2.11.0'
3741 self.base_url = "https://docs.ansible.com/ansible/#{version}/"