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
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 def additional_entries4 def additional_entries
5 css('ul.toc li').map do |node|5 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']]
7 end9 end
8 end10 end
9 end11 end
lib/docs/scrapers/ramda.rb+2−2
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Ramda < UrlScraper2 class Ramda < UrlScraper
3 self.type = 'ramda'3 self.type = 'ramda'
4 self.release = '0.27.0'4 self.release = '0.29.0'
5 self.base_url = "https://ramdajs.com/#{release}/docs/"5 self.base_url = "https://ramdajs.com/#{release}/docs/"
6 self.links = {6 self.links = {
7 home: 'http://ramdajs.com/',7 home: 'http://ramdajs.com/',
@@ -12,7 +12,7 @@ module Docs · 4 unmodified lines
12 12
13 options[:title] = 'Ramda'13 options[:title] = 'Ramda'
14 options[:attribution] = <<-HTML14 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>
16 Licensed under the MIT License.16 Licensed under the MIT License.
17 HTML17 HTML
18 18