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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd8d3f0f41192daff14ed892da9e9a86e3dddefc4f7f94f26f58e1d091257532
4
- data.tar.gz: 88d94467b25ec8f3a0e6f897232829ffbfb1ee3a1c1ec331e60ce3d5c386cb72
3
+ metadata.gz: 8125a034e5464921667000c0538acb3f76403dac31eddbb28ae2e2adb7ac654e
4
+ data.tar.gz: 101568534beef277833e14b07d9924e080d87a618b5781522a1b98f180ab6d74
5
5
  SHA512:
6
- metadata.gz: a3d3a0a161d2a81053e7081a1d2deeead9a565c64a432350145c79083c58e400a8ed984e70b06388128c615d335cbccb29cb43b48f2669830bbf238064965c9e
7
- data.tar.gz: 4c6a1a4c1a47f7b941e33c10ad515ce96247bae7e916088863a56c8c1104de5e4344b7314150eeb774627778c76fb79b6f209ba554627786a02ec918f7cf43df
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pp"
3
+ require "pp" # rubocop:disable Lint/RedundantRequireStatement
4
4
 
5
5
  module Dry
6
6
  class Struct
@@ -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)
@@ -41,9 +41,9 @@ module Dry
41
41
  protected
42
42
 
43
43
  # @private
44
- def try_struct(input, &)
44
+ def try_struct(input, &block)
45
45
  left.try_struct(input) do
46
- right.try_struct(input, &)
46
+ right.try_struct(input, &block)
47
47
  end
48
48
  end
49
49
  end
@@ -3,6 +3,6 @@
3
3
  module Dry
4
4
  class Struct
5
5
  # @private
6
- VERSION = "1.7.0"
6
+ VERSION = "1.7.1"
7
7
  end
8
8
  end
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.0
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-06 00:00:00.000000000 Z
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