definition 1.1.0 → 1.1.2

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: e9a9ad734eb7b592f544c631ddb915e97b5aeef740a0d91ba89fba76a09cf630
4
- data.tar.gz: ad91febf1923c32785a43d5c917a15e69eece45cd438f9624e1edd6a06b5d7ab
3
+ metadata.gz: 9d395d2c71aea47ece41fdb8904a8c2135b4b18ae35f602e262d38778a56bdfb
4
+ data.tar.gz: ae7f24b7b01f040f0df1acc375834ac880c4299368b2ac0c8721ab26fbff1866
5
5
  SHA512:
6
- metadata.gz: 34d0c1f12d6997a96f5cedf31c90910889f823da1b6b9b5b57a6c21969931799b6effdec2c746aaeb519d34ebccb471c6d7807d872a794f8e896fe10360e3c37
7
- data.tar.gz: 5bbc0b004ca0dfba3f77f4239125ee8f48ea84127228bd594d0aa32255a1876bbfc8e22454c98780aa737136bea84e560cad7ad333390806fe86437b0c37a9a6
6
+ metadata.gz: ec02230f3a42281334841075805b205ca5455d8034835e5da363b32a6905ad9c1cdf47f7b3f036c4696e0ac845cc049cd44dfaa65f0fb9a1c724e7cce991519d
7
+ data.tar.gz: 29b6f124f85ec5925bb4319053efa505fabb45fe130897faa43dd036f3542fe44ef791df543c2e5a2bce36c7706d516f9c8170437981fa8ffdc52dfa8d4fa07e
data/Changelog.md CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [1.1.2] - 2024-08-22
10
+ ### Fixed
11
+ - Fixed "TypeError: no _dump_data is defined for class Proc" error that ocurred when a definition model inherits from another model that uses lambda based definitions
12
+
13
+ ## [1.1.1] - 2024-05-21
14
+ ### Fixed
15
+ - Fixed Definition::Model inheritance
16
+
9
17
  ## [1.1.0] - 2023-11-22
10
18
  ### Changes
11
19
  - Improved performance
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- definition (1.1.0)
4
+ definition (1.1.2)
5
5
  activesupport
6
6
  i18n
7
7
 
@@ -64,9 +64,9 @@ GEM
64
64
  minitest (5.21.2)
65
65
  mutex_m (0.2.0)
66
66
  nenv (0.3.0)
67
- nokogiri (1.16.0-arm64-darwin)
67
+ nokogiri (1.16.5-arm64-darwin)
68
68
  racc (~> 1.4)
69
- nokogiri (1.16.0-x86_64-linux)
69
+ nokogiri (1.16.5-x86_64-linux)
70
70
  racc (~> 1.4)
71
71
  notiffany (0.1.3)
72
72
  nenv (~> 0.1)
@@ -80,7 +80,7 @@ GEM
80
80
  method_source (~> 1.0)
81
81
  psych (5.1.2)
82
82
  stringio
83
- racc (1.7.3)
83
+ racc (1.8.0)
84
84
  rainbow (3.1.1)
85
85
  rake (13.1.0)
86
86
  rb-fsevent (0.11.2)
@@ -37,7 +37,11 @@ module Definition
37
37
  end
38
38
 
39
39
  def _definition
40
- @_definition ||= ::Definition.Keys {}
40
+ @_definition ||= if superclass == ::Definition::Model
41
+ ::Definition.Keys {}
42
+ else
43
+ superclass._definition.dup
44
+ end
41
45
  end
42
46
  end
43
47
 
@@ -63,6 +63,13 @@ module Definition
63
63
  self.ignore_extra_keys = options.fetch(:ignore_extra_keys, false)
64
64
  end
65
65
 
66
+ def initialize_dup(_other)
67
+ super
68
+ self.required_definitions = required_definitions.dup
69
+ self.optional_definitions = optional_definitions.dup
70
+ self.defaults = defaults.dup
71
+ end
72
+
66
73
  def conform(input_value) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
67
74
  # input_value is duplicated because we don't want to modify the user object that is passed into this function.
68
75
  # The following logic will iterate over each definition and delete the key associated with the definition from
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Definition
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: definition
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Goltermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-22 00:00:00.000000000 Z
11
+ date: 2024-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport