elibri_onix 0.5.2 → 0.5.3

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
  SHA256:
3
- metadata.gz: 26542b4c258628d80217924c479e14ff7031b56c5f02e5bd5fac7819431debc7
4
- data.tar.gz: c1de2796862089fd0709d68e9a2736fe996aa4da451cec2376c9dd1a3268b105
3
+ metadata.gz: 30ec7019130d683e54e567c7db336f7b5f238c4d4c337a47b0e042f2a87c294d
4
+ data.tar.gz: 53466c5357b02f59c8c0711c8cba38209fcac581c168a6e132fd7edfd4a35129
5
5
  SHA512:
6
- metadata.gz: 6c637c20a1ce6bfe205236e8f222c6486c037f2a3a4aef35682631a603a90361e7a4a7ec9821033794f29f115e2edcba5971593872cb056e65e4f6a42a35bf91
7
- data.tar.gz: 6ae7d814b132e1c41ab566838941dcdd62ac1b71c07181d69b11e08847426e44d74e8b6508e371d9396f5419dd3f1fe14a3fa5e770b302a25180d0fae9f7dadd
6
+ metadata.gz: 1b149cc3c4cfb3c4bd633d56298d0e639b52bdb17f22a9c178279dda902b7fa44b03af4fb9b09485bdadec2ec86d5c5b252a3c1b2f71e9fb55d669284174d860
7
+ data.tar.gz: 2f38194056ee21cc86a7436cec7f9b52069aec06c76ffc5e8f2d7acd90d1ead72ad4f9fc4a0483d4280d11eebe58f76f21d0f90538d6d0e78595c30a863eae94
@@ -34,7 +34,12 @@ module Elibri
34
34
  end
35
35
 
36
36
  def content_type_name
37
- Elibri::ONIX::Dict::Release_3_0::ResourceContentType.find_by_onix_code(@content_type).const_name.downcase
37
+ content_type = Elibri::ONIX::Dict::Release_3_0::ResourceContentType.find_by_onix_code(@content_type)
38
+ if content_type
39
+ content_type.const_name.downcase
40
+ else
41
+ raise ArgumentError, "Cannot find ResourceContentType for #{@content_type}"
42
+ end
38
43
  end
39
44
 
40
45
  #def audience_name
@@ -2,7 +2,7 @@ module Elibri
2
2
  module ONIX
3
3
  z = $VERBOSE
4
4
  $VERBOSE = nil
5
- VERSION = "0.5.2"
5
+ VERSION = "0.5.3"
6
6
  Version = VERSION
7
7
  $VERBOSE = z
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Urbanski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-12-04 00:00:00.000000000 Z
12
+ date: 2019-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport