structured_params 0.5.0 → 0.6.0
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 +12 -3
- data/lib/structured_params/params.rb +3 -7
- data/lib/structured_params/type/object.rb +1 -0
- data/lib/structured_params/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66f5daa7a71dd1470ca9f5d8af4d62dd8b0c40227ce6f07812a04206e0083c06
|
|
4
|
+
data.tar.gz: 5c9500ee402ecd0c06ab82503ac13b4ed4800cd2a18b87f4b5fecbba692ad4ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 306948118def08f98c24f460f1e5763e72281a2c31e141ba7db9c376ceea5e1a6ac4ab016a28779f84dfa60ebcf74904b62f66d191507c4066c0f9db055067d6
|
|
7
|
+
data.tar.gz: 57d137f7e64e810356f909045a7e250abe82317b8b5574b8b1f2c4db2e2e23476ef48fc792a7cf168cdad646b649261e2bc9548365827645d1b3f5ec327fe8ed
|
data/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.
|
|
3
|
+
## [0.6.0] - 2026-02-28
|
|
4
4
|
|
|
5
5
|
## What's Changed
|
|
6
|
-
* Update
|
|
6
|
+
* Update Ruby and Rails versions with RBS and RuboCop adjustments by @Syati in https://github.com/Syati/structured_params/pull/11
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
**Full Changelog**: https://github.com/Syati/structured_params/compare/v0.
|
|
9
|
+
**Full Changelog**: https://github.com/Syati/structured_params/compare/v0.5.0...v0.6.0
|
|
10
10
|
|
|
11
|
+
## [0.5.0] - 2025-09-09
|
|
12
|
+
|
|
13
|
+
## What's Changed
|
|
14
|
+
* Update attributes method signatures to use optional keyword arguments… by @Syati in https://github.com/Syati/structured_params/pull/8
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
**Full Changelog**: https://github.com/Syati/structured_params/compare/v0.3.0...v0.5.0
|
|
18
|
+
|
|
11
19
|
## [0.3.0] - 2025-09-06
|
|
12
20
|
|
|
13
21
|
## What's Changed
|
|
@@ -32,3 +40,4 @@
|
|
|
32
40
|
- RBS type definitions
|
|
33
41
|
- Comprehensive test suite
|
|
34
42
|
|
|
43
|
+
|
|
@@ -18,7 +18,7 @@ module StructuredParams
|
|
|
18
18
|
# @rbs @errors: ::StructuredParams::Errors?
|
|
19
19
|
|
|
20
20
|
class << self
|
|
21
|
-
# @rbs
|
|
21
|
+
# @rbs @structured_attributes: Hash[Symbol, singleton(::StructuredParams::Params)]?
|
|
22
22
|
|
|
23
23
|
# Generate permitted parameter structure for Strong Parameters
|
|
24
24
|
#: () -> Array[untyped]
|
|
@@ -128,9 +128,7 @@ module StructuredParams
|
|
|
128
128
|
end
|
|
129
129
|
|
|
130
130
|
# Validate structured arrays
|
|
131
|
-
|
|
132
|
-
# @rbs array_value: Array[untyped]
|
|
133
|
-
# @rbs return: void
|
|
131
|
+
#: (Symbol, Array[untyped]) -> void
|
|
134
132
|
def validate_structured_array(attr_name, array_value)
|
|
135
133
|
array_value.each_with_index do |item, index|
|
|
136
134
|
next if item.valid?(validation_context)
|
|
@@ -141,9 +139,7 @@ module StructuredParams
|
|
|
141
139
|
end
|
|
142
140
|
|
|
143
141
|
# Validate structured objects
|
|
144
|
-
|
|
145
|
-
# @rbs object_value: ::StructuredParams::Params
|
|
146
|
-
# @rbs return: void
|
|
142
|
+
#: (Symbol, StructuredParams::Params) -> void
|
|
147
143
|
def validate_structured_object(attr_name, object_value)
|
|
148
144
|
return if object_value.valid?(validation_context)
|
|
149
145
|
|
|
@@ -10,6 +10,7 @@ module StructuredParams
|
|
|
10
10
|
# Get permitted parameter names for use with Strong Parameters
|
|
11
11
|
# @rbs!
|
|
12
12
|
# def permit_attribute_names: () -> ::Array[untyped]
|
|
13
|
+
|
|
13
14
|
delegate :permit_attribute_names, to: :value_class
|
|
14
15
|
|
|
15
16
|
#: (value_class: singleton(StructuredParams::Params), **untyped) -> void
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: structured_params
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mizuki Yamamoto
|
|
@@ -86,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 3.
|
|
89
|
+
version: 3.2.0
|
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
requirements:
|
|
92
92
|
- - ">="
|