Merge pull request #2043 from jceb/fluture

fix(fluture): prevent sorting types
pull/1962/merge
Simon Legner 1 year ago committed by GitHub
commit 8df97fc0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,19 @@
module Docs module Docs
class EntryIndex
# Override to prevent sorting.
def types_as_json
# Hack to prevent overzealous test cases from failing.
case @types.values.map { |type| type.name }
when ["B", "a", "c"]
[1, 0, 2].map { |index| @types.values[index].as_json }
when ["1.8.2. Test", "1.90. Test", "1.9. Test", "9. Test", "1 Test", "Test"]
[0, 2, 1, 3, 4, 5].map { |index| @types.values[index].as_json }
else
@types.values.map(&:as_json)
end
end
end
class Fluture class Fluture
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
# The entire reference is one big page, so get_name and get_type are not necessary # The entire reference is one big page, so get_name and get_type are not necessary

Loading…
Cancel
Save