shale-builder 0.6.2 → 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: d0327d6310db97d81e7fe064c5793770957d8d22e98b1f9077e949c0353849a2
4
- data.tar.gz: d893ecbbad469b26833a13789a1d6198880887d676bbc97d059b88cd4edef625
3
+ metadata.gz: 261c4f1c5a84beb73e20e3d514428cc29c9d709953d6e162f8374ca2ba1a4443
4
+ data.tar.gz: 4cdeb4828033c9e9323e460e43b54abe4ffa1e1fdf548d5da9c8a1320740d3ca
5
5
  SHA512:
6
- metadata.gz: da213e5619f5aa2efea1900873f8b5266e665c7882bb1c601846c97124910eb69436a89b2aafc3a86792c99a1fca36ee31ebd85821b7c524c506c6689cc590dc
7
- data.tar.gz: fa95173ac0ba16c1f02f52a4986de8458eced18726eed7816a2effb0129b121b7806f0d251aa6a4966d4e5c0a7f5c93237acf113592e901797b95bb41af7b506
6
+ metadata.gz: 3a3403a06d96bf413831fd13a3bc0f9c3eb305258407b1ac6e0ab3fe12dbfc4614991e6e32767af233216b23ad9da7a5643298380168ad22fb60c90f6534c692
7
+ data.tar.gz: c2476abbbff4014993465ff61eaf8005fad088fd5a813cfd5eff3cb167f061da0ee7d3c06efbaaa0027adb0a7d68ba78d2538c2de349851c6d1f3f8b7336bcff
data/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ 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
+
15
+ ## [0.6.3] - 2025-10-16
16
+
17
+ [Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.6.2...v0.6.3)
18
+
19
+ ### Changes
20
+ - Improve `Shale::Builder::AssignedAttributes` to handle assignment in methods like `from_hash`
21
+
8
22
  ## [0.6.2] - 2025-10-16
9
23
 
10
24
  [Diff](https://github.com/Verseth/ruby-shale-builder/compare/v0.6.0...v0.6.2)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shale-builder (0.6.2)
4
+ shale-builder (0.6.4)
5
5
  booleans (>= 0.1)
6
6
  shale (< 2.0)
7
7
  sorbet-runtime (> 0.5)
@@ -43,8 +43,21 @@ module Shale
43
43
  #: Module
44
44
  attr_reader :assigned_attributes_methods_module
45
45
 
46
- #: (String | Symbol name, Class type, ?collection: bool, ?default: Proc?, ?doc: String?, **untyped kwargs) ?{ -> void } -> void
47
- def attribute(name, type, collection: false, default: nil, doc: nil, **kwargs, &block)
46
+ #: (
47
+ #| String | Symbol name,
48
+ #| Class shale_mapper,
49
+ #| ?collection: bool,
50
+ #| ?default: Proc?,
51
+ #| **Object kwargs
52
+ #| ) ?{ -> void } -> void
53
+ def attribute(
54
+ name,
55
+ shale_mapper,
56
+ collection: false,
57
+ default: nil,
58
+ **kwargs,
59
+ &block
60
+ )
48
61
  super
49
62
 
50
63
  @assigned_attributes_methods_module.class_eval <<~RUBY, __FILE__, __LINE__ + 1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Shale
4
4
  module Builder
5
- VERSION = '0.6.2'
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.2
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Drewniak