devdocs/lib/docs/scrapers/cakephp.rb

68 lines
1.6 KiB
Ruby
Raw Normal View History

2015-11-26 02:55:53 +01:00
module Docs
class Cakephp < UrlScraper
2015-11-26 02:55:53 +01:00
self.name = 'CakePHP'
self.type = 'cakephp'
# self.dir = '/Users/Thibaut/DevDocs/Docs/CakePHP'
2015-11-26 02:55:53 +01:00
self.root_path = 'index.html'
self.links = {
home: 'https://cakephp.org/',
2015-11-26 02:55:53 +01:00
code: 'https://github.com/cakephp/cakephp'
}
html_filters.push 'cakephp/clean_html', 'cakephp/entries'
options[:container] = '#right'
2015-11-26 02:55:53 +01:00
options[:skip_patterns] = [/\Asource-/]
options[:attribution] = <<-HTML
2017-02-18 14:49:46 +01:00
&copy; 2005&ndash;2017 The Cake Software Foundation, Inc.<br>
2016-02-14 18:50:38 +01:00
Licensed under the MIT License.<br>
CakePHP is a registered trademark of Cake Software Foundation, Inc.<br>
We are not endorsed by or affiliated with CakePHP.
2015-11-26 02:55:53 +01:00
HTML
2016-02-14 18:50:38 +01:00
2017-02-18 14:49:46 +01:00
version '3.4' do
self.release = '3.4.1'
self.base_url = 'https://api.cakephp.org/3.4/'
end
version '3.3' do
2017-02-18 14:49:46 +01:00
self.release = '3.3.15'
self.base_url = 'https://api.cakephp.org/3.3/'
end
version '3.2' do
self.release = '3.2.14'
self.base_url = 'https://api.cakephp.org/3.2/'
2016-02-14 18:50:38 +01:00
end
version '3.1' do
self.release = '3.1.13'
self.base_url = 'https://api.cakephp.org/3.1/'
end
version '2.9' do
self.release = '2.9.4'
self.base_url = 'https://api.cakephp.org/2.9/'
2016-02-14 18:50:38 +01:00
end
version '2.8' do
self.release = '2.8.8'
self.base_url = 'https://api.cakephp.org/2.8/'
2016-02-14 18:50:38 +01:00
end
version '2.7' do
self.release = '2.7.11'
self.base_url = 'https://api.cakephp.org/2.7/'
2016-02-14 18:50:38 +01:00
end
private
def parse(string)
string.gsub! '<h5 class="method-name">', '<h3 class="method-name">'
super
end
2015-11-26 02:55:53 +01:00
end
end