diff --git a/.tool-versions b/.tool-versions
new file mode 100644
index 00000000..a4023dc7
--- /dev/null
+++ b/.tool-versions
@@ -0,0 +1 @@
+ruby 2.7.5
diff --git a/Gemfile.lock b/Gemfile.lock
index 07f5d01b..f27ca553 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- briard (2.0.2)
+ briard (2.1)
activesupport (>= 4.2.5)
benchmark_methods (~> 0.7)
bibtex-ruby (>= 5.1.0)
diff --git a/README.md b/README.md
index c6db0323..1ca9b097 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,13 @@ Briard reads and/or writes these metadata formats:
Yes |
Yes |
+
+ CFF |
+ citation file format (cff) |
+ application/vnd.cff+yaml |
+ Yes |
+ No |
+
JATS |
jats |
diff --git a/lib/briard/metadata.rb b/lib/briard/metadata.rb
index 63346d29..3801bb25 100644
--- a/lib/briard/metadata.rb
+++ b/lib/briard/metadata.rb
@@ -43,7 +43,7 @@ def initialize(options={})
elsif options[:input].present? && File.exist?(options[:input])
filename = File.basename(options[:input])
ext = File.extname(options[:input])
- if %w(.bib .ris .xml .json).include?(ext)
+ if %w(.bib .ris .xml .json .cff).include?(ext)
hsh = {
"url" => options[:url],
"state" => options[:state],
@@ -83,7 +83,7 @@ def initialize(options={})
end
# make sure input is encoded as utf8
- string = string.force_encoding("UTF-8") if string.present?
+ string = string.force_encoding("UTF-8") if string.present? && string.is_a?(String)
@string = string
# input options for citation formatting
diff --git a/lib/briard/metadata_utils.rb b/lib/briard/metadata_utils.rb
index 82e51819..ad0f2d4c 100644
--- a/lib/briard/metadata_utils.rb
+++ b/lib/briard/metadata_utils.rb
@@ -8,6 +8,7 @@
require_relative 'readers/bibtex_reader'
require_relative 'readers/citeproc_reader'
+require_relative 'readers/cff_reader'
require_relative 'readers/codemeta_reader'
require_relative 'readers/crosscite_reader'
require_relative 'readers/crossref_reader'
@@ -20,6 +21,7 @@
require_relative 'writers/bibtex_writer'
require_relative 'writers/citation_writer'
require_relative 'writers/citeproc_writer'
+# require_relative 'writers/cff_writer'
require_relative 'writers/codemeta_writer'
require_relative 'writers/crosscite_writer'
require_relative 'writers/crossref_writer'
@@ -43,6 +45,7 @@ module MetadataUtils
include Briard::Readers::BibtexReader
include Briard::Readers::CiteprocReader
+ include Briard::Readers::CffReader
include Briard::Readers::CodemetaReader
include Briard::Readers::CrossciteReader
include Briard::Readers::CrossrefReader
@@ -55,6 +58,7 @@ module MetadataUtils
include Briard::Writers::BibtexWriter
include Briard::Writers::CitationWriter
include Briard::Writers::CiteprocWriter
+ # include Briard::Writers::CffWriter
include Briard::Writers::CodemetaWriter
include Briard::Writers::CrossciteWriter
include Briard::Writers::CrossrefWriter
diff --git a/lib/briard/readers/cff_reader.rb b/lib/briard/readers/cff_reader.rb
new file mode 100644
index 00000000..69c93e8d
--- /dev/null
+++ b/lib/briard/readers/cff_reader.rb
@@ -0,0 +1,107 @@
+# frozen_string_literal: true
+
+module Briard
+ module Readers
+ module CffReader
+ def get_cff(id: nil, **options)
+ return { "string" => nil, "state" => "not_found" } unless id.present?
+ id = normalize_id(id)
+ response = Maremma.get(github_as_cff_url(id), accept: "json", raw: true)
+ data = response.body.fetch("data", nil)
+ # Dates are parsed to date object, need to convert to iso8601 later
+ string = Psych.safe_load(data, permitted_classes: [Date])
+ { "string" => string }
+ end
+
+ def read_cff(string: nil, **options)
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url, :sandbox, :validate, :ra))
+ meta = string.is_a?(String) ? Psych.safe_load(string, permitted_classes: [Date]) : string
+
+ identifiers = Array.wrap(meta.fetch("identifiers", nil)).map do |r|
+ r = normalize_id(r) if r.is_a?(String)
+ if r.is_a?(String) && !r.start_with?("https://doi.org")
+ { "identifierType" => "URL", "identifier" => r }
+ elsif r.is_a?(Hash)
+ { "identifierType" => get_identifier_type(r["propertyID"]), "identifier" => r["value"] }
+ end
+ end.compact.uniq
+
+ id = normalize_id(options[:doi] || meta.fetch("doi", nil) || Array.wrap(meta.fetch("identifiers", nil)).find { |i| i["type"] == "doi"}.fetch("value", nil))
+ url = normalize_id(meta.fetch("repository-code", nil))
+ creators = cff_creators(Array.wrap(meta.fetch("authors", nil)))
+
+ dates = []
+ dates << { "date" => meta.fetch("date-released", nil).iso8601, "dateType" => "Issued" } if meta.fetch("date-released", nil).present?
+ publication_year = meta.fetch("date-released").iso8601[0..3] if meta.fetch("date-released", nil).present?
+ publisher = url.to_s.starts_with?("https://github.com") ? "GitHub" : nil
+ state = meta.present? || read_options.present? ? "findable" : "not_found"
+ types = {
+ "resourceTypeGeneral" => "Software",
+ "resourceType" => nil,
+ "schemaOrg" => "SoftwareSourceCode",
+ "citeproc" => "article-journal",
+ "bibtex" => "misc",
+ "ris" => "COMP"
+ }.compact
+ subjects = Array.wrap(meta.fetch("keywords", nil)).reduce([]) do |sum, subject|
+ sum += name_to_fos(subject)
+
+ sum
+ end
+
+ titles = meta.fetch("title", nil).present? ? [{ "title" => meta.fetch("title", nil) }] : []
+ rights_list = meta.fetch("license", nil).present? ? [hsh_to_spdx("rightsIdentifier" => meta.fetch("license"))] : nil
+
+ { "id" => id,
+ "types" => types,
+ "identifiers" => identifiers,
+ "doi" => doi_from_url(id),
+ "url" => url,
+ "titles" => titles,
+ "creators" => creators,
+ "publisher" => publisher,
+ "dates" => dates,
+ "publication_year" => publication_year,
+ "descriptions" => meta.fetch("abstract", nil).present? ? [{ "description" => sanitize(meta.fetch("abstract")), "descriptionType" => "Abstract" }] : nil,
+ "rights_list" => rights_list,
+ "version_info" => meta.fetch("version", nil),
+ "subjects" => subjects,
+ "state" => state
+ }.merge(read_options)
+ end
+
+ def cff_creators(creators)
+ Array.wrap(creators).map do |a|
+ name_identifiers = normalize_orcid(parse_attributes(a["orcid"])).present? ? [{ "nameIdentifier" => normalize_orcid(parse_attributes(a["orcid"])), "nameIdentifierScheme" => "ORCID", "schemeUri"=>"https://orcid.org" }] : nil
+ if a["given-names"].present? || name_identifiers.present?
+ given_name = parse_attributes(a["given-names"])
+ family_name = parse_attributes(a["family-names"])
+ affiliation = Array.wrap(a["affiliation"]).map do |a|
+ if a.is_a?(Hash)
+ a
+ elsif a.is_a?(Hash) && a.key?("__content__") && a["__content__"].strip.blank?
+ nil
+ elsif a.is_a?(Hash) && a.key?("__content__")
+ { "name" => a["__content__"] }
+ elsif a.strip.blank?
+ nil
+ elsif a.is_a?(String)
+ { "name" => a }
+ end
+ end.compact
+
+ { "nameType" => "Personal",
+ "nameIdentifiers" => name_identifiers,
+ "name" => [family_name, given_name].compact.join(", "),
+ "givenName" => given_name,
+ "familyName" => family_name,
+ "affiliation" => affiliation.presence }.compact
+ else
+ { "nameType" => "Organizational",
+ "name" => a["name"] || a["__content__"] }
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/briard/readers/crossref_reader.rb b/lib/briard/readers/crossref_reader.rb
index 2dba26d6..f8b3dd6f 100644
--- a/lib/briard/readers/crossref_reader.rb
+++ b/lib/briard/readers/crossref_reader.rb
@@ -264,12 +264,12 @@ def crossref_people(bibliographic_metadata, contributor_role)
given_name = parse_attributes(a["given_name"])
family_name = parse_attributes(a["surname"])
affiliation = Array.wrap(a["affiliation"]).map do |a|
- if a.is_a?(Hash) && a.key?("__content__") && a["__content__"].strip.blank?
+ if a.is_a?(Hash)
+ a
+ elsif a.is_a?(Hash) && a.key?("__content__") && a["__content__"].strip.blank?
nil
elsif a.is_a?(Hash) && a.key?("__content__")
{ "name" => a["__content__"] }
- elsif a.is_a?(Hash)
- a
elsif a.strip.blank?
nil
elsif a.is_a?(String)
diff --git a/lib/briard/utils.rb b/lib/briard/utils.rb
index 9dc0c27f..bf4d492c 100644
--- a/lib/briard/utils.rb
+++ b/lib/briard/utils.rb
@@ -506,7 +506,9 @@ def find_from_format_by_id(id)
"orcid"
elsif /\A(http|https):\/(\/)?github\.com\/(.+)\/package.json\z/.match(id)
"npm"
- elsif /\A(http|https):\/(\/)?github\.com\/(.+)\z/.match(id)
+ elsif /\A(http|https):\/(\/)?github\.com\/(.+)\/CITATION.cff\z/.match(id)
+ "cff"
+ elsif /\A(http|https):\/(\/)?github\.com\/(.+)\/codemeta.json\z/.match(id)
"codemeta"
else
"schema_org"
@@ -516,6 +518,8 @@ def find_from_format_by_id(id)
def find_from_format_by_filename(filename)
if filename == "package.json"
"npm"
+ elsif filename == "CITATION.cff"
+ "cff"
end
end
@@ -528,6 +532,8 @@ def find_from_format_by_ext(string, options={})
"crossref"
elsif options[:ext] == ".xml" && Nokogiri::XML(string, nil, 'UTF-8', &:noblanks).collect_namespaces.find { |k, v| v.start_with?("http://datacite.org/schema/kernel") }
"datacite"
+ elsif options[:ext] == ".cff"
+ "cff"
elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("@context").to_s.start_with?("http://schema.org", "https://schema.org")
"schema_org"
elsif options[:ext] == ".json" && Maremma.from_json(string).to_h.dig("@context") == ("https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld")
@@ -558,9 +564,13 @@ def find_from_format_by_string(string)
"citeproc"
elsif string.start_with?("TY - ")
"ris"
+ elsif YAML.load(string).to_h.fetch("cff-version", nil).present?
+ "cff"
elsif BibTeX.parse(string).first
"bibtex"
end
+ rescue Psych::SyntaxError => error
+ "bibtex"
rescue BibTeX::ParseError => error
nil
end
@@ -1079,6 +1089,16 @@ def github_as_codemeta_url(url)
end
end
+ def github_as_cff_url(url)
+ github_hash = github_from_url(url)
+
+ if github_hash[:path].to_s.end_with?("CITATION.cff")
+ "https://raw.githubusercontent.com/#{github_hash[:owner]}/#{github_hash[:repo]}/#{github_hash[:release]}/#{github_hash[:path]}"
+ elsif github_hash[:owner].present?
+ "https://raw.githubusercontent.com/#{github_hash[:owner]}/#{github_hash[:repo]}/main/CITATION.cff"
+ end
+ end
+
def get_date_parts(iso8601_time)
return { 'date-parts' => [[]] } if iso8601_time.nil?
diff --git a/lib/briard/version.rb b/lib/briard/version.rb
index 210b758e..9fdf56ac 100644
--- a/lib/briard/version.rb
+++ b/lib/briard/version.rb
@@ -1,3 +1,3 @@
module Briard
- VERSION = "2.0.2"
+ VERSION = "2.1"
end
diff --git a/lib/briard/writers/cff_writer.rb b/lib/briard/writers/cff_writer.rb
new file mode 100644
index 00000000..e0cf6560
--- /dev/null
+++ b/lib/briard/writers/cff_writer.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+# module Briard
+# module Writers
+# module CffWriter
+# def cff
+# return nil unless valid? || show_errors
+
+# hsh = {
+# "@context" => id.present? ? "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld" : nil,
+# "@type" => types.present? ? types["schemaOrg"] : nil,
+# "@id" => normalize_doi(doi),
+# "identifier" => to_schema_org_identifiers(identifiers),
+# "codeRepository" => url,
+# "name" => parse_attributes(titles, content: "title", first: true),
+# "authors" => creators,
+# "description" => parse_attributes(descriptions, content: "description", first: true),
+# "version" => version_info,
+# "tags" => subjects.present? ? Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) } : nil,
+# "datePublished" => get_date(dates, "Issued") || publication_year,
+# "dateModified" => get_date(dates, "Updated"),
+# "publisher" => publisher,
+# "license" => Array.wrap(rights_list).map { |l| l["rightsUri"] }.compact.unwrap,
+# }.compact
+# JSON.pretty_generate hsh.presence
+# end
+# end
+# end
+# end
diff --git a/spec/find_from_format_spec.rb b/spec/find_from_format_spec.rb
index d28a4165..d47b08cb 100644
--- a/spec/find_from_format_spec.rb
+++ b/spec/find_from_format_spec.rb
@@ -39,8 +39,13 @@
expect(subject.find_from_format_by_id(id)).to eq("op")
end
+ it "cff" do
+ id = "https://github.com/citation-file-format/ruby-cff/blob/main/CITATION.cff"
+ expect(subject.find_from_format_by_id(id)).to eq("cff")
+ end
+
it "codemeta" do
- id = "https://github.com/datacite/maremma"
+ id = "https://github.com/datacite/maremma/blob/master/codemeta.json"
expect(subject.find_from_format_by_id(id)).to eq("codemeta")
end
@@ -64,6 +69,11 @@
filename = "package.json"
expect(subject.find_from_format_by_filename(filename)).to eq("npm")
end
+
+ it "cff" do
+ filename = "CITATION.cff"
+ expect(subject.find_from_format_by_filename(filename)).to eq("cff")
+ end
end
context "find_from_format_by_string" do
@@ -91,6 +101,11 @@
expect(subject.find_from_format_by_string(string)).to eq("codemeta")
end
+ it "cff" do
+ string = IO.read(fixture_path + 'CITATION.cff').strip
+ expect(subject.find_from_format_by_string(string)).to eq("cff")
+ end
+
it "schema_org" do
string = IO.read(fixture_path + 'schema_org_topmed.json').strip
expect(subject.find_from_format_by_string(string)).to eq("schema_org")
diff --git a/spec/fixtures/CITATION.cff b/spec/fixtures/CITATION.cff
new file mode 100644
index 00000000..19bfaaf1
--- /dev/null
+++ b/spec/fixtures/CITATION.cff
@@ -0,0 +1,83 @@
+# This CITATION.cff file was created by ruby-cff (v 0.9.0).
+# Gem: https://rubygems.org/gems/cff
+# CFF: https://citation-file-format.github.io/
+
+cff-version: 1.2.0
+message: If you use ruby-cff in your work, please cite it using the following metadata
+title: Ruby CFF Library
+abstract: This library provides a Ruby interface to manipulate Citation File Format files
+authors:
+- family-names: Haines
+ given-names: Robert
+ orcid: https://orcid.org/0000-0002-9538-7919
+ affiliation: The University of Manchester, UK
+- name: The Ruby Citation File Format Developers
+keywords:
+- ruby
+- credit
+- software citation
+- research software
+- software sustainability
+- metadata
+- citation file format
+- CFF
+version: 0.9.0
+doi: 10.5281/zenodo.1184077
+date-released: 2021-08-18
+license: Apache-2.0
+repository-artifact: https://rubygems.org/gems/cff
+repository-code: https://github.com/citation-file-format/ruby-cff
+references:
+- type: software
+ title: Citation File Format
+ authors:
+ - family-names: Druskat
+ given-names: Stephan
+ orcid: https://orcid.org/0000-0003-4925-7248
+ - family-names: Spaaks
+ given-names: Jurriaan H.
+ orcid: https://orcid.org/0000-0002-7064-4069
+ - family-names: Chue Hong
+ given-names: Neil
+ orcid: https://orcid.org/0000-0002-8876-7606
+ - family-names: Haines
+ given-names: Robert
+ orcid: https://orcid.org/0000-0002-9538-7919
+ - family-names: Baker
+ given-names: James
+ orcid: https://orcid.org/0000-0002-2682-6922
+ - family-names: Bliven
+ given-names: Spencer
+ orcid: https://orcid.org/0000-0002-1200-1698
+ email: spencer.bliven@gmail.com
+ - family-names: Willighagen
+ given-names: Egon
+ orcid: https://orcid.org/0000-0001-7542-0286
+ - family-names: Pérez-Suárez
+ given-names: David
+ orcid: https://orcid.org/0000-0003-0784-6909
+ website: https://dpshelio.github.io
+ - family-names: Konovalov
+ given-names: Alexander
+ orcid: https://orcid.org/0000-0001-5299-3292
+ identifiers:
+ - type: doi
+ value: 10.5281/zenodo.1003149
+ description: The concept DOI for the collection containing all versions of the Citation File Format.
+ - type: doi
+ value: 10.5281/zenodo.5171937
+ description: The versioned DOI for the version 1.2.0 of the Citation File Format.
+ keywords:
+ - citation file format
+ - CFF
+ - citation files
+ - software citation
+ - file format
+ - YAML
+ - software sustainability
+ - research software
+ - credit
+ abstract: CITATION.cff files are plain text files with human- and machine-readable citation information for software. Code developers can include them in their repositories to let others know how to correctly cite their software. This is the specification for the Citation File Format.
+ date-released: 2021-08-09
+ license: CC-BY-4.0
+ version: 1.2.0
\ No newline at end of file
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/cff-converter-python.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/cff-converter-python.yml
new file mode 100644
index 00000000..ccd8e239
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/cff-converter-python.yml
@@ -0,0 +1,75 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: https://raw.githubusercontent.com/citation-file-format/cff-converter-python/main/CITATION.cff
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.9.6; mailto:info@front-matter.io)
+ Accept:
+ - application/json;charset=UTF-8
+ Accept-Encoding:
+ - gzip,deflate
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '1212'
+ Cache-Control:
+ - max-age=300
+ Content-Security-Policy:
+ - default-src 'none'; style-src 'unsafe-inline'; sandbox
+ Content-Type:
+ - text/plain; charset=utf-8
+ Etag:
+ - W/"481e62c88d87f88f330c3713aad93abd1a281b2967c7ad0cd91ccca939567e52"
+ Strict-Transport-Security:
+ - max-age=31536000
+ X-Content-Type-Options:
+ - nosniff
+ X-Frame-Options:
+ - deny
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Github-Request-Id:
+ - B098:F9B8:176B365:188E5A5:61AF23E8
+ Content-Encoding:
+ - gzip
+ Accept-Ranges:
+ - bytes
+ Date:
+ - Tue, 07 Dec 2021 09:05:45 GMT
+ Via:
+ - 1.1 varnish
+ X-Served-By:
+ - cache-hhn4043-HHN
+ X-Cache:
+ - MISS
+ X-Cache-Hits:
+ - '0'
+ X-Timer:
+ - S1638867945.967912,VS0,VE186
+ Vary:
+ - Authorization,Accept-Encoding,Origin
+ Access-Control-Allow-Origin:
+ - "*"
+ X-Fastly-Request-Id:
+ - 8209173bb874db42d9e8e382110b46303cc17b0a
+ Expires:
+ - Tue, 07 Dec 2021 09:10:45 GMT
+ Source-Age:
+ - '0'
+ body:
+ encoding: ASCII-8BIT
+ string: !binary |-
+ H4sIAAAAAAAAA62XXXLiOBDH3zmFDrAytsGAedgqQiabTDJJKjAftW/CbmMNtuSS5bDMefYme7FtyRBMgCmo4KpUsGR3/7rVav3NZqVWLNJDMpZ5zkRMMi6AFErOFcuJluSVZTxmGoiZjKR4BaXJ+G46mt49PTpRkpCEZ1A6LVbpVKpy2CKEEpbgKGeaSzEkj6BTUBkaKAlMIg4iAjIGoUHhw4QkLOfZigqWQzkkk4KxRWkn5vwVxGb8c6UUZ0yQW8dOShXxeEhSrYty2G7bW0eqedvFi+KfT/tur0u7bi/8KNN9xl7XEztMU5l/1PQ3UKkEtLlvfaIhYeLUYIOB71Hf7bn7RLdVPpNZrOlXgfZVyfV//2ryqyJXyMnFAaprVZULpg8yFempUB3aDf2A9v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US3nkuOG51FaxvzHeyqX5yBgbaTxZeyZckNHzCLfmKmuSzTJZ1x9+YwzJn3TtZJMaM+2wgpXmNVtwm5s2llTQdr12KpdUS2qEON3ESbmg+CCtX0t1nrX+B23vkxxeEQAA
+ http_version:
+ recorded_at: Tue, 07 Dec 2021 09:05:45 GMT
+recorded_with: VCR 3.0.3
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/pidgraph-notebooks-python.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/pidgraph-notebooks-python.yml
new file mode 100644
index 00000000..9d87d674
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/pidgraph-notebooks-python.yml
@@ -0,0 +1,75 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: https://raw.githubusercontent.com/datacite/pidgraph-notebooks-python/master/CITATION.cff
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.9.6; mailto:info@front-matter.io)
+ Accept:
+ - application/json;charset=UTF-8
+ Accept-Encoding:
+ - gzip,deflate
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '179'
+ Cache-Control:
+ - max-age=300
+ Content-Security-Policy:
+ - default-src 'none'; style-src 'unsafe-inline'; sandbox
+ Content-Type:
+ - text/plain; charset=utf-8
+ Etag:
+ - W/"904897bb01e8a81799120f8fbea0b9eda07bef8124d684df22007d3de35a640c"
+ Strict-Transport-Security:
+ - max-age=31536000
+ X-Content-Type-Options:
+ - nosniff
+ X-Frame-Options:
+ - deny
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Github-Request-Id:
+ - A448:F9B8:1763958:18867D3:61AF22E7
+ Content-Encoding:
+ - gzip
+ Accept-Ranges:
+ - bytes
+ Date:
+ - Tue, 07 Dec 2021 09:01:27 GMT
+ Via:
+ - 1.1 varnish
+ X-Served-By:
+ - cache-hhn4076-HHN
+ X-Cache:
+ - MISS
+ X-Cache-Hits:
+ - '0'
+ X-Timer:
+ - S1638867687.247696,VS0,VE211
+ Vary:
+ - Authorization,Accept-Encoding,Origin
+ Access-Control-Allow-Origin:
+ - "*"
+ X-Fastly-Request-Id:
+ - a9a785c986684079c845062877d41c83fb8d2de6
+ Expires:
+ - Tue, 07 Dec 2021 09:06:27 GMT
+ Source-Age:
+ - '0'
+ body:
+ encoding: ASCII-8BIT
+ string: !binary |-
+ H4sIAAAAAAAAA1XNPQ+CMBCA4b2/4uJssSWghs3Ej+BgjJtjlas0oge9Q8K/l7i5vsP7qLv3+oORA70LsIlNjHohs3tgAbPSw0g99IwgdWBg8jK4iHNoG3RTvQdBCAKO4YYNDclMuV5qilyoisJ0NInNsjxb+K5b6mGVW/WnWSVBmsnaX3bXDZzLLRyia2s49u0oGOFEgjeiJ6vKCeqIP7gqIDWp0SbXZq2+JhyHJMUAAAA=
+ http_version:
+ recorded_at: Tue, 07 Dec 2021 09:01:27 GMT
+recorded_with: VCR 3.0.3
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff.yml
new file mode 100644
index 00000000..ed72d486
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff.yml
@@ -0,0 +1,75 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: https://raw.githubusercontent.com/citation-file-format/ruby-cff/main/CITATION.cff
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.9.6; mailto:info@front-matter.io)
+ Accept:
+ - application/json;charset=UTF-8
+ Accept-Encoding:
+ - gzip,deflate
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '1100'
+ Cache-Control:
+ - max-age=300
+ Content-Security-Policy:
+ - default-src 'none'; style-src 'unsafe-inline'; sandbox
+ Content-Type:
+ - text/plain; charset=utf-8
+ Etag:
+ - W/"0c65d88dd50bd96382850237735a8e2d6c0826d4497c8aafd6c28a2bacdb4127"
+ Strict-Transport-Security:
+ - max-age=31536000
+ X-Content-Type-Options:
+ - nosniff
+ X-Frame-Options:
+ - deny
+ X-Xss-Protection:
+ - 1; mode=block
+ X-Github-Request-Id:
+ - C714:7B77:A8AC40:B7D58E:61AEF275
+ Content-Encoding:
+ - gzip
+ Accept-Ranges:
+ - bytes
+ Date:
+ - Tue, 07 Dec 2021 06:17:45 GMT
+ Via:
+ - 1.1 varnish
+ X-Served-By:
+ - cache-hhn4053-HHN
+ X-Cache:
+ - HIT
+ X-Cache-Hits:
+ - '1'
+ X-Timer:
+ - S1638857865.889825,VS0,VE142
+ Vary:
+ - Authorization,Accept-Encoding,Origin
+ Access-Control-Allow-Origin:
+ - "*"
+ X-Fastly-Request-Id:
+ - d32f5353ed6e6b26f755bb5fe113ce76744a4289
+ Expires:
+ - Tue, 07 Dec 2021 06:22:45 GMT
+ Source-Age:
+ - '0'
+ body:
+ encoding: ASCII-8BIT
+ string: !binary |-
+ H4sIAAAAAAAAA5VW247bNhB911cMkJcWCGVJ67UkP3Xj7Xa3uRXZDYo80tLIIkyLAknZcf4mj/2O/FiHlC9bW0lcw4ZkcjjXwznzAp5qYWD28HTz9PD+XVhUFVRCImy4gUIjt1jCfAu6m2+Z2/xlDVGYh9GvYfAC/sDVFGprWzMdjZzIAlcmVHoxci8jkieh2d3dUagQlluhGuaMsErpFbfhQti6m4dCjYKAzrA1akMyU4jDJIyCFRrDFziFhwq2qoPO4NEf0bg1DRully+hlchpl6wgCEuSolmArREqJaXauH8rtLzklgdWWElKP5Am5yO8EXPN9Tbgc2M1L+y0T43sl6HVai1KNMD7I6KxqCteIFgFK96ItpOULZjtIoQ7l8Y7H6FPqQl4Z2ulzTRgUPGVkFvWcApuCvdcNLQPsBBrbParH9QctaVVpQtRHnPo//osR/Rh9EtYfn2VsTSPcxLnFZkT3gkXA8LHRviU2i2oCt7ypqjRkPcv4eNr8sWZ6wX7XAwFcItrlKolLcESt5Ts0ofhykAPAkopLL0YVdkN174CXomTQYNcF/Vh87mc6Yyl4PmcPLZO1aE87KCjB2SPFVqmWgUHhHgsBqUSBJYovE6yePQFG1WqMI6zcZSmASlDptEDg5KYREnMoozFWSBFgY2h0G9aThlhDmsaW0WJUnrLuLai8jj4McKfHSlUiUfxHawLtRqE/WiPYdJQocamQJ9Tu21JySFZADugDtXFVXsPKoBTWN3qziy90AmyHi22NW/8xk/BdcXGeXLN0mScDdh4bDlfmnMTf3ZaC84buA8vM5OwNJqM2Tia5ANmZnWHcK+axbmldyjkpSayLJ2wdBJNBkwcLuH3ruH/voinFl7xJeqBVLnHpfqTSZawSZ4kQ/qlUztQ7taBS19qIk7oLZ7kmT+AKy4k4bHXEc69jd8WbtVBe8CNv4WUYlFTyx7w5feFuhB3MUuvxwmLkmyoWn99+0fjF/bYfftKz3M7t5y69aUAj9JsTEmNcn9gg3O6z88uctmaGqVQR6IacOi1atSaS7U+9+VG4mfelJdWIGbXSZ6zqyR3RSbOaagRCdzf8b4/UMvz2shkh+fNj6KKx304xFmFFu2RDgpFlWypp79/cF3V82NB/IiFby+07Vqy40ouJexarXHU4SSH2lB4sWPXcRrnV+mwYztTNHE8d2232g8DP/PiSE7Oo0EGcRuOQ84EjF86pzBf6xMFn27evvmv+AmTub1z5vM2e7Kkzn0YNM7GL5oySGUrSSFY/LwbIGBD+IO6o2mDAQGKxo6ipqZF9EacOZdHn2k66Z31sVEi9x6EMCOOotTv6RwK7qQL2dEyZXblJip6Cg0HYhNkmoYciRYUbdGhZaM2UNOPlgulNUFHbvuxqz97tOeHKPq6qlETKQjKxdGvH9XyO8ztb+mBu2cz9uoTGxN1A5zMjf8CsnKrBdwKAAA=
+ http_version:
+ recorded_at: Tue, 07 Dec 2021 06:17:45 GMT
+recorded_with: VCR 3.0.3
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/maremma.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/maremma.yml
index 235f8264..71defd69 100644
--- a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/maremma.yml
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/maremma.yml
@@ -39,37 +39,37 @@ http_interactions:
X-Xss-Protection:
- 1; mode=block
X-Github-Request-Id:
- - 5F28:E02D:7ADFFD:8638EF:61ADB7A9
+ - BB8C:ADBA:C18769:D1A256:61AF2FAC
Content-Encoding:
- gzip
Accept-Ranges:
- bytes
Date:
- - Mon, 06 Dec 2021 07:21:45 GMT
+ - Tue, 07 Dec 2021 09:55:57 GMT
Via:
- 1.1 varnish
X-Served-By:
- - cache-hhn4074-HHN
+ - cache-hhn4028-HHN
X-Cache:
- - HIT
+ - MISS
X-Cache-Hits:
- - '1'
+ - '0'
X-Timer:
- - S1638775306.704423,VS0,VE1
+ - S1638870957.986688,VS0,VE198
Vary:
- Authorization,Accept-Encoding,Origin
Access-Control-Allow-Origin:
- "*"
X-Fastly-Request-Id:
- - 59408875417735c68e56c1ab80e630db0d3473d4
+ - c27214d46fff8476101213373e276f2614a566d5
Expires:
- - Mon, 06 Dec 2021 07:26:45 GMT
+ - Tue, 07 Dec 2021 10:00:57 GMT
Source-Age:
- - '267'
+ - '0'
body:
encoding: ASCII-8BIT
string: !binary |-
H4sIAAAAAAAAA41US27bMBBd26cgtI4kx07gIKs6iZumiNvUSYECRRe0OJLZUKQ6JKsIQQ7Qg/RiPUmHlO06QRcxIEPkzJvPmzd6HA6SN4XRDh5ccsqStXONPc1z5G1WSbf2K28Bo4N2WWHqvDACanD830vNrQPcnbPv1mglkoMQ2nUNhLi3pnQtR7g1Hgs4J9feLsV+VmFkZrDKD0fZ8dHkJP80vxylk8vFJDrzimqw5P84HDyDEtJgIUXEjuiX0jOhv+k0PZpOTgJ6r5YGkCrsLzWv492Co5OavQWtAXsTL0upJHeSfMnjgjt+Lh30xtpbdwbhHKpw6CFeS7vgUjt6KMqz+6Ws1s6+M0rsLMPBU2hLCmpLljLev5KKwPUSGmOlM9jt4/qhxUkJqrigCmlACHXNN0jt0CgF4g7qALSbyUQrQeAcgfdtJePR4XF6eJiOT3bWG79S0q539mk6Gqfjo519YUTo5b9msAXKZkvo0q865h1x7Dqm5Ao5dqw0yDS41uA9Q/jhwTqbsTNuQTBD8+HIBe8Y14LNH6iXA9ag+UkUWsZZi7yh4cYgXxbX+fvbjx9Yw9FKXUUIIJJpTa+KrjI2U4pZXxRgbekVJbSN0TbEQqCT86gpL7cEsWvWErXsHjoWiD1gnMAxoGWkHM5CttnNVVqiBErQvQD1rllkQtqZd6YONJ95qfYklChZAJVwFQlcXN1F/2ZDOr4UYuJ4FTbiaxBZ2ZPTCxQCOxuNg8uDPJLh4FvESKe2og+6OKXi4zD2h2Bl3ag4yd08CurY9vWgqZDXNZF4zXXlaTO3a7ldqBCwT/+T1m0z8j+/frNxNskmveXz8npfum3bZkiwVFHMIP5ksyEkSNFHfYXK85Uyq+03aTmfXSzmWS2S4dPwL3oe0obsBAAA
http_version:
- recorded_at: Mon, 06 Dec 2021 07:21:45 GMT
+ recorded_at: Tue, 07 Dec 2021 09:55:57 GMT
recorded_with: VCR 3.0.3
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/metadata_reports.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/metadata_reports.yml
index 8b3ea7a0..52877e41 100644
--- a/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/metadata_reports.yml
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/metadata_reports.yml
@@ -39,13 +39,13 @@ http_interactions:
X-Xss-Protection:
- 1; mode=block
X-Github-Request-Id:
- - 8EA0:1E55:1087311:115786C:61ADBA09
+ - FECE:6BC0:17C5B98:18EBEC4:61AF2FAC
Content-Encoding:
- gzip
Accept-Ranges:
- bytes
Date:
- - Mon, 06 Dec 2021 07:21:45 GMT
+ - Tue, 07 Dec 2021 09:55:56 GMT
Via:
- 1.1 varnish
X-Served-By:
@@ -55,15 +55,15 @@ http_interactions:
X-Cache-Hits:
- '0'
X-Timer:
- - S1638775305.182495,VS0,VE206
+ - S1638870957.503417,VS0,VE196
Vary:
- Authorization,Accept-Encoding,Origin
Access-Control-Allow-Origin:
- "*"
X-Fastly-Request-Id:
- - d3ffc6d623ff207091d75910c8bd3dd5178ee8cb
+ - 16b73682374b3b2b74b9be462d4349fd7e2618f0
Expires:
- - Mon, 06 Dec 2021 07:26:45 GMT
+ - Tue, 07 Dec 2021 10:00:56 GMT
Source-Age:
- '0'
body:
@@ -71,5 +71,5 @@ http_interactions:
string: !binary |-
H4sIAAAAAAAAA81UyW7bMBA9219B6BzJliVBdk7NgqJG47aw01PRAy2OZaYSKQypKm6Qf++Qipcuh/pQIARIiHqzvRnOPA0HwZtCKwuPNrhkwdbaxlyORsi7qJR2265bA+gFlI0KXY8KLaAGy48fNTcW8HCPHoxWlQgunGm7a8DZXemN7TjCSrdYwA2J9rgUp16FlpHGchSPoyxNpqMOx48hxLPUC/OSYjAk/2XIaD35k7HfjWgspPBmxrRC2gkdeR6meTIlQ3utfWgNIAV8BBSv/f8FRysVewtKAR7hujX2Gm6kBefVYgsHSJoFl8rSJoU/sKUst9a805U4oB58vjiTThxmsyQN82ySnUHnlisJFVtF7D23P14Tn0mYzLI8nKR5egafK9xoxVY1PdLXRCYOp3GShUk6nZ1B5o6jYeS9Zh+oSAbU/6RE51fXT1JQP8mN9PA/9qBr8iU02kircXeq108LPyIEt7yggEduHLhLiKSC1Lu9CWVRVxWIe6idBfMyGzxK4nCDwHu6wWQcT0PXwLMD+qldV9JsT/EsjPMDvtDCkforDKZA2VhJNXBPSPFqZ6RhesNuKUyXZHb7cW4YQindUAPBNhrZPsILtkb9DRQTulNsvWN4SAXjSjD9HZBZWUPk3Ulz1VpdOy7XrayO9RsElSxAGZj7KBfzey/fvDDDvl/7gDxiedkPvgGR0NL9G/ySt74yLt/BcOCra6Wt+sb/OGdLzwe5Y248pdVp0hvUJfK6lqq846psadKS5pMzu3+hy97L5+XdadG7roswJPUHKKx/NuT+efg8/AmLwCo5WAYAAA==
http_version:
- recorded_at: Mon, 06 Dec 2021 07:21:45 GMT
+ recorded_at: Tue, 07 Dec 2021 09:55:56 GMT
recorded_with: VCR 3.0.3
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_cff_url.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_cff_url.yml
new file mode 100644
index 00000000..1cc4197d
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_cff_url.yml
@@ -0,0 +1,65 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: https://api.crossref.org/works/10.1101/097196/transform/application/vnd.crossref.unixsd+xml
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.9.6; mailto:info@front-matter.io)
+ Accept:
+ - text/xml;charset=utf-8
+ Accept-Encoding:
+ - gzip,deflate
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Date:
+ - Tue, 07 Dec 2021 09:42:30 GMT
+ Content-Length:
+ - '3783'
+ Set-Cookie:
+ - AWSALB=5dlff35uylVfulpAChnfyuRqMsarg4ie2H/Fnl0cQAf8ztrJ3uqoS8lI87uSwExOS5zjLbU2purdZoT4MV4dahWbs8DB9d3WSrdog7CYZu7QiF++o05MkEMC8lCD;
+ Expires=Tue, 14 Dec 2021 09:42:30 GMT; Path=/, AWSALBCORS=5dlff35uylVfulpAChnfyuRqMsarg4ie2H/Fnl0cQAf8ztrJ3uqoS8lI87uSwExOS5zjLbU2purdZoT4MV4dahWbs8DB9d3WSrdog7CYZu7QiF++o05MkEMC8lCD;
+ Expires=Tue, 14 Dec 2021 09:42:30 GMT; Path=/; SameSite=None
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y8wMDAwLTAwMDEtODI0OS03Mzg4PjsgdGl0bGU9IlNlYmFzdGlhbiBLYXJjaGVyIjsgcmVsPSJhdXRob3IiLCA8aHR0cDovL29yY2lkLm9yZy8wMDAwLTAwMDItODQwNi0zODcxPjsgdGl0bGU9Ik1hcnlhbm4gTWFydG9uZSI7IHJlbD0iYXV0aG9yIiwgPGh0dHA6Ly9vcmNpZC5vcmcvMDAwMC0wMDAzLTQwNjAtNzM2MD47IHRpdGxlPSJUaW1vdGh5IENsYXJrIjsgcmVsPSJhdXRob3Ii
+ Access-Control-Expose-Headers:
+ - Link
+ Access-Control-Allow-Headers:
+ - X-Requested-With, Accept, Accept-Encoding, Accept-Charset, Accept-Language,
+ Accept-Ranges, Cache-Control
+ Access-Control-Allow-Origin:
+ - "*"
+ Vary:
+ - Accept-Encoding
+ Content-Encoding:
+ - gzip
+ Server:
+ - Jetty(9.4.40.v20210413)
+ X-Ratelimit-Limit:
+ - '50'
+ X-Ratelimit-Interval:
+ - 1s
+ X-Api-Pool:
+ - polite
+ X-Rate-Limit-Limit:
+ - '50'
+ X-Rate-Limit-Interval:
+ - 1s
+ Permissions-Policy:
+ - interest-cohort=()
+ Connection:
+ - close
+ body:
+ encoding: ASCII-8BIT
+ string: !binary |-
+ H4sIAAAAAAAAAM1ba3LbOBL+v1V7B5R+bMVV4ktvaRRPOX4kztiJx3JmZ6a2ygWRkASbJDgAaVup/bF32EvsPfYme5LtBkiJsilHijOx/yQiHo1Gv/B1Ax7+eBeF5IZJxUX8uubZbo2w2BcBj6eva58ujqxe7cfdvwx9KZSSbHIpmcrClMCsWL2uzdI0GTjO7e2tXYywhZw6f0jlz1hEnSYSXJDXX3rq4E7xlem3TT2x4bqe8+vpyUhPt3isUhr7DGYpPjA0T4RPU01uk9XJukFmiHIWO/sjY3J+KbI0yVKYaN+poLb7178QMjQ9Zue6BdpmjAb5b/gKBL8c09SfXfJgNxYxGzorTfkkpzRrOBbBfElBr0Fgt2kGcoW1RHjDcgaWi5B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HAEILmUQAxCgfuWEVq2lUupcLcQusxNsXtzeDBYJNRg9OMVxDFEipvljFiwEq5lIKjPPogAR00TfLYJX0FCA1JvtTgur4xZdMmMFC0bNDWO5D3gpl81zRnWzKhh9Dr2ty28ehTeQYcSAGxAEYJSzbmADAAqjhIVbI51fQCMBpDx6NmSzS2DzgYWAgfTd8okxDwMlIx4DbkFz2BuLLCVem2CQ1U+rtG7xwUcBaQ4noCWEMwfWCR+DR00hOUZg1fBeeZ6jLW5dFrV+j99AT8uuqlcYi5ex+auRle7h4m+8S83mvce9vwMdOvrPsPPvobP4E+28Y/k34EuaRdv/ARSAXeZKPwAA
+ http_version:
+ recorded_at: Tue, 07 Dec 2021 09:42:31 GMT
+recorded_with: VCR 3.0.3
diff --git a/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_cff_file.yml b/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_cff_file.yml
new file mode 100644
index 00000000..e8a7825f
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_cff_file.yml
@@ -0,0 +1,65 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: https://api.crossref.org/works/10.1101/097196/transform/application/vnd.crossref.unixsd+xml
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.9.6; mailto:info@front-matter.io)
+ Accept:
+ - text/xml;charset=utf-8
+ Accept-Encoding:
+ - gzip,deflate
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Date:
+ - Mon, 06 Dec 2021 20:43:57 GMT
+ Content-Length:
+ - '3783'
+ Set-Cookie:
+ - AWSALB=WyLNkMaOGwa8cf1D2U1Z3TbVQa/mHhRkBxvYTju/FCtAK/nKRvxxuYxWs7nwNUtxKGItYayjCqECwRwtzM/uWvO/hbn8HASduRvUg60rlgwHnO3AQv+V7pO63uG9;
+ Expires=Mon, 13 Dec 2021 20:43:56 GMT; Path=/, AWSAL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B0aXRsZT0iR3VzdGF2byBEdXJhbmQiOyByZWw9ImF1dGhvciIsIDxodHRwOi8vb3JjaWQub3JnLzAwMDAtMDAwMi0xNzMxLTUzNDY+OyB0aXRsZT0iUm9iaW4gQmVyam9uIjsgcmVsPSJhdXRob3IiLCA8aHR0cDovL29yY2lkLm9yZy8wMDAwLTAwMDEtODI0OS03Mzg4PjsgdGl0bGU9IlNlYmFzdGlhbiBLYXJjaGVyIjsgcmVsPSJhdXRob3IiLCA8aHR0cDovL29yY2lkLm9yZy8wMDAwLTAwMDItODQwNi0zODcxPjsgdGl0bGU9Ik1hcnlhbm4gTWFydG9uZSI7IHJlbD0iYXV0aG9yIiwgPGh0dHA6Ly9vcmNpZC5vcmcvMDAwMC0wMDAzLTQwNjAtNzM2MD47IHRpdGxlPSJUaW1vdGh5IENsYXJrIjsgcmVsPSJhdXRob3Ii
+ Access-Control-Expose-Headers:
+ - Link
+ Access-Control-Allow-Headers:
+ - X-Requested-With, Accept, Accept-Encoding, Accept-Charset, Accept-Language,
+ Accept-Ranges, Cache-Control
+ Access-Control-Allow-Origin:
+ - "*"
+ Vary:
+ - Accept-Encoding
+ Content-Encoding:
+ - gzip
+ Server:
+ - Jetty(9.4.40.v20210413)
+ X-Ratelimit-Limit:
+ - '50'
+ X-Ratelimit-Interval:
+ - 1s
+ X-Api-Pool:
+ - polite
+ X-Rate-Limit-Limit:
+ - '50'
+ X-Rate-Limit-Interval:
+ - 1s
+ Permissions-Policy:
+ - interest-cohort=()
+ Connection:
+ - close
+ body:
+ encoding: ASCII-8BIT
+ string: !binary |-
+ H4sIAAAAAAAAAM1ba3LbOBL+v1V7B5R+bMVV4ktvaRRPOX4kztiJx3JmZ6a2ygWRkASbJDgAaVup/bF32EvsPfYme5LtBkiJsilHijOx/yQiHo1Gv/B1Ax7+eBeF5IZJxUX8uubZbo2w2BcBj6eva58ujqxe7cfdvwx9KZSSbHIpmcrClMCsWL2uzdI0GTjO7e2tXYywhZw6f0jlz1hEnSYSX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9lb0uv1pcQzc6Tv4wxqZ01vE6fz5kaGyX/FxIFgoqdXzGqOhhHGYxYHSIvmdYGlD675s+jvFJTfkA/d+//k1OeHwNGvmYsPwm4pTCkQu4W9jkdxaLQFQivnaj5zmfTX8bkFTnOWLsdrX+T7OQS31aHYKgDgN7Z1ksOQIQXMogBiBA/coJrVpLpdS5WohdZifYvLi9GSwSajB6cIrjGKJETPPHLFgIVjORVGaeRQEipom+WwSvoKEAqTfbnRZWxy26ZMYKFoyaG8ZyH/BSLpvnjOpmVTD6HHpbl988Cm8gw4gBNyAIwChn3cAGABRGCQu3Rjq/gEYCSHn0bMhml8DmAwsBA+m75RNjHgZKRjwG3ILmsDcWWUq8NsEgq59Wad3ig48C0hxOQEsIZw6sEz4Gj5pCcozAquG98jxHW9y6LGr9Hr+BnpZdVa8wFi9j81cjK93Dxd94l5rNe497fwc6dPSfYeffQ2fxJ9p5x/JvwJc0i7b/A7B3mRdKPwAA
+ http_version:
+ recorded_at: Mon, 06 Dec 2021 20:43:56 GMT
+recorded_with: VCR 3.0.3
diff --git a/spec/metadata_spec.rb b/spec/metadata_spec.rb
index 4204fb34..35044ae7 100644
--- a/spec/metadata_spec.rb
+++ b/spec/metadata_spec.rb
@@ -54,7 +54,7 @@
end
it "github" do
- id = "https://github.com/datacite/maremma"
+ id = "https://github.com/datacite/maremma/blob/master/codemeta.json"
expect(subject.find_from_format(id: id)).to eq("codemeta")
end
diff --git a/spec/readers/cff_reader_spec.rb b/spec/readers/cff_reader_spec.rb
new file mode 100644
index 00000000..2387e97c
--- /dev/null
+++ b/spec/readers/cff_reader_spec.rb
@@ -0,0 +1,136 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe Briard::Metadata, vcr: true do
+ let(:input) { "https://github.com/citation-file-format/ruby-cff/blob/main/CITATION.cff" }
+
+ subject { Briard::Metadata.new(input: input) }
+
+ context "get cff metadata" do
+ it "ruby-cff" do
+ expect(subject.valid?).to be true
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.1184077")
+ expect(subject.url).to eq("https://github.com/citation-file-format/ruby-cff")
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
+ expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"The University of Manchester, UK"}], "familyName"=>"Haines", "givenName"=>"Robert", "name"=>"Haines, Robert", "nameIdentifiers"=>
+ [{"nameIdentifier"=>"https://orcid.org/0000-0002-9538-7919",
+ "nameIdentifierScheme"=>"ORCID",
+ "schemeUri"=>"https://orcid.org"}], "nameType"=>"Personal"}, {"name"=>"The Ruby Citation File Format Developers", "nameType"=>"Organizational"}])
+ expect(subject.titles).to eq([{"title"=>"Ruby CFF Library"}])
+ expect(subject.descriptions.first["description"]).to start_with("This library provides a Ruby interface to manipulate Citation File Format files")
+ expect(subject.subjects).to eq([{"subject"=>"ruby"},
+ {"subject"=>"credit"},
+ {"subject"=>"software citation"},
+ {"subject"=>"research software"},
+ {"subject"=>"software sustainability"},
+ {"subject"=>"metadata"},
+ {"subject"=>"citation file format"},
+ {"subject"=>"CFF"}])
+ expect(subject.version_info).to eq("0.9.0")
+ expect(subject.dates).to eq([{"date"=>"2021-08-18", "dateType"=>"Issued"}])
+ expect(subject.publication_year).to eq("2021")
+ expect(subject.publisher).to eq("GitHub")
+ expect(subject.rights_list).to eq([{"rights"=>"Apache License 2.0",
+ "rightsIdentifier"=>"apache-2.0",
+ "rightsIdentifierScheme"=>"SPDX",
+ "rightsUri"=>"http://www.apache.org/licenses/LICENSE-2.0",
+ "schemeUri"=>"https://spdx.org/licenses/"}])
+ end
+
+ it "cff-converter-python" do
+ input = "https://github.com/citation-file-format/cff-converter-python/blob/main/CITATION.cff"
+ subject = Briard::Metadata.new(input: input)
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.1162057")
+ expect(subject.url).to eq("https://github.com/citation-file-format/cff-converter-python")
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
+ expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"Netherlands eScience Center"}],
+ "familyName"=>"Spaaks",
+ "givenName"=>"Jurriaan H.",
+ "name"=>"Spaaks, Jurriaan H.",
+ "nameIdentifiers"=>
+ [{"nameIdentifier"=>"https://orcid.org/0000-0002-7064-4069",
+ "nameIdentifierScheme"=>"ORCID",
+ "schemeUri"=>"https://orcid.org"}],
+ "nameType"=>"Personal"},
+ {"affiliation"=>[{"name"=>"Netherlands eScience Center"}],
+ "familyName"=>"Klaver",
+ "givenName"=>"Tom",
+ "name"=>"Klaver, Tom",
+ "nameType"=>"Personal"},
+ {"affiliation"=>[{"name"=>"Netherlands eScience Center"}],
+ "familyName"=>"Verhoeven",
+ "givenName"=>"Stefan",
+ "name"=>"Verhoeven, Stefan",
+ "nameIdentifiers"=>
+ [{"nameIdentifier"=>"https://orcid.org/0000-0002-5821-2060",
+ "nameIdentifierScheme"=>"ORCID",
+ "schemeUri"=>"https://orcid.org"}],
+ "nameType"=>"Personal"},
+ {"affiliation"=>[{"name"=>"Humboldt-Universit??t zu Berlin"}],
+ "familyName"=>"Druskat",
+ "givenName"=>"Stephan",
+ "name"=>"Druskat, Stephan",
+ "nameIdentifiers"=>
+ [{"nameIdentifier"=>"https://orcid.org/0000-0003-4925-7248",
+ "nameIdentifierScheme"=>"ORCID",
+ "schemeUri"=>"https://orcid.org"}],
+ "nameType"=>"Personal"},
+ {"affiliation"=>[{"name"=>"University of Oslo"}],
+ "familyName"=>"Leoncio",
+ "givenName"=>"Waldir",
+ "name"=>"Leoncio, Waldir",
+ "nameType"=>"Personal"}])
+ expect(subject.titles).to eq([{"title"=>"cffconvert"}])
+ expect(subject.descriptions.first["description"]).to start_with("Command line program to validate and convert CITATION.cff files")
+ expect(subject.subjects).to eq([{"subject"=>"bibliography"},
+ {"subject"=>"BibTeX"},
+ {"subject"=>"cff"},
+ {"subject"=>"citation"},
+ {"subject"=>"CITATION.cff"},
+ {"subject"=>"CodeMeta"},
+ {"subject"=>"EndNote"},
+ {"subject"=>"RIS"},
+ {"subject"=>"Citation File Format"}])
+ expect(subject.version_info).to eq("2.0.0")
+ expect(subject.dates).to eq([{"date"=>"2021-09-22", "dateType"=>"Issued"}])
+ expect(subject.publication_year).to eq("2021")
+ expect(subject.publisher).to eq("GitHub")
+ expect(subject.rights_list).to eq([{"rights"=>"Apache License 2.0",
+ "rightsIdentifier"=>"apache-2.0",
+ "rightsIdentifierScheme"=>"SPDX",
+ "rightsUri"=>"http://www.apache.org/licenses/LICENSE-2.0",
+ "schemeUri"=>"https://spdx.org/licenses/"}])
+ end
+
+ it "ruby-cff" do
+ expect(subject.valid?).to be true
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.1184077")
+ expect(subject.url).to eq("https://github.com/citation-file-format/ruby-cff")
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
+ expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"The University of Manchester, UK"}], "familyName"=>"Haines", "givenName"=>"Robert", "name"=>"Haines, Robert", "nameIdentifiers"=>
+ [{"nameIdentifier"=>"https://orcid.org/0000-0002-9538-7919",
+ "nameIdentifierScheme"=>"ORCID",
+ "schemeUri"=>"https://orcid.org"}], "nameType"=>"Personal"}, {"name"=>"The Ruby Citation File Format Developers", "nameType"=>"Organizational"}])
+ expect(subject.titles).to eq([{"title"=>"Ruby CFF Library"}])
+ expect(subject.descriptions.first["description"]).to start_with("This library provides a Ruby interface to manipulate Citation File Format files")
+ expect(subject.subjects).to eq([{"subject"=>"ruby"},
+ {"subject"=>"credit"},
+ {"subject"=>"software citation"},
+ {"subject"=>"research software"},
+ {"subject"=>"software sustainability"},
+ {"subject"=>"metadata"},
+ {"subject"=>"citation file format"},
+ {"subject"=>"CFF"}])
+ expect(subject.version_info).to eq("0.9.0")
+ expect(subject.dates).to eq([{"date"=>"2021-08-18", "dateType"=>"Issued"}])
+ expect(subject.publication_year).to eq("2021")
+ expect(subject.publisher).to eq("GitHub")
+ expect(subject.rights_list).to eq([{"rights"=>"Apache License 2.0",
+ "rightsIdentifier"=>"apache-2.0",
+ "rightsIdentifierScheme"=>"SPDX",
+ "rightsUri"=>"http://www.apache.org/licenses/LICENSE-2.0",
+ "schemeUri"=>"https://spdx.org/licenses/"}])
+ end
+ end
+end
diff --git a/spec/readers/codemeta_reader_spec.rb b/spec/readers/codemeta_reader_spec.rb
index 9f7c4c55..6db11d35 100644
--- a/spec/readers/codemeta_reader_spec.rb
+++ b/spec/readers/codemeta_reader_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
describe Briard::Metadata, vcr: true do
- let(:input) { "https://github.com/datacite/maremma" }
+ let(:input) { "https://github.com/datacite/maremma/blob/master/codemeta.json" }
subject { Briard::Metadata.new(input: input) }
diff --git a/spec/utils_spec.rb b/spec/utils_spec.rb
index e0bc33ed..fcdad8b0 100644
--- a/spec/utils_spec.rb
+++ b/spec/utils_spec.rb
@@ -507,12 +507,24 @@
expect(response).to eq(:owner=>"datacite", :repo=>"metadata-reports", :release=>"master", :path=>"software/codemeta.json")
end
+ it "github_from_url cff file" do
+ url = "https://github.com/citation-file-format/ruby-cff/blob/main/CITATION.cff"
+ response = subject.github_from_url(url)
+ expect(response).to eq(:owner=>"citation-file-format", :path=>"CITATION.cff", :release=>"main", :repo=>"ruby-cff")
+ end
+
it "github_as_codemeta_url" do
url = "https://github.com/datacite/bolognese"
response = subject.github_as_codemeta_url(url)
expect(response).to eq("https://raw.githubusercontent.com/datacite/bolognese/master/codemeta.json")
end
+ it "github_as_cff_url" do
+ url = "https://github.com/citation-file-format/ruby-cff"
+ response = subject.github_as_cff_url(url)
+ expect(response).to eq("https://raw.githubusercontent.com/citation-file-format/ruby-cff/main/CITATION.cff")
+ end
+
it "github_from_url file" do
url = "https://github.com/datacite/metadata-reports/blob/master/software/codemeta.json"
response = subject.github_as_codemeta_url(url)
diff --git a/spec/writers/cff_writer_spec.rb b/spec/writers/cff_writer_spec.rb
new file mode 100644
index 00000000..294cb425
--- /dev/null
+++ b/spec/writers/cff_writer_spec.rb
@@ -0,0 +1,45 @@
+# frozen_string_literal: true
+
+# require 'spec_helper'
+
+# describe Briard::Metadata, vcr: true do
+# context "write metadata as codemeta" do
+# # it "SoftwareSourceCode DataCite JSON" do
+# # input = fixture_path + "datacite_software.json"
+# # subject = Briard::Metadata.new(input: input, from: "datacite_json")
+# # expect(subject.valid?).to be true
+# # json = JSON.parse(subject.codemeta)
+# # expect(json["@context"]).to eq("https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld")
+# # expect(json["@id"]).to eq("https://doi.org/10.5063/f1m61h5x")
+# # expect(json["@type"]).to eq("SoftwareSourceCode")
+# # expect(json["identifier"]).to eq("https://doi.org/10.5063/f1m61h5x")
+# # expect(json["agents"]).to eq("type"=>"Person", "name"=>"Matthew B. Jones", "givenName"=>"Matthew B.", "familyName"=>"Jones")
+# # expect(json["title"]).to eq("dataone: R interface to the DataONE network of data repositories")
+# # expect(json["datePublished"]).to eq("2016")
+# # expect(json["publisher"]).to eq("KNB Data Repository")
+# # end
+
+# it "SoftwareSourceCode DataCite" do
+# input = "https://doi.org/10.5063/f1m61h5x"
+# subject = Briard::Metadata.new(input: input, from: "datacite")
+# expect(subject.valid?).to be true
+# json = JSON.parse(subject.codemeta)
+# expect(json["@context"]).to eq("https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld")
+# expect(json["@id"]).to eq("https://doi.org/10.5063/f1m61h5x")
+# expect(json["@type"]).to eq("SoftwareSourceCode")
+# expect(json["authors"]).to eq([{"name"=>"Jones, Matthew B.; Slaughter, Peter; Nahf, Rob; Boettiger, Carl ; Jones, Chris; Read, Jordan; Walker, Lauren; Hart, Edmund; Chamberlain, Scott", "nameIdentifiers" => [], "affiliation" => []}])
+# expect(json["name"]).to eq("dataone: R interface to the DataONE network of data repositories")
+# expect(json["datePublished"]).to eq("2016")
+# expect(json["publisher"]).to eq("KNB Data Repository")
+# end
+
+# it "SoftwareSourceCode DataCite check codemeta v2" do
+# input = "https://doi.org/10.5063/f1m61h5x"
+# subject = Briard::Metadata.new(input: input, from: "datacite")
+# expect(subject.valid?).to be true
+# json = JSON.parse(subject.codemeta)
+# expect(json["agents"]).to be_nil
+# expect(json["title"]).to be_nil
+# end
+# end
+# end