History

(ramda) $! make docs generatable again

Alex Bepple committed 1 year ago

Commit 2b035801 parent 11f10722 files · +5 −3Browse files

Unified · Split

2 files
  1. lib/docs/filters/ramda/entries.rb +3 −1
  2. lib/docs/scrapers/ramda.rb +2 −2
lib/docs/filters/ramda/entries.rb+3−1
@@ -3,7 +3,9 @@ module Docs · 2 unmodified lines
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+2−2
@@ -1,7 +1,7 @@
11 module Docs
22 class Ramda < UrlScraper
33 self.type = 'ramda'
4− self.release = '0.27.0'
4+ self.release = '0.29.0'
55 self.base_url = "https://ramdajs.com/#{release}/docs/"
66 self.links = {
77 home: 'http://ramdajs.com/',
@@ -12,7 +12,7 @@ module Docs · 4 unmodified lines
1212
1313 options[:title] = 'Ramda'
1414 options[:attribution] = <<-HTML
15− &copy; 2013&ndash;2020 Scott Sauyet and Michael Hurley<br>
15+ &copy; 2013&ndash;2024 Scott Sauyet and Michael Hurley<br>
1616 Licensed under the MIT License.
1717 HTML
1818