bolognese 0.9.52 → 0.9.53

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: e8d0a413fb8b206daae6535fdbee4d285998ca80
4
- data.tar.gz: 16f94eef364af4e719e43eb413f1ceaf32434088
3
+ metadata.gz: 9f01562810a69b0db58a381dbf0f9e175d7321b1
4
+ data.tar.gz: 78c1747d2ef9f71f6fb274b3f575ce4f8d0d3e93
5
5
  SHA512:
6
- metadata.gz: 0099440f4feaead4d7d20d26485051e905ec10b63bfbd6518907ab012238e5526a13807cf2043bcade963a9e47e122b8e971f062a820b9f51c7ec8f9b3b07d09
7
- data.tar.gz: aff8ab1122de13d6d5866cdc1783522896646e6c591957a70784b02ca7dfd35293842f73b043175a7adc43ef7c758dd30fdf88edb70c02ea74a90de159130687
6
+ metadata.gz: 4a0babc2898b45f2e72f7a7d77347dac0df29de2ccfdd72c414ba1e4e4e4f9e8d568a5246f76facec4fa3f2df35d73b4aaef1e3c46f21226268277c27ed41dab
7
+ data.tar.gz: cb3f3763a6b00824756b9ddd0eb87f6fb5b8d9e0814d4a63e7411c4ed330f7244981ae8e1626dcf5ea70f28f0f8259c83745cbb62dec91476ed159e4a8138973
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.9.52)
4
+ bolognese (0.9.53)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -62,7 +62,7 @@ module Bolognese
62
62
  attr_accessor :doi, :author, :title, :publisher, :contributor, :license,
63
63
  :date_accepted, :date_available, :date_copyrighted, :date_collected,
64
64
  :date_submitted, :date_valid, :date_created, :date_modified,
65
- :date_registered, :date_updated, :member_id, :data_center_id, :journal,
65
+ :date_registered, :date_updated, :provider_id, :client_id, :journal,
66
66
  :volume, :issue, :pagination, :url, :version, :keywords, :editor,
67
67
  :description, :alternate_name, :language, :content_size, :spatial_coverage,
68
68
  :schema_version, :additional_type, :has_part, :same_as,
@@ -97,6 +97,11 @@ module Bolognese
97
97
  exit 1
98
98
  end
99
99
  else
100
+ hsh = { "date_registered" => options.fetch("date_registered", nil),
101
+ "date_updated" => options.fetch("date_updated", nil),
102
+ "provider_id" => options.fetch("provider_id", nil),
103
+ "client_id" => options.fetch("client_id", nil),
104
+ "url" => options.fetch("url", nil) }
100
105
  string = input
101
106
  @from = from || find_from_format(string: string)
102
107
  end
@@ -110,8 +115,8 @@ module Bolognese
110
115
  @url = hsh.to_h["url"].presence
111
116
  @date_registered = hsh.to_h["date_registered"].presence
112
117
  @date_updated = hsh.to_h["date_updated"].presence
113
- @member_id = hsh.to_h["member_id"].presence
114
- @data_center_id = hsh.to_h["data_center_id"].presence
118
+ @provider_id = hsh.to_h["provider_id"].presence
119
+ @client_id = hsh.to_h["client_id"].presence
115
120
 
116
121
  @style = style || "apa"
117
122
  @locale = locale || "en-US"
@@ -276,12 +281,12 @@ module Bolognese
276
281
  @funding ||= metadata.fetch("funding", nil)
277
282
  end
278
283
 
279
- def member_id
280
- @member_id ||= metadata.fetch("member_id", nil)
284
+ def provider_id
285
+ @provider_id ||= metadata.fetch("provider_id", nil)
281
286
  end
282
287
 
283
- def data_center_id
284
- @data_center_id ||= metadata.fetch("data_center_id", nil)
288
+ def client_id
289
+ @client_id ||= metadata.fetch("client_id", nil)
285
290
  end
286
291
 
287
292
  def is_identical_to
@@ -35,8 +35,8 @@ module Bolognese
35
35
  { "string" => string,
36
36
  "date_registered" => attributes.fetch("minted", nil),
37
37
  "date_updated" => attributes.fetch("updated", nil),
38
- "member_id" => attributes.fetch("allocator_symbol", nil),
39
- "data_center_id" => attributes.fetch("datacentre_symbol", nil),
38
+ "provider_id" => attributes.fetch("allocator_symbol", nil),
39
+ "client_id" => attributes.fetch("datacentre_symbol", nil),
40
40
  "url" => url }
41
41
  end
42
42
 
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.9.52"
2
+ VERSION = "0.9.53"
3
3
  end
@@ -43,8 +43,8 @@ module Bolognese
43
43
  "spatial_coverage" => spatial_coverage,
44
44
  "funding" => funding,
45
45
  "schema_version" => schema_version,
46
- "member_id" => member_id,
47
- "data_center_id" => data_center_id,
46
+ "provider_id" => provider_id,
47
+ "client_id" => client_id,
48
48
  "provider" => provider
49
49
  }.compact
50
50
  JSON.pretty_generate hsh.presence
@@ -39,8 +39,8 @@ module Bolognese
39
39
  "geo-location" => spatial_coverage,
40
40
  "funding-reference" => funding,
41
41
  "schemaVersion" => schema_version,
42
- "member_id" => member_id,
43
- "data_center_id" => data_center_id,
42
+ "provider_id" => provider_id,
43
+ "client_id" => client_id,
44
44
  "provider" => provider
45
45
  }.compact
46
46
  JSON.pretty_generate hsh.presence
@@ -72,8 +72,8 @@ describe Bolognese::Metadata, vcr: true do
72
72
  expect(crosscite.fetch("author").first).to eq("type"=>"Person", "familyName" => "Ollomo", "givenName" => "Benjamin", "name" => "Benjamin Ollomo")
73
73
  expect(crosscite.fetch("date_registered")).to eq("2011-02-01T17:32:02Z")
74
74
  expect(crosscite.fetch("date_updated")).to eq("2017-07-14T01:32:56Z")
75
- expect(crosscite.fetch("member_id")).to eq("CDL")
76
- expect(crosscite.fetch("data_center_id")).to eq("CDL.DRYAD")
75
+ expect(crosscite.fetch("provider_id")).to eq("CDL")
76
+ expect(crosscite.fetch("client_id")).to eq("CDL.DRYAD")
77
77
  end
78
78
 
79
79
  it "maremma" do
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.52
4
+ version: 0.9.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner