Kaynağa Gözat

(ramda) $! make docs generatable again

Alex Bepple 5 ay önce
ebeveyn
işleme
2b035804da

+ 3 - 1
lib/docs/filters/ramda/entries.rb

@@ -3,7 +3,9 @@ module Docs
     class EntriesFilter < Docs::EntriesFilter
       def additional_entries
         css('ul.toc li').map do |node|
-          ["R.#{node['data-name']}", node['data-name'], node['data-category'].sub('Relaction', 'Relation')]
+          # As of 2025-06-20, `data-category` attribute is missing on https://ramdajs.com/ for Ramda versions < 0.29.0.
+          # This results in missing type for entries – and docs cannot be generated.
+          ["R.#{node['data-name']}", node['data-name'], node['data-category']]
         end
       end
     end

+ 2 - 2
lib/docs/scrapers/ramda.rb

@@ -1,7 +1,7 @@
 module Docs
   class Ramda < UrlScraper
     self.type = 'ramda'
-    self.release = '0.27.0'
+    self.release = '0.29.0'
     self.base_url = "https://ramdajs.com/#{release}/docs/"
     self.links = {
       home: 'http://ramdajs.com/',
@@ -12,7 +12,7 @@ module Docs
 
     options[:title] = 'Ramda'
     options[:attribution] = <<-HTML
-      &copy; 2013&ndash;2020 Scott Sauyet and Michael Hurley<br>
+      &copy; 2013&ndash;2024 Scott Sauyet and Michael Hurley<br>
       Licensed under the MIT License.
     HTML