cirneco 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cirneco/utils.rb +3 -3
- data/lib/cirneco/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bec2a66523f016aec30ad06305505bf2c8e6be4c
|
4
|
+
data.tar.gz: 6bb24f7901f54334102e4486188dcd094315c57b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53584d9e6df72e3da8605c2401f768fed2b0ce1327a9e40cc20f9813f101c1efa5c685595ca04ca305a0d12b8bc38c56ae1e53093957c00da2ba664da1e8b2d1
|
7
|
+
data.tar.gz: 97c47c60f6e82134e540f92a41bde4a8d28121c3878cda19b05062cfcc440d0afee938da975f0e6cad0af3f23b2b85d818f87ff08e76b8cd408bce7527205956
|
data/Gemfile.lock
CHANGED
data/lib/cirneco/utils.rb
CHANGED
@@ -246,7 +246,7 @@ module Cirneco
|
|
246
246
|
|
247
247
|
def post_metadata_for_work(metadata, options={})
|
248
248
|
prefix = options[:prefix] || ENV['PREFIX']
|
249
|
-
metadata["doi"]
|
249
|
+
metadata["doi"] = encode_doi(prefix, number: metadata["alternate_identifier"]) if metadata["doi"].blank?
|
250
250
|
|
251
251
|
work = Cirneco::Work.new(metadata)
|
252
252
|
return work.validation_errors if work.validation_errors.body["errors"].present?
|
@@ -266,7 +266,7 @@ module Cirneco
|
|
266
266
|
|
267
267
|
def post_and_hide_metadata_for_work(metadata, options={})
|
268
268
|
prefix = options[:prefix] || ENV['PREFIX']
|
269
|
-
metadata["doi"]
|
269
|
+
metadata["doi"] = encode_doi(prefix, number: metadata["alternate_identifier"]) if metadata["doi"].blank?
|
270
270
|
|
271
271
|
work = Cirneco::Work.new(metadata)
|
272
272
|
return work.validation_errors if work.validation_errors.body["errors"].present?
|
@@ -289,7 +289,7 @@ module Cirneco
|
|
289
289
|
|
290
290
|
def hide_metadata_for_work(metadata, options={})
|
291
291
|
prefix = options[:prefix] || ENV['PREFIX']
|
292
|
-
metadata["doi"]
|
292
|
+
metadata["doi"] = encode_doi(prefix, number: metadata["alternate_identifier"]) if metadata["doi"].blank?
|
293
293
|
|
294
294
|
work = Cirneco::Work.new(metadata)
|
295
295
|
return work.validation_errors if work.validation_errors.body["errors"].present?
|
data/lib/cirneco/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cirneco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|