shale-builder 0.6.3 → 0.6.4

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: 8390e896860a9ae2aedb9e0c27166f2988a680f03dc78cfd30d0b58154ffd32f
4
- data.tar.gz: a911f2ccd9ea7d8b233420135d0c27d65ec721c169d7cde490ffd59fcb42f7e7
3
+ metadata.gz: 261c4f1c5a84beb73e20e3d514428cc29c9d709953d6e162f8374ca2ba1a4443
4
+ data.tar.gz: 4cdeb4828033c9e9323e460e43b54abe4ffa1e1fdf548d5da9c8a1320740d3ca
5
5
  SHA512:
6
- metadata.gz: 4c102d77a38b6d1331bf5b5087cf812adf1c16f2aa3a092f9c1ada4b342a85925ea21eebed95156a6e586cd2cbbbe240c0cbe6c6d858f9e266bd26a99db2e9fc
7
- data.tar.gz: 70b49b02528f27f284106e9ce12df12aa12e3f76940e8aa93fa37af7cf3f1dd0d4c434c7583d3e727109188ece728b7a91a3e7deebf41979fc1b9fda3ed7fc93
6
+ metadata.gz: 3a3403a06d96bf413831fd13a3bc0f9c3eb305258407b1ac6e0ab3fe12dbfc4614991e6e32767af233216b23ad9da7a5643298380168ad22fb60c90f6534c692
7
+ data.tar.gz: c2476abbbff4014993465ff61eaf8005fad088fd5a813cfd5eff3cb167f061da0ee7d3c06efbaaa0027adb0a7d68ba78d2538c2de349851c6d1f3f8b7336bcff
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shale-builder (0.6.3)
4
+ shale-builder (0.6.4)
5
5
  booleans (>= 0.1)
6
6
  shale (< 2.0)
7
7
  sorbet-runtime (> 0.5)
@@ -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
 
@@ -56,16 +54,16 @@ module Shale
56
54
  name,
57
55
  shale_mapper,
58
56
  collection: false,
59
- default: -> { DEFAULT },
57
+ default: nil,
60
58
  **kwargs,
61
59
  &block
62
60
  )
63
- super(name, shale_mapper, collection:, default:, **kwargs, &block) # rubocop:disable Style/SuperArguments
61
+ super
64
62
 
65
63
  @assigned_attributes_methods_module.class_eval <<~RUBY, __FILE__, __LINE__ + 1
66
64
  def #{name}=(val)
67
- return if val.equal?(::Shale::Builder::AssignedAttributes::DEFAULT)
68
65
  super
66
+ return unless @__initialized
69
67
 
70
68
  self.assigned_attribute_names << #{name.to_sym.inspect}
71
69
  end
@@ -74,6 +72,14 @@ module Shale
74
72
  end
75
73
  mixes_in_class_methods ClassMethods
76
74
 
75
+ def initialize(*args, **kwargs, &block)
76
+ super
77
+ @__initialized = true
78
+ end
79
+
80
+ #: bool?
81
+ attr_reader :__initialized
82
+
77
83
  # Returns a set of names of assigned shale attributes.
78
84
  #
79
85
  #: -> Set[Symbol]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Shale
4
4
  module Builder
5
- VERSION = '0.6.3'
5
+ VERSION = '0.6.4'
6
6
  end
7
7
  end
data/lib/shale/builder.rb CHANGED
@@ -237,7 +237,7 @@ module Shale
237
237
  val = public_send(name)
238
238
  next unless val
239
239
 
240
- val.inject_context(**context)
240
+ val.inject_context(**context) if respond_to?(:inject_context)
241
241
  end
242
242
  end
243
243
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shale-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Drewniak