lib/commonmeta/utils.rb in commonmeta-ruby-3.2.0 vs lib/commonmeta/utils.rb in commonmeta-ruby-3.2.1

- old
+ new

@@ -467,11 +467,11 @@ elsif %r{\A(http|https):/(/)?github\.com/(.+)/CITATION.cff\z}.match?(id) "cff" elsif %r{\A(http|https):/(/)?github\.com/(.+)\z}.match?(id) "cff" elsif %r{\A(http|https):/(/)?rogue-scholar\.org/api/posts/(.+)\z}.match?(id) - "json_post" + "json_feed_item" else "schema_org" end end @@ -875,11 +875,11 @@ "propertyID" => identifier["relatedIdentifierType"], "value" => identifier["relatedIdentifier"], } end - def from_json_post(element) + def from_json_feed(element) mapping = { "url" => "id" } map_hash_keys(element: element, mapping: mapping) end @@ -1377,8 +1377,12 @@ Base32::URL.encode(random_int, checksum: true) end def decode_container_id(id) Base32::URL.decode(id) + end + + def json_feed_url(id) + "https://rogue-scholar.org/api/blogs/#{id}" end end end