commonmeta-ruby 3.0.8 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/Gemfile.lock +11 -13
- data/bin/commonmeta +1 -1
- data/commonmeta.gemspec +0 -1
- data/lib/commonmeta/crossref_utils.rb +4 -7
- data/lib/commonmeta/metadata.rb +4 -10
- data/lib/commonmeta/version.rb +1 -1
- data/lib/commonmeta.rb +0 -1
- data/spec/cli_spec.rb +21 -1
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_crossref_xml.yml +107 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml.yml +52 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml_refresh.yml +107 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_crossref_xml.yml +2189 -0
- data/spec/metadata_spec.rb +1 -1
- data/spec/readers/datacite_reader_spec.rb +1 -1
- data/spec/writers/crossref_xml_writer_spec.rb +1 -1
- metadata +4 -22
data/spec/metadata_spec.rb
CHANGED
@@ -135,7 +135,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
135
135
|
it 'missing_comma' do
|
136
136
|
json = File.read("#{fixture_path}datacite_software_missing_comma.json")
|
137
137
|
response = subject.jsonlint(json)
|
138
|
-
expect(response).to eq(['expected comma, not a string (after doi) at line 4, column 11 [parse.c:
|
138
|
+
expect(response).to eq(['expected comma, not a string (after doi) at line 4, column 11 [parse.c:416]'])
|
139
139
|
end
|
140
140
|
|
141
141
|
it 'overlapping_keys' do
|
@@ -47,7 +47,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
47
47
|
input = "#{fixture_path}datacite_software_missing_comma.json"
|
48
48
|
subject = described_class.new(input: input, from: 'datacite', show_errors: true)
|
49
49
|
# expect(subject.valid?).to be false
|
50
|
-
expect(subject.errors).to eq(['expected comma, not a string (after doi) at line 4, column 11 [parse.c:
|
50
|
+
expect(subject.errors).to eq(['expected comma, not a string (after doi) at line 4, column 11 [parse.c:416]'])
|
51
51
|
expect(subject.codemeta.nil?).to be(true)
|
52
52
|
end
|
53
53
|
|
@@ -27,7 +27,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'posted_content' do
|
30
|
-
subject = described_class.new(input: '10.1101/2020.12.01.406702')
|
30
|
+
subject = described_class.new(input: '10.1101/2020.12.01.406702', depositor: 'test', email: 'info@example.org', registrant: 'test')
|
31
31
|
expect(subject.valid?).to be true
|
32
32
|
expect(subject.id).to eq('https://doi.org/10.1101/2020.12.01.406702')
|
33
33
|
expect(subject.url).to eq('http://biorxiv.org/lookup/doi/10.1101/2020.12.01.406702')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmeta-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -132,26 +132,6 @@ dependencies:
|
|
132
132
|
- - "~>"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '2.0'
|
135
|
-
- !ruby/object:Gem::Dependency
|
136
|
-
name: dotenv
|
137
|
-
requirement: !ruby/object:Gem::Requirement
|
138
|
-
requirements:
|
139
|
-
- - "~>"
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '2.1'
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: 2.1.1
|
145
|
-
type: :runtime
|
146
|
-
prerelease: false
|
147
|
-
version_requirements: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '2.1'
|
152
|
-
- - ">="
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: 2.1.1
|
155
135
|
- !ruby/object:Gem::Dependency
|
156
136
|
name: edtf
|
157
137
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1056,6 +1036,7 @@ files:
|
|
1056
1036
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/default.yml
|
1057
1037
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_bibtex.yml
|
1058
1038
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml.yml
|
1039
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml_refresh.yml
|
1059
1040
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_datacite.yml
|
1060
1041
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_schema_org.yml
|
1061
1042
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/default.yml
|
@@ -1072,6 +1053,7 @@ files:
|
|
1072
1053
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_jats.yml
|
1073
1054
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_schema_org.yml
|
1074
1055
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/default.yml
|
1056
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_crossref_xml.yml
|
1075
1057
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_datacite.yml
|
1076
1058
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_schema_org.yml
|
1077
1059
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/crossref.yml
|