bolognese 0.9.9 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bacba9acee9d8a4338c5f8d205965044f2ea32b
4
- data.tar.gz: 14ff4fdc282bc76b6836a4fe28b1553e10746c85
3
+ metadata.gz: 377a3f37e23c41ed429941877c78dcaab6cb99ff
4
+ data.tar.gz: 348385911730ae1b2048611b1aa25f0fab53014e
5
5
  SHA512:
6
- metadata.gz: e238cc8ba77137bd6ed6b8737644af53e35658cb8055bf97758652b9a85bd57d70c83c9bdc04304e3549b6cdb78907bb68f8d02bef226274b933203e599f90fa
7
- data.tar.gz: ed8213e1277438363eac0a1838f85d52936b7ea4c0d70d49c3611f53c9ff2928bf99f891fa1bed2d02299af2529f3567caaf80406d652faa2bc7674a7fe2f1e1
6
+ metadata.gz: 83ce137cc0f5c9f9349284f71651e64464d23c565f38fe5e36f7e3febf1f584d8763885c2a0c2fbf635664a1a3c5e5f916475b8a65177fea4ea6d5983433f804
7
+ data.tar.gz: b8eccf2ff3ecabb012dbbd8705b64da88a14f4e65009e3a777a4610f76544fc5524aff0b2d9b63b5526ee2ddd62fa93514151592e29cce38ee1f4c4a16d12c93
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.9.9)
4
+ bolognese (0.9.10)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -8,7 +8,6 @@ module Bolognese
8
8
  "graphic" => "ImageObject",
9
9
  "motion_picture" => "Movie",
10
10
  "article-journal" => "ScholarlyArticle",
11
- "computer_program" => "SoftwareSourceCode",
12
11
  "broadcast" => "VideoObject",
13
12
  "webpage" => "WebPage"
14
13
  }
@@ -20,7 +19,6 @@ module Bolognese
20
19
  "book" => "BOOK",
21
20
  "motion_picture" => "MPCT",
22
21
  "article-journal" => "JOUR",
23
- "computer_program" => "COMP",
24
22
  "broadcast" => "MPCT",
25
23
  "webpage" => "ELEC"
26
24
  }
@@ -36,7 +36,6 @@ module Bolognese
36
36
  "Model" => nil,
37
37
  "PhysicalObject" => nil,
38
38
  "Service" => nil,
39
- "Software" => "computer_program",
40
39
  "Sound" => "song",
41
40
  "Text" => "report",
42
41
  "Workflow" => nil,
@@ -107,7 +106,6 @@ module Bolognese
107
106
  "PublicationIssue" => nil,
108
107
  "ScholarlyArticle" => "article-journal",
109
108
  "Service" => nil,
110
- "SoftwareSourceCode" => "computer_program",
111
109
  "VideoObject" => "broadcast",
112
110
  "WebPage" => "webpage",
113
111
  "WebSite" => "webpage"
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.9.9"
2
+ VERSION = "0.9.10"
3
3
  end
@@ -12,8 +12,8 @@ module Bolognese
12
12
  "alternateName" => alternate_name,
13
13
  "author" => to_schema_org(author),
14
14
  "editor" => editor,
15
- "description" => Array.wrap(description).map { |d| d["text"] }.unwrap,
16
- "license" => license.present? ? license["id"] : nil,
15
+ "description" => Array.wrap(description).map { |d| d["text"] }.compact.unwrap,
16
+ "license" => Array.wrap(license).map { |l| l["id"] }.compact.unwrap,
17
17
  "version" => version,
18
18
  "keywords" => keywords,
19
19
  "inLanguage" => language,
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://search.datacite.org/api?fl=doi,xml,media,minted,updated&q=doi:10.5281/zenodo.48440&wt=json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Maremma - https://github.com/datacite/maremma
12
+ Accept:
13
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: ''
18
+ headers:
19
+ Access-Control-Allow-Methods:
20
+ - GET, POST, OPTIONS
21
+ Access-Control-Allow-Origin:
22
+ - "*"
23
+ Content-Type:
24
+ - application/json;charset=UTF-8
25
+ Date:
26
+ - Sat, 06 May 2017 14:02:20 GMT
27
+ Server:
28
+ - openresty/1.11.2.2
29
+ Content-Length:
30
+ - '3892'
31
+ Connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"responseHeader":{"status":0,"QTime":0},"response":{"numFound":1,"start":0,"docs":[{"xml":"PHJlc291cmNlIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC0zL21ldGFkYXRhLnhzZCI+CiAgPGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuNTI4MS96ZW5vZG8uNDg0NDA8L2lkZW50aWZpZXI+CiAgPGNyZWF0b3JzPgogICAgPGNyZWF0b3I+CiAgICAgIDxjcmVhdG9yTmFtZT5LcmlzdGlhbiBHYXJ6YTwvY3JlYXRvck5hbWU+CiAgICA8L2NyZWF0b3I+CiAgPC9jcmVhdG9ycz4KICA8dGl0bGVzPgogICAgPHRpdGxlPkFuYWx5c2lzIFRvb2xzIGZvciBDcm9zc292ZXIgRXhwZXJpbWVudCBvZiBVSSB1c2luZyBDaG9pY2UgQXJjaGl0ZWN0dXJlPC90aXRsZT4KICA8L3RpdGxlcz4KICA8cHVibGlzaGVyPlplbm9kbzwvcHVibGlzaGVyPgogIDxwdWJsaWNhdGlvblllYXI+MjAxNjwvcHVibGljYXRpb25ZZWFyPgogIDxzdWJqZWN0cz4KICAgIDxzdWJqZWN0PmNob2ljZSBhcmNoaXRlY3R1cmU8L3N1YmplY3Q+CiAgICA8c3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0O2JyIC8mZ3Q7CmBgYCZsdDsvcCZndDsKCiZsdDtwJmd0OyZsdDticiAvJmd0OwojIyBDb250cmlidXRpbmcmbHQ7L3AmZ3Q7CgombHQ7cCZndDsxLiBGb3JrIGl0ISZsdDticiAvJmd0OwoyLiBDcmVhdGUgeW91ciBmZWF0dXJlIGJyYW5jaDogYGdpdCBjaGVja291dCAtYiBteS1uZXctZmVhdHVyZWAmbHQ7YnIgLyZndDsKMy4gQ29tbWl0IHlvdXIgY2hhbmdlczogYGdpdCBjb21taXQgLWFtICZhbXA7IzM5O0FkZCBzb21lIGZlYXR1cmUmYW1wOyMzOTtgJmx0O2JyIC8mZ3Q7CjQuIFB1c2ggdG8gdGhlIGJyYW5jaDogYGdpdCBwdXNoIG9yaWdpbiBteS1uZXctZmVhdHVyZWAmbHQ7YnIgLyZndDsKNS4gU3VibWl0IGEgcHVsbCByZXF1ZXN0IDpEJmx0Oy9wJmd0OwoKJmx0O3AmZ3Q7Jmx0O2JyIC8mZ3Q7CiMjIExpY2Vuc2UmbHQ7L3AmZ3Q7CgombHQ7cCZndDtUaGlzIHdvcmsgc3VwcG9ydHMgbXkgUGhEIFRoZXNpcyBhdCBVbml2ZXJzaXR5IG9mIE1hbmNoZXN0ZXIuJmx0Oy9wJmd0OzwvZGVzY3JpcHRpb24+CiAgPC9kZXNjcmlwdGlvbnM+CjwvcmVzb3VyY2U+Cg==","minted":"2016-03-27T22:18:38Z","updated":"2016-04-04T15:04:33Z","doi":"10.5281/ZENODO.48440"}]}}
36
+
37
+ '
38
+ http_version:
39
+ recorded_at: Sat, 06 May 2017 14:02:20 GMT
40
+ recorded_with: VCR 3.0.3
@@ -126,7 +126,7 @@ describe Bolognese::Metadata, vcr: true do
126
126
  input = "https://github.com/datacite/maremma"
127
127
  subject = Bolognese::Metadata.new(input: input, from: "codemeta")
128
128
  json = JSON.parse(subject.citeproc)
129
- expect(json["type"]).to eq("computer_program")
129
+ expect(json["type"]).to eq("article-journal")
130
130
  expect(json["id"]).to eq("https://doi.org/10.5438/qeg0-3gm3")
131
131
  expect(json["DOI"]).to eq("10.5438/qeg0-3gm3")
132
132
  expect(json["title"]).to eq("Maremma: a Ruby library for simplified network calls")
@@ -19,6 +19,15 @@ describe Bolognese::Metadata, vcr: true do
19
19
  expect(json["author"]).to eq("name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner", "@type"=>"Person", "@id"=>"http://orcid.org/0000-0003-0077-4738")
20
20
  end
21
21
 
22
+ it "Schema.org JSON" do
23
+ input = "https://doi.org/10.5281/ZENODO.48440"
24
+ subject = Bolognese::Metadata.new(input: input, from: "datacite")
25
+ json = JSON.parse(subject.schema_org)
26
+ expect(json["@id"]).to eq("https://doi.org/10.5281/zenodo.48440")
27
+ expect(json["name"]).to eq("Analysis Tools for Crossover Experiment of UI using Choice Architecture")
28
+ expect(json["license"]).to eq("https://creativecommons.org/licenses/by-nc-sa/4.0")
29
+ end
30
+
22
31
  it "Schema.org JSON isReferencedBy" do
23
32
  input = "https://doi.org/10.5061/DRYAD.8515"
24
33
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
@@ -714,6 +714,7 @@ files:
714
714
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml
715
715
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml
716
716
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml
717
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml
717
718
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml
718
719
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml
719
720
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml