composer: finish scraper and filters

pull/879/head
Jasper van Merle 6 years ago
parent a1c8ed2909
commit ce5f182014

@ -188,9 +188,9 @@ credits = [
'https://raw.githubusercontent.com/jashkenas/coffeescript/master/LICENSE'
], [
'Composer',
'2012-2018 Nils Adermann, Jordi Boggiano',
'Nils Adermann, Jordi Boggiano',
'MIT',
'https://github.com/composer/composer/blob/master/LICENSE'
'https://raw.githubusercontent.com/composer/composer/master/LICENSE'
], [
'Cordova',
'2012-2018 The Apache Software Foundation',

@ -3,15 +3,12 @@ module Docs
class EntriesFilter < Docs::EntriesFilter
def get_name
title = at_css('h1').content
title = "#{Integer(subpath[1]) + 1}. #{title}" if type == 'Book'
title
end
def get_type
return 'Articles' if subpath.start_with?('articles/')
'Book'
end

@ -1,8 +1,8 @@
module Docs
class Composer < UrlScraper
self.name = 'Composer'
self.type = 'simple'
self.release = '1.9.0'
self.base_url = 'https://getcomposer.org/doc/'
self.links = {
home: 'https://getcomposer.org',
code: 'https://github.com/composer/composer'
@ -10,9 +10,6 @@ module Docs
html_filters.push 'composer/clean_html', 'composer/entries'
self.release = '1.7.2'
self.base_url = 'https://getcomposer.org/doc/'
options[:container] = '#main'
options[:skip_patterns] = [
@ -23,5 +20,9 @@ module Docs
&copy; Nils Adermann, Jordi Boggiano<br>
Licensed under the MIT License.
HTML
def get_latest_version(opts)
get_latest_github_release('composer', 'composer', opts)
end
end
end

Loading…
Cancel
Save