dry-struct 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/dry-struct.gemspec +1 -1
- data/lib/dry/struct/extensions/pretty_print.rb +1 -1
- data/lib/dry/struct/struct_builder.rb +2 -2
- data/lib/dry/struct/sum.rb +2 -2
- data/lib/dry/struct/version.rb +1 -1
- data/lib/dry/struct.rb +2 -2
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8125a034e5464921667000c0538acb3f76403dac31eddbb28ae2e2adb7ac654e
|
4
|
+
data.tar.gz: 101568534beef277833e14b07d9924e080d87a618b5781522a1b98f180ab6d74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a85cb81651c00a02431e7d0b1a928d4ece81fe2acfffb2c94249077131a96d22d3c5ad61434d962c84dd5c086fb6d3acbdc346b2613a6f9cc69278b850f4a1c9
|
7
|
+
data.tar.gz: b0eb01f04145de02362c6dddc0f2aa215001fa1333f9f6e00d16778a5481394b0a477eb42fd1e85438bb9b750c1f82f96ca575c35f32bd6b97b7e12dafd38922
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 1.7.1 2025-01-31
|
4
|
+
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
|
8
|
+
- Syntax errors on 3.3.0 (@flash-gordon, see https://github.com/dry-rb/dry-types/issues/478)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v1.7.0...v1.7.1](https://github.com/dry-rb/dry-struct/compare/v1.7.0...v1.7.1)
|
12
|
+
|
3
13
|
## 1.7.0 2025-01-06
|
4
14
|
|
5
15
|
|
data/dry-struct.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
# to update dependencies edit project.yml
|
33
33
|
spec.add_dependency "dry-core", "~> 1.1"
|
34
|
-
spec.add_dependency "dry-types", "~> 1.8"
|
34
|
+
spec.add_dependency "dry-types", "~> 1.8", ">= 1.8.2"
|
35
35
|
spec.add_dependency "ice_nine", "~> 0.11"
|
36
36
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
37
37
|
end
|
@@ -15,7 +15,7 @@ module Dry
|
|
15
15
|
# @param [Dry::Struct,Dry::Types::Type::Array,Undefined] type the superclass
|
16
16
|
# of the nested struct
|
17
17
|
# @yield the body of the nested struct
|
18
|
-
def call(attr_name, type, &)
|
18
|
+
def call(attr_name, type, &block)
|
19
19
|
const_name = const_name(type, attr_name)
|
20
20
|
check_name(const_name)
|
21
21
|
|
@@ -27,7 +27,7 @@ module Dry
|
|
27
27
|
schema builder.struct.schema.clear
|
28
28
|
end
|
29
29
|
|
30
|
-
class_exec(&)
|
30
|
+
class_exec(&block)
|
31
31
|
end
|
32
32
|
|
33
33
|
struct.const_set(const_name, new_type)
|
data/lib/dry/struct/sum.rb
CHANGED
data/lib/dry/struct/version.rb
CHANGED
data/lib/dry/struct.rb
CHANGED
@@ -27,10 +27,10 @@ module Dry
|
|
27
27
|
# Test = Dry.Struct(expected: Types::String) { schema(schema.strict) }
|
28
28
|
# Test[expected: "foo", unexpected: "bar"]
|
29
29
|
# #=> Dry::Struct::Error: [Test.new] unexpected keys [:unexpected] in Hash input
|
30
|
-
def self.Struct(attributes = Dry::Core::Constants::EMPTY_HASH, &)
|
30
|
+
def self.Struct(attributes = Dry::Core::Constants::EMPTY_HASH, &block)
|
31
31
|
Class.new(Dry::Struct) do
|
32
32
|
attributes.each { |a, type| attribute a, type }
|
33
|
-
module_eval(&) if block_given?
|
33
|
+
module_eval(&block) if block_given?
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-struct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-core
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.8'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.8.2
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '1.8'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.8.2
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: ice_nine
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|