cocina-models 0.118.0 → 0.118.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee0ad9dfc1b1845db07b8d94510214d98be20b7d732e0909dfe1935c046e9a34
4
- data.tar.gz: 60f04cbd3e7531c45357c546d490851b8b781f0224468c2d2c81d9e3e550575f
3
+ metadata.gz: 980d1887539c11b65c897fc0f48a6d5529b8bb9e23821f9f87ac677623c7a05a
4
+ data.tar.gz: 58b30197236ad99946ec8598fd84b03e8e8ea804a9625483ef4d678d93972dd9
5
5
  SHA512:
6
- metadata.gz: 70072f8f40350f2341e230f2cee198c72872b418eda5e1682e7ab1cdb7fac5c5121386a6e53d3d0c3995139b80797ec51783f0630a9844d948cc8fd79afa7f19
7
- data.tar.gz: c56237be3e22069ade32d6ad81d9a989c78759dc9d3ff8a99150709958da55f942707670aa2b7aad05f35d9dcbc9e9d073a01f47079f8deefbb7d42902725a77
6
+ metadata.gz: 8e599c4ce9337e1ef65ece3c33522f3efa88ee986b048d628889e329aaee752616208eb4e048193f2a5173fa506b9c8170b9032129418d9434f32e60f7c625d4
7
+ data.tar.gz: 07ab88971c0c7a3d2810d9db68c3423755c421d96d7d778339350a64348a2d39a7c021719639fad4a05fdb14b08e4a5313953c3b62865521b7249b2b0a63059b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.118.0)
4
+ cocina-models (0.118.1)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -210,7 +210,7 @@ CHECKSUMS
210
210
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
211
211
  bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
212
212
  bundler (4.0.12) sha256=7f8b757d28dfb636e7b24fba2344ac6dd13b5b24f4b46d62573d483f211825ac
213
- cocina-models (0.118.0)
213
+ cocina-models (0.118.1)
214
214
  concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
215
215
  connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
216
216
  date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
@@ -39,6 +39,14 @@ module Cocina
39
39
  new(...).validate
40
40
  end
41
41
 
42
+ # @return [Hash] a hash representation of the schema.json document
43
+ def self.document
44
+ @document ||= begin
45
+ file_content = ::File.read(SCHEMA_PATH)
46
+ JSON.parse(file_content)
47
+ end
48
+ end
49
+
42
50
  # @param clazz [Class] the Cocina model class being validated (e.g., Cocina::Models::DRO)
43
51
  # @param attributes [Hash] the attributes of the model instance being validated
44
52
  def initialize(clazz, attributes)
@@ -69,15 +77,7 @@ module Cocina
69
77
 
70
78
  # @return [JSONSchemer::Schema]
71
79
  def schema
72
- @schema ||= JSONSchemer.schema(document)
73
- end
74
-
75
- # @return [Hash] a hash representation of the schema.json document
76
- def document
77
- @document ||= begin
78
- file_content = ::File.read(SCHEMA_PATH)
79
- JSON.parse(file_content)
80
- end
80
+ @schema ||= JSONSchemer.schema(self.class.document)
81
81
  end
82
82
 
83
83
  # @return [String] the method name derived from the class name
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.118.0'
5
+ VERSION = '0.118.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.118.0
4
+ version: 0.118.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne