briard 2.6.5 → 2.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +23 -23
- data/lib/briard/readers/schema_org_reader.rb +4 -2
- data/lib/briard/utils.rb +3 -0
- data/lib/briard/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml +93 -0
- data/spec/readers/schema_org_reader_spec.rb +1 -1
- data/spec/writers/crossref_writer_spec.rb +30 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d64a16f26d26159e913ec23feff66571b34c3007e50724106f4dfdf555d97922
|
4
|
+
data.tar.gz: 11673a0344a3b02467b9cf2d1de7bb0a982e29debc58ece207af900212fd849d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b3c060bb7e30eccffaf37f2e03fb248c461fa5b0713ce61e33b6a226880425bfbb76375cb80f2ab81f15631ce116a95b87bc60d1804fdb7845cca4d3f6d958f
|
7
|
+
data.tar.gz: 6b7acb768ed3a91c5812df3713bb31636a084f5decae98eeb1e31fc8c1e44088f5611e31087796b5d1a56928c70f0bca02795d97592000bd829e46ead588618d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.6.5](https://github.com/front-matter/briard/tree/v2.6.5) (2022-10-04)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/front-matter/briard/compare/v2.6.4...v2.6.5)
|
6
|
+
|
3
7
|
## [v2.6.4](https://github.com/front-matter/briard/tree/v2.6.4) (2022-10-04)
|
4
8
|
|
5
9
|
[Full Changelog](https://github.com/front-matter/briard/compare/v2.6.3...v2.6.4)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
briard (2.6.
|
4
|
+
briard (2.6.6)
|
5
5
|
activesupport (>= 4.2.5)
|
6
6
|
base32-url (>= 0.5.0, < 1)
|
7
7
|
benchmark_methods (~> 0.7)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
multi_json (~> 1.15)
|
106
106
|
rack (~> 2.2)
|
107
107
|
rdf (~> 3.2, >= 3.2.9)
|
108
|
-
json-ld-preloaded (3.2.
|
108
|
+
json-ld-preloaded (3.2.2)
|
109
109
|
json-ld (~> 3.2)
|
110
110
|
rdf (~> 3.2)
|
111
111
|
jsonlint (0.3.0)
|
@@ -133,10 +133,10 @@ GEM
|
|
133
133
|
multi_json (1.15.0)
|
134
134
|
multipart-post (2.2.3)
|
135
135
|
namae (1.1.1)
|
136
|
-
nokogiri (1.13.
|
136
|
+
nokogiri (1.13.9)
|
137
137
|
mini_portile2 (~> 2.8.0)
|
138
138
|
racc (~> 1.4)
|
139
|
-
oj (3.13.
|
139
|
+
oj (3.13.22)
|
140
140
|
oj_mimic_json (1.0.1)
|
141
141
|
optimist (3.0.1)
|
142
142
|
parallel (1.22.1)
|
@@ -172,47 +172,47 @@ GEM
|
|
172
172
|
rdf-turtle (3.2.1)
|
173
173
|
ebnf (~> 2.3)
|
174
174
|
rdf (~> 3.2)
|
175
|
-
rdf-vocab (3.2.
|
175
|
+
rdf-vocab (3.2.3)
|
176
176
|
rdf (~> 3.2, >= 3.2.4)
|
177
177
|
rdf-xsd (3.2.1)
|
178
178
|
rdf (~> 3.2)
|
179
179
|
rexml (~> 3.2)
|
180
180
|
regexp_parser (2.6.0)
|
181
181
|
rexml (3.2.5)
|
182
|
-
rspec (3.
|
183
|
-
rspec-core (~> 3.
|
184
|
-
rspec-expectations (~> 3.
|
185
|
-
rspec-mocks (~> 3.
|
186
|
-
rspec-core (3.
|
187
|
-
rspec-support (~> 3.
|
188
|
-
rspec-expectations (3.
|
182
|
+
rspec (3.12.0)
|
183
|
+
rspec-core (~> 3.12.0)
|
184
|
+
rspec-expectations (~> 3.12.0)
|
185
|
+
rspec-mocks (~> 3.12.0)
|
186
|
+
rspec-core (3.12.0)
|
187
|
+
rspec-support (~> 3.12.0)
|
188
|
+
rspec-expectations (3.12.0)
|
189
189
|
diff-lcs (>= 1.2.0, < 2.0)
|
190
|
-
rspec-support (~> 3.
|
191
|
-
rspec-mocks (3.
|
190
|
+
rspec-support (~> 3.12.0)
|
191
|
+
rspec-mocks (3.12.0)
|
192
192
|
diff-lcs (>= 1.2.0, < 2.0)
|
193
|
-
rspec-support (~> 3.
|
194
|
-
rspec-support (3.
|
193
|
+
rspec-support (~> 3.12.0)
|
194
|
+
rspec-support (3.12.0)
|
195
195
|
rspec-xsd (0.1.0)
|
196
196
|
nokogiri (~> 1.6)
|
197
197
|
rspec (~> 3)
|
198
|
-
rubocop (1.
|
198
|
+
rubocop (1.38.0)
|
199
199
|
json (~> 2.3)
|
200
200
|
parallel (~> 1.10)
|
201
201
|
parser (>= 3.1.2.1)
|
202
202
|
rainbow (>= 2.2.2, < 4.0)
|
203
203
|
regexp_parser (>= 1.8, < 3.0)
|
204
204
|
rexml (>= 3.2.5, < 4.0)
|
205
|
-
rubocop-ast (>= 1.
|
205
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
206
206
|
ruby-progressbar (~> 1.7)
|
207
207
|
unicode-display_width (>= 1.4.0, < 3.0)
|
208
|
-
rubocop-ast (1.
|
208
|
+
rubocop-ast (1.23.0)
|
209
209
|
parser (>= 3.1.1.0)
|
210
210
|
rubocop-performance (1.15.0)
|
211
211
|
rubocop (>= 1.7.0, < 2.0)
|
212
212
|
rubocop-ast (>= 0.4.0)
|
213
213
|
rubocop-rake (0.6.0)
|
214
214
|
rubocop (~> 1.0)
|
215
|
-
rubocop-rspec (2.
|
215
|
+
rubocop-rspec (2.14.2)
|
216
216
|
rubocop (~> 1.33)
|
217
217
|
ruby-progressbar (1.11.0)
|
218
218
|
scanf (1.0.0)
|
@@ -222,10 +222,10 @@ GEM
|
|
222
222
|
simplecov_json_formatter (~> 0.1)
|
223
223
|
simplecov-html (0.12.3)
|
224
224
|
simplecov_json_formatter (0.1.4)
|
225
|
-
sxp (1.2.
|
226
|
-
matrix
|
225
|
+
sxp (1.2.3)
|
226
|
+
matrix (~> 0.4)
|
227
227
|
rdf (~> 3.2)
|
228
|
-
temple (0.
|
228
|
+
temple (0.9.1)
|
229
229
|
thor (1.2.1)
|
230
230
|
tilt (2.0.11)
|
231
231
|
tzinfo (2.0.5)
|
@@ -33,7 +33,7 @@ module Briard
|
|
33
33
|
if response.body['data'].is_a?(Hash)
|
34
34
|
string = response.body.dig('data', 'html', 'head', 'script', 1, '__content__')
|
35
35
|
else
|
36
|
-
doc = Nokogiri::
|
36
|
+
doc = Nokogiri::HTML(response.body.fetch('data', nil), nil, 'UTF-8')
|
37
37
|
|
38
38
|
# workaround for xhtml documents
|
39
39
|
nodeset = doc.at("script[type='application/ld+json']")
|
@@ -50,7 +50,7 @@ module Briard
|
|
50
50
|
# workaround for html language attribute if no language is set via schema.org
|
51
51
|
lang = doc.at('html')['lang']
|
52
52
|
hsh['inLanguage'] = lang if hsh['inLanguage'].blank?
|
53
|
-
|
53
|
+
|
54
54
|
# workaround if issn not included with schema.org
|
55
55
|
name = doc.at("meta[property='og:site_name']")
|
56
56
|
issn = doc.at("meta[name='citation_issn']")
|
@@ -186,6 +186,8 @@ module Briard
|
|
186
186
|
language = case meta.fetch('inLanguage', nil)
|
187
187
|
when String
|
188
188
|
meta.fetch('inLanguage')
|
189
|
+
when Array
|
190
|
+
meta.fetch('inLanguage').first
|
189
191
|
when Object
|
190
192
|
meta.dig('inLanguage', 'alternateName') || meta.dig('inLanguage', 'name')
|
191
193
|
end
|
data/lib/briard/utils.rb
CHANGED
@@ -939,6 +939,9 @@ module Briard
|
|
939
939
|
scheme_uri = nil
|
940
940
|
end
|
941
941
|
|
942
|
+
# alternatively find the nameIdentifier in the identifer attribute
|
943
|
+
c["@id"] = c["identifier"] if c["identifier"].present? && c["@id"].blank?
|
944
|
+
|
942
945
|
# alternatively find the nameIdentifier in the sameAs attribute
|
943
946
|
c["@id"] = c["sameAs"].first if Array(c["sameAs"]).find { |item| URI(item).host == "orcid.org" }
|
944
947
|
|
data/lib/briard/version.rb
CHANGED
@@ -0,0 +1,93 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://donnywinston.com/posts/implementing-the-fair-principles-through-fair-enabling-artifacts-and-services
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; Maremma/4.9.8; mailto:info@front-matter.io)
|
12
|
+
Accept:
|
13
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip,deflate
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 301
|
19
|
+
message: Moved Permanently
|
20
|
+
headers:
|
21
|
+
Age:
|
22
|
+
- '348'
|
23
|
+
Cache-Control:
|
24
|
+
- public, max-age=0, must-revalidate
|
25
|
+
Content-Length:
|
26
|
+
- '4510'
|
27
|
+
Content-Type:
|
28
|
+
- text/html; charset=UTF-8
|
29
|
+
Date:
|
30
|
+
- Thu, 03 Nov 2022 18:32:01 GMT
|
31
|
+
Etag:
|
32
|
+
- '"09ec50922b882e8846b101682371bfa4-ssl-df"'
|
33
|
+
Location:
|
34
|
+
- "/posts/implementing-the-fair-principles-through-fair-enabling-artifacts-and-services/"
|
35
|
+
Server:
|
36
|
+
- Netlify
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
X-Nf-Request-Id:
|
40
|
+
- 01GGZCHYW6KPN4B5Z8S0MQR47M
|
41
|
+
body:
|
42
|
+
enco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jWCx+lYzR+DRsAUGb9jWC4r70F5/+0QzvI2g+YHr1yK0vufnTX5a5U/yUYkmA8Lzb9N4YOXD/Y3WtNDyNiR+7Wg2NV5WJ6e3uG+O0ox50PkHIfvPzFy+Cb/uLRL8pug7a7sXxZVzhCOPY5Rn7BdneUJMjxESy8E6a5jdKeEB69WcK12a6DkdN7h7qptoiVzaq6Ife7vTpk9M0AujglhxPRL+xgb6aBHqd38MWr63OvExyLmNxxv8t68GUQgUpy3FAIUs6OQ5Fia4BvRKq/Qe1e0xPjL44o6G15w2CDLfoXxaUrPxXXIWHrwE/8U+fhw6Syz5gbwEWwR+Ou+74LJH+FQN9go8ui3X1I04zfWxC7zAP6/ch/+AU5z+SdvbSD1EYpbM/p3acYDVLIQzjabVsh+AhpdnyrclXZfNIRX+BQeVE+6xzj87zKttQI6b7qiwcksU9emQTralas3OPNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNye/p5uTgxYX/4mnzu7lZaTa27MWAQEUOOWe2nv4VO0LPb3f18v/kBqb/evbY/8fg/wFP0+VpKDwAAA==
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 03 Nov 2022 18:37:49 GMT
|
47
|
+
- request:
|
48
|
+
method: get
|
49
|
+
uri: https://donnywinston.com/posts/implementing-the-fair-principles-through-fair-enabling-artifacts-and-services/
|
50
|
+
body:
|
51
|
+
encoding: US-ASCII
|
52
|
+
string: ''
|
53
|
+
headers:
|
54
|
+
User-Agent:
|
55
|
+
- Mozilla/5.0 (compatible; Maremma/4.9.8; mailto:info@front-matter.io)
|
56
|
+
Accept:
|
57
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
58
|
+
Accept-Encoding:
|
59
|
+
- gzip,deflate
|
60
|
+
response:
|
61
|
+
status:
|
62
|
+
code: 200
|
63
|
+
message: OK
|
64
|
+
headers:
|
65
|
+
Age:
|
66
|
+
- '348'
|
67
|
+
Cache-Control:
|
68
|
+
- public, max-age=0, must-revalidate
|
69
|
+
Content-Encoding:
|
70
|
+
- gzip
|
71
|
+
Content-Length:
|
72
|
+
- '4510'
|
73
|
+
Content-Type:
|
74
|
+
- text/html; charset=UTF-8
|
75
|
+
Date:
|
76
|
+
- Thu, 03 Nov 2022 18:32:01 GMT
|
77
|
+
Etag:
|
78
|
+
- '"09ec50922b882e8846b101682371bfa4-ssl-df"'
|
79
|
+
Server:
|
80
|
+
- Netlify
|
81
|
+
Strict-Transport-Security:
|
82
|
+
- max-age=31536000
|
83
|
+
Vary:
|
84
|
+
- Accept-Encoding
|
85
|
+
X-Nf-Request-Id:
|
86
|
+
- 01GGZCHYZY06V7ZHB2E6VXPK59
|
87
|
+
body:
|
88
|
+
encoding: ASCII-8BIT
|
89
|
+
string: !binary |-
|
90
|
+
H4sIAAAAAAAAA+1be3Pbxnb/X59iy04zyUQA94XHqiITW9f3SlO7cW3XmU6SySyBJQmbBHgBUA/f65l+iH7CfpL+zgIUQUVOdNObmXQqeSQuzu6ePXsev3MWS5/+Q15l7c3GsWW7Xk1P6S9b2XIxcWWwbaZHp0tnc3ysXWtZtrR149rJtp0H6Y64bNtN4P68LS4n18HWBlm13ti2mK0cy6qydWU7GV08m7h84Y6zZV2t3USMdpNLi8fLwl1tqrrdj78q8nY5yd1lkbnAPxwXZdEWdhU0mV39hMO8qte2DXLXuqwtqnLPqXUrt1lWpZuUFc1pi3blphfrzcqtMaAoF6xdOvbHJxev2Mu6KLMCPQ17A0G3i6WnB89KO1vRyCd1W8xt1jbMljl77WqSr2F/ZX+oyvKGfVuUTVuVp+NukaPTJquLTctIvxO72ayKzJJ041X+5bumKqd/GX3tBb1uRydoX1aZnY1ORqTR5mQ8brKlW9uwqhfj0fEoz1pXr5u+H92bbb3ynXk29l3j0cfj0de0GgY9XVWLl1VDO8Rku22XVT06+e4vtwNeuhoyoI80iOeDPYBcrO3Cebn6CRdE+Gb2DipGNxYfiHp1dRUuantpW1uH8IBx1xwn89xkQstIpNzoWLp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GWT4tvqj1+uv2zm5bPalN9eXD8rXGncq/Lim397pp4qu7pZzF+NLyYjltVV01R1sSjKiS2r8mZdbZvp4B30+PbV0rh7K0gmLPJJ/061t2b/FNAntufHL0XfSa/hg9/gSx6n46XwXx9Zu+k3WVvNUBlJcczohTt94WPtOnG9xel3cKV41wF2dx9Nf8Poy5rpL108kgvsLx+PftPLx6OHXj5216FwYjavqzX7bJX/eVv98384dHttN9W2zBu2oAuKYzbbtmxZXX31We2HkWT9jAs2c/SliyMMd3XTkqRXS9vu7ba/zoHQdrW6YWtnS78lsGQXLLN0zeRnrMlVq9sbs7Bf7yuMWiK+aMhRXthFbddYF7vxk5dutQm7IJsXC2hu8Nr58Oao7u9/mttbo+FtU8853ORzcCjWCx+lYzR+DRsAUGb9jWC4r70F5/+0QzvI2g+YHr1yK0vufnTX5a5U/yUYkmA8Lzb9N4YOXD/Y3WtNDyNiR+7Wg2NV5WJ6e3uG+O0ox50PkHIfvPzFy+Cb/uLRL8pug7a7sXxZVzhCOPY5Rn7BdneUJMjxESy8E6a5jdKeEB69WcK12a6DkdN7h7qptoiVzaq6Ife7vTpk9M0AujglhxPRL+xgb6aBHqd38MWr63OvExyLmNxxv8t68GUQgUpy3FAIUs6OQ5Fia4BvRKq/Qe1e0xPjL44o6G15w2CDLfoXxaUrPxXXIWHrwE/8U+fhw6Syz5gbwEWwR+Ou+74LJH+FQN9go8ui3X1I04zfWxC7zAP6/ch/+AU5z+SdvbSD1EYpbM/p3acYDVLIQzjabVsh+AhpdnyrclXZfNIRX+BQeVE+6xzj87zKttQI6b7qiwcksU9emQTralas3OPNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNyePNye/p5uTgxYX/4mnzu7lZaTa27MWAQEUOOWe2nv4VO0LPb3f18v/kBqb/evbY/8fg/wFP0+VpKDwAAA==
|
91
|
+
http_version:
|
92
|
+
recorded_at: Thu, 03 Nov 2022 18:37:49 GMT
|
93
|
+
recorded_with: VCR 3.0.3
|
@@ -80,7 +80,7 @@ describe Briard::Metadata, vcr: true do
|
|
80
80
|
'resourceTypeGeneral' => 'Preprint', 'ris' => 'GEN', 'schemaOrg' => 'Article')
|
81
81
|
expect(subject.creators).to eq([{ 'affiliation' => [],
|
82
82
|
'familyName' => 'Fenner', 'givenName' => 'Martin', 'name' => 'Fenner, Martin', 'nameIdentifiers' => [{ 'nameIdentifier' => 'https://orcid.org/0000-0003-1419-2405', 'nameIdentifierScheme' => 'ORCID', 'schemeUri' => 'https://orcid.org' }], 'nameType' => 'Personal' }])
|
83
|
-
expect(subject.titles).to eq([{ 'title' => "A step forward for software citation: GitHub
|
83
|
+
expect(subject.titles).to eq([{ 'title' => "A step forward for software citation: GitHub's enhanced software citation support" }])
|
84
84
|
expect(subject.descriptions.first['description']).to start_with('On August 19, GitHub announced software citation')
|
85
85
|
expect(subject.subjects).to eq([{ 'subject' => 'news' }])
|
86
86
|
expect(subject.dates).to eq([{ 'date' => '2021-08-24T16:57:24Z', 'dateType' => 'Issued' },
|
@@ -119,5 +119,35 @@ describe Briard::Metadata, vcr: true do
|
|
119
119
|
expect(crossref.dig('titles',
|
120
120
|
'title')).to eq('Editorial by more than 200 health journals: Call for emergency action to limit global temperature increases, restore biodiversity, and protect health')
|
121
121
|
end
|
122
|
+
|
123
|
+
it 'schema.org from another science blog' do
|
124
|
+
input = 'https://donnywinston.com/posts/implementing-the-fair-principles-through-fair-enabling-artifacts-and-services/'
|
125
|
+
subject = described_class.new(input: input, from: 'schema_org')
|
126
|
+
expect(subject.valid?).to be true
|
127
|
+
expect(subject.doi).to eq('10.57099/11h5yt3819')
|
128
|
+
expect(subject.url).to eq('https://donnywinston.com/posts/implementing-the-fair-principles-through-fair-enabling-artifacts-and-services')
|
129
|
+
expect(subject.types['schemaOrg']).to eq('BlogPosting')
|
130
|
+
expect(subject.types['resourceTypeGeneral']).to eq('Preprint')
|
131
|
+
expect(subject.types['ris']).to eq('GEN')
|
132
|
+
expect(subject.types['citeproc']).to eq('post-weblog')
|
133
|
+
expect(subject.titles).to eq([{"title"=>"Implementing the FAIR Principles Through FAIR-Enabling Artifacts and Services"}])
|
134
|
+
expect(subject.creators).to eq([{"affiliation"=>[],
|
135
|
+
"familyName"=>"Winston",
|
136
|
+
"givenName"=>"Donny",
|
137
|
+
"name"=>"Winston, Donny",
|
138
|
+
"nameIdentifiers"=>
|
139
|
+
[{"nameIdentifier"=>"https://orcid.org/0000-0002-8424-0604",
|
140
|
+
"nameIdentifierScheme"=>"ORCID",
|
141
|
+
"schemeUri"=>"https://orcid.org"}],
|
142
|
+
"nameType"=>"Personal"}])
|
143
|
+
expect(subject.subjects).to eq([])
|
144
|
+
expect(subject.container).to eq('type' => 'Blog')
|
145
|
+
expect(subject.language).to eq('en-US')
|
146
|
+
expect(subject.rights_list).to eq([{
|
147
|
+
'rights' => 'Creative Commons Attribution 4.0 International', 'rightsUri' => 'https://creativecommons.org/licenses/by/4.0/legalcode', 'rightsIdentifier' => 'cc-by-4.0', 'rightsIdentifierScheme' => 'SPDX', 'schemeUri' => 'https://spdx.org/licenses/'
|
148
|
+
}])
|
149
|
+
crossref = Maremma.from_xml(subject.crossref).dig('doi_batch', 'body', 'posted_content')
|
150
|
+
expect(crossref.dig('titles', 'title')).to eq('Implementing the FAIR Principles Through FAIR-Enabling Artifacts and Services')
|
151
|
+
end
|
122
152
|
end
|
123
153
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: briard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -1373,6 +1373,7 @@ files:
|
|
1373
1373
|
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/another_schema_org_from_front-matter.yml
|
1374
1374
|
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml
|
1375
1375
|
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/posted_content.yml
|
1376
|
+
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml
|
1376
1377
|
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_front_matter.yml
|
1377
1378
|
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_zenodo.yml
|
1378
1379
|
- spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/climate_data.yml
|