dry-container 0.10.0 → 0.11.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 +18 -0
- data/lib/dry/container/error.rb +3 -1
- data/lib/dry/container/mixin.rb +7 -3
- data/lib/dry/container/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: eddc5e64785c83df02d42faf679ab88dac5ff2c274540cc28ebc9d1b222adda1
|
|
4
|
+
data.tar.gz: fc6a1ed68bb2cb5f59d8f16c6bf14574cdac67d4d41ffc9ebfbfb5f49b7ba1a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f42fd1605859002fe9edc2f1a1cdda1cf76977e50d49e4e6808a4e99e94e2191fc771ab085d30480fc20678045b84733ab35caab90b0c5591e71639c8f2e644
|
|
7
|
+
data.tar.gz: 266cc28987cbbf03b606514175ac8ee42f2565686594b3ae94e72f2484b107a49ba455153bdc12c83849ae53ff80225c6e387c6894ff5c4cb2d665b496275533
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
|
2
2
|
|
|
3
|
+
## 0.11.0 2022-09-16
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Changed
|
|
7
|
+
|
|
8
|
+
- dry-configurable will be used whenever it is in the $LOAD_PATH (see dry-rb/dry-system#247 for more context) (@solnic)
|
|
9
|
+
|
|
10
|
+
[Compare v0.10.1...v0.11.0](https://github.com/dry-rb/dry-container/compare/v0.10.1...v0.11.0)
|
|
11
|
+
|
|
12
|
+
## 0.10.1 2022-07-29
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Make `DidYouMean` integration optional (via #86) (@jbourassa)
|
|
18
|
+
|
|
19
|
+
[Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-container/compare/v0.10.0...v0.10.1)
|
|
20
|
+
|
|
3
21
|
## 0.10.0 2022-07-10
|
|
4
22
|
|
|
5
23
|
⚠️ Notice that dry-container no longer depends on dry-configurable. If you happen to rely on the advanced configurable functionality, add dry-configurable as a dependency and require it **before** requiring dry-container.
|
data/lib/dry/container/error.rb
CHANGED
|
@@ -6,7 +6,9 @@ module Dry
|
|
|
6
6
|
Error = Class.new(StandardError)
|
|
7
7
|
|
|
8
8
|
KeyError = Class.new(::KeyError)
|
|
9
|
-
|
|
9
|
+
if defined?(DidYouMean::KeyErrorChecker)
|
|
10
|
+
DidYouMean.correct_error(KeyError, DidYouMean::KeyErrorChecker)
|
|
11
|
+
end
|
|
10
12
|
|
|
11
13
|
deprecate_constant(:Error)
|
|
12
14
|
end
|
data/lib/dry/container/mixin.rb
CHANGED
|
@@ -34,7 +34,9 @@ module Dry
|
|
|
34
34
|
# @api public
|
|
35
35
|
module Configuration
|
|
36
36
|
# Use dry/configurable if it's available
|
|
37
|
-
|
|
37
|
+
begin
|
|
38
|
+
require "dry/configurable"
|
|
39
|
+
|
|
38
40
|
# @api private
|
|
39
41
|
def self.extended(klass)
|
|
40
42
|
super
|
|
@@ -46,7 +48,7 @@ module Dry
|
|
|
46
48
|
setting :registry, default: Config::DEFAULT_REGISTRY
|
|
47
49
|
end
|
|
48
50
|
end
|
|
49
|
-
|
|
51
|
+
rescue LoadError
|
|
50
52
|
# @api private
|
|
51
53
|
def config
|
|
52
54
|
@config ||= Config.new
|
|
@@ -87,6 +89,8 @@ module Dry
|
|
|
87
89
|
# => 'item'
|
|
88
90
|
#
|
|
89
91
|
# @api public
|
|
92
|
+
#
|
|
93
|
+
# rubocop:disable Metrics/ModuleLength
|
|
90
94
|
module Mixin
|
|
91
95
|
# @private
|
|
92
96
|
def self.extended(base)
|
|
@@ -344,6 +348,6 @@ module Dry
|
|
|
344
348
|
copy
|
|
345
349
|
end
|
|
346
350
|
end
|
|
347
|
-
# rubocop:
|
|
351
|
+
# rubocop:enable Metrics/ModuleLength
|
|
348
352
|
end
|
|
349
353
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dry-container
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Holland
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|