dry-schema 1.11.1 → 1.11.2

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: 64f3239cc6dc887697c2b2fbe34e32e03f92bc4d454e1ccded1665c43f555063
4
- data.tar.gz: 6262ec5d414c29ae7ed54245542736016d448454693ae7ceb5fe3f10377e4c4c
3
+ metadata.gz: 54711c3fdbfd2a26598cfb2d3c4b475cc20060d5ede19cd464b008c4d7ced04a
4
+ data.tar.gz: c8fd8e307a37a4cea6ac8f7dfe7d0af4fbadcf8ff8b617b090639f39d488a2ee
5
5
  SHA512:
6
- metadata.gz: ba6f6a3c40530e3507ca6d82883e11bdfeef620a804162b3eefba3b5a79f3474ce124cb2454eb3fb139a0bb844aaf494e3d1a73205abdc50e61514a0e6ad8976
7
- data.tar.gz: 69baaa256d57e0d0341249617bcd81f44fa083a26754b442fa16e392cc3326b8accf2b78aa0db20e3387e67831ff6b78dd6fff40d085db478b7f65caed73e53c
6
+ metadata.gz: e3575927541dfa787a2fe9afb2becde806d37cd8f08ffc43f215d7032bcb9062633be9bd5af8e6d97a4b4b4568381ad1698a507f992cb66cbf1b53ee172f4cca
7
+ data.tar.gz: 362f8443a65e53ec778ff5a45b0e97c264fdecc70794c4e5d2b98ed20e07ec1690545a14abdfe4ef522897364c7fc80b8345c34c2666ca30650ed2cbb211b455
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.11.2 2022-10-16
4
+
5
+
6
+ ### Fixed
7
+
8
+ - Setting up message backends with custom settings should work as before (see dry-rb/dry-validation#717 fixed via #435) (@solnic)
9
+
10
+
11
+ [Compare v1.11.1...v1.11.2](https://github.com/dry-rb/dry-schema/compare/v1.11.1...v1.11.2)
12
+
3
13
  ## 1.11.1 2022-10-15
4
14
 
5
15
 
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dry/monads/result"
3
+ require "dry/monads"
4
+
5
+ # preload monads
6
+ Dry::Monads[:result]
4
7
 
5
8
  module Dry
6
9
  module Schema
@@ -43,6 +43,17 @@ module Dry
43
43
  String => "string"
44
44
  )
45
45
 
46
+ # @api private
47
+ def self.setting_names
48
+ # TODO: this is compatibility tweak to make it work with dry-configurable < 0.16.1
49
+ # and should be removed in dry-schema 2.0.0
50
+ @setting_names ||= settings
51
+ .map { |setting|
52
+ setting.respond_to?(:name) ? setting.name : setting
53
+ }
54
+ .map(&:to_sym)
55
+ end
56
+
46
57
  # @api private
47
58
  def self.build(options = EMPTY_HASH)
48
59
  messages = new
@@ -19,7 +19,7 @@ module Dry
19
19
  end
20
20
 
21
21
  namespace = config.namespace
22
- options = config.to_h.select { |k, _| Abstract.settings.map(&:name).include?(k) }
22
+ options = config.to_h.select { |k, _| Abstract.setting_names.include?(k) }
23
23
 
24
24
  messages = Messages.const_get(backend_class).build(options)
25
25
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Schema
5
- VERSION = "1.11.1"
5
+ VERSION = "1.11.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.1
4
+ version: 1.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-15 00:00:00.000000000 Z
11
+ date: 2022-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby