Skip to content

Commit 131007f

Browse files
authored
Merge pull request #2526 from alexbepple/ramda
Ramda
2 parents fb62266 + 57a9f0c commit 131007f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/docs/filters/ramda/entries.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ class Ramda
33
class EntriesFilter < Docs::EntriesFilter
44
def additional_entries
55
css('ul.toc li').map do |node|
6-
["R.#{node['data-name']}", node['data-name'], node['data-category'].sub('Relaction', 'Relation')]
6+
# As of 2025-06-20, `data-category` attribute is missing on https://ramdajs.com/ for Ramda versions < 0.29.0.
7+
# This results in missing type for entries – and docs cannot be generated.
8+
["R.#{node['data-name']}", node['data-name'], node['data-category']]
79
end
810
end
911
end

lib/docs/scrapers/ramda.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module Docs
22
class Ramda < UrlScraper
33
self.type = 'ramda'
4-
self.release = '0.27.0'
5-
self.base_url = "https://ramdajs.com/#{release}/docs/"
64
self.links = {
75
home: 'http://ramdajs.com/',
86
code: 'https://github.com/ramda/ramda/'
@@ -12,13 +10,17 @@ class Ramda < UrlScraper
1210

1311
options[:title] = 'Ramda'
1412
options[:attribution] = <<-HTML
15-
&copy; 2013&ndash;2020 Scott Sauyet and Michael Hurley<br>
13+
&copy; 2013&ndash;2025 Scott Sauyet and Michael Hurley<br>
1614
Licensed under the MIT License.
1715
HTML
1816

17+
version do
18+
self.release = '0.31.3'
19+
self.base_url = "https://ramdajs.com/#{release}/docs/"
20+
end
21+
1922
def get_latest_version(opts)
20-
doc = fetch_doc('https://ramdajs.com/docs/', opts)
21-
doc.at_css('.navbar-brand > .version').content[1..-1]
23+
get_npm_version('ramda', opts)
2224
end
2325
end
2426
end

0 commit comments

Comments
 (0)