shale-builder 0.6.3 → 0.6.5
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/shale/builder/assigned_attributes.rb +17 -5
- data/lib/shale/builder/version.rb +1 -1
- data/lib/shale/builder.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1880d034ce6c63d442b30d8e32e6f4bd45fd7013e4d97e8c2659c3a82f1bc69
|
|
4
|
+
data.tar.gz: 41016cd336e6ff741b569e08a2068da6447cd2c2a93aadb8b116c589d85b9164
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '088bc9b1de2492906791470ca83abd6ba56b0f2bbbeba87d816acb03b70a400b2ae56cb72b2a8bbb7f3dd42897856cf714a46ac835674a4c077cbb0ded4d77ef'
|
|
7
|
+
data.tar.gz: 0c61bc12a78e9306b8cc815020d11049272a49dd17b0b8900a059f5daada80a79164b3f08be18950025b95c59f135fc769138ac753ef87fc0abd63d300ba01e3
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.4] - 2025-10-16
|
|
9
|
+
|
|
10
|
+
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.6.3...v0.6.4)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
- Fix `Shale::Builder::AssignedAttributes` and add additional tests
|
|
14
|
+
|
|
8
15
|
## [0.6.3] - 2025-10-16
|
|
9
16
|
|
|
10
17
|
[Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.6.2...v0.6.3)
|
data/Gemfile.lock
CHANGED
|
@@ -14,8 +14,6 @@ module Shale
|
|
|
14
14
|
extend T::Sig
|
|
15
15
|
extend T::Helpers
|
|
16
16
|
|
|
17
|
-
DEFAULT = Object.new
|
|
18
|
-
|
|
19
17
|
class << self
|
|
20
18
|
extend T::Sig
|
|
21
19
|
|
|
@@ -40,6 +38,12 @@ module Shale
|
|
|
40
38
|
module ClassMethods
|
|
41
39
|
extend T::Sig
|
|
42
40
|
|
|
41
|
+
#: (Class subclass) -> void
|
|
42
|
+
def inherited(subclass)
|
|
43
|
+
super
|
|
44
|
+
Builder.prepare_mod(subclass)
|
|
45
|
+
end
|
|
46
|
+
|
|
43
47
|
# Contains overridden getter methods for attributes
|
|
44
48
|
# with complex types (so that they accept a block for building)
|
|
45
49
|
#: Module
|
|
@@ -56,16 +60,16 @@ module Shale
|
|
|
56
60
|
name,
|
|
57
61
|
shale_mapper,
|
|
58
62
|
collection: false,
|
|
59
|
-
default:
|
|
63
|
+
default: nil,
|
|
60
64
|
**kwargs,
|
|
61
65
|
&block
|
|
62
66
|
)
|
|
63
|
-
super
|
|
67
|
+
super
|
|
64
68
|
|
|
65
69
|
@assigned_attributes_methods_module.class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
|
66
70
|
def #{name}=(val)
|
|
67
|
-
return if val.equal?(::Shale::Builder::AssignedAttributes::DEFAULT)
|
|
68
71
|
super
|
|
72
|
+
return unless @__initialized
|
|
69
73
|
|
|
70
74
|
self.assigned_attribute_names << #{name.to_sym.inspect}
|
|
71
75
|
end
|
|
@@ -74,6 +78,14 @@ module Shale
|
|
|
74
78
|
end
|
|
75
79
|
mixes_in_class_methods ClassMethods
|
|
76
80
|
|
|
81
|
+
def initialize(*args, **kwargs, &block)
|
|
82
|
+
super
|
|
83
|
+
@__initialized = true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
#: bool?
|
|
87
|
+
attr_reader :__initialized
|
|
88
|
+
|
|
77
89
|
# Returns a set of names of assigned shale attributes.
|
|
78
90
|
#
|
|
79
91
|
#: -> Set[Symbol]
|
data/lib/shale/builder.rb
CHANGED