Skip to content

Commit ce5f182

Browse files
committed
composer: finish scraper and filters
1 parent a1c8ed2 commit ce5f182

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ credits = [
188188
'https://raw.githubusercontent.com/jashkenas/coffeescript/master/LICENSE'
189189
], [
190190
'Composer',
191-
'2012-2018 Nils Adermann, Jordi Boggiano',
191+
'Nils Adermann, Jordi Boggiano',
192192
'MIT',
193-
'https://github.com/composer/composer/blob/master/LICENSE'
193+
'https://raw.githubusercontent.com/composer/composer/master/LICENSE'
194194
], [
195195
'Cordova',
196196
'2012-2018 The Apache Software Foundation',

lib/docs/filters/composer/entries.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ class Composer
33
class EntriesFilter < Docs::EntriesFilter
44
def get_name
55
title = at_css('h1').content
6-
76
title = "#{Integer(subpath[1]) + 1}. #{title}" if type == 'Book'
8-
97
title
108
end
119

1210
def get_type
1311
return 'Articles' if subpath.start_with?('articles/')
14-
1512
'Book'
1613
end
1714

lib/docs/scrapers/composer.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
module Docs
22
class Composer < UrlScraper
3-
self.name = 'Composer'
43
self.type = 'simple'
5-
4+
self.release = '1.9.0'
5+
self.base_url = 'https://getcomposer.org/doc/'
66
self.links = {
77
home: 'https://getcomposer.org',
88
code: 'https://github.com/composer/composer'
99
}
1010

1111
html_filters.push 'composer/clean_html', 'composer/entries'
1212

13-
self.release = '1.7.2'
14-
self.base_url = 'https://getcomposer.org/doc/'
15-
1613
options[:container] = '#main'
1714

1815
options[:skip_patterns] = [
@@ -23,5 +20,9 @@ class Composer < UrlScraper
2320
&copy; Nils Adermann, Jordi Boggiano<br>
2421
Licensed under the MIT License.
2522
HTML
23+
24+
def get_latest_version(opts)
25+
get_latest_github_release('composer', 'composer', opts)
26+
end
2627
end
2728
end

0 commit comments

Comments
 (0)