dry-system 0.25.0 → 0.26.0

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: 7ee8640692f53a8c0a9a29fd59bfe5595a269b3680d4a8f71d630e87ed2398b9
4
- data.tar.gz: 435806646f338c4bdec369ae98fc29f451bb6a5dbe38bc2f20d7c3cb422b4223
3
+ metadata.gz: 3817891e298713d98e37ad2f3fae19f0d63e2aaa0ed7fa43a084f4530a8c97b5
4
+ data.tar.gz: d438cfec3270bd3abff042fa8a1b145517548300d79159a62be6b82e8f8d8df6
5
5
  SHA512:
6
- metadata.gz: 90130f6f367b24a1b45fd6be2915efe9d0c9e22b676e03b3a827ea7e9d02accca210272c8f5cd330993f2ea378ca2674ffc9281f7d695b14b7acb6f4d0a24c6d
7
- data.tar.gz: 30cb6a24cb9e12cbd259223d0b861f837b692e139b21f95e1dfdd6b0365129e37377153151bce0cda8b9171249507ff458e4239ac61df0200c7144063381c0ad
6
+ metadata.gz: d7a26bf48ab9318e359780ce83f0d2cd3ea541a2546dcc88c8fa0637d801b513bff9b1d8b64ce9c28e7307343ddea66d03f299ae4f1909c775ac1e478e7648af
7
+ data.tar.gz: 5bc0286acd96dfaca17099c1a29d14417ba547cf4cb286a5f3951aa38bb9527d3ed2a966b959e658222a645f91a39caa094cdd2c63a4c2209f603b575a017792
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
2
 
3
+ ## 0.26.0 2022-10-08
4
+
5
+
6
+ ### Changed
7
+
8
+ - Update dry-configurable dependency to 0.16.0 and make internal adjustments to suit (@timriley in #249)
9
+ - Remove now-unused concurrent-ruby gem dependency (@timriley in #250)
10
+
11
+ [Compare v0.25.0...v0.26.0](https://github.com/dry-rb/dry-system/compare/v0.25.0...v0.26.0)
12
+
3
13
  ## 0.25.0 2022-07-10
4
14
 
5
15
 
data/dry-system.gemspec CHANGED
@@ -29,9 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.required_ruby_version = ">= 2.7.0"
30
30
 
31
31
  # to update dependencies edit project.yml
32
- spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
33
32
  spec.add_runtime_dependency "dry-auto_inject", ">= 0.4.0"
34
- spec.add_runtime_dependency "dry-configurable", "~> 0.14", ">= 0.14.0"
33
+ spec.add_runtime_dependency "dry-configurable", "~> 0.16", ">= 0.16.0"
35
34
  spec.add_runtime_dependency "dry-container", "~> 0.10", ">= 0.10.0"
36
35
  spec.add_runtime_dependency "dry-core", "~> 0.5", ">= 0.5"
37
36
  spec.add_runtime_dependency "dry-inflector", "~> 0.1", ">= 0.1.2"
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "concurrent/map"
4
-
5
3
  require "dry/core/equalizer"
6
4
  require "dry/inflector"
7
5
  require "dry/system/loader"
@@ -247,30 +247,6 @@ module Dry
247
247
  !!config.auto_register
248
248
  end
249
249
 
250
- # Returns true if the given setting has been explicitly configured by the user
251
- #
252
- # This is used when determining whether to apply system-wide default values to a
253
- # component dir (explicitly configured settings will not be overridden by
254
- # defaults)
255
- #
256
- # @param key [Symbol] the setting name
257
- #
258
- # @return [Boolean]
259
- #
260
- # @see Dry::System::Config::ComponentDirs#apply_defaults_to_dir
261
- # @api private
262
- def configured?(key)
263
- case key
264
- when :namespaces
265
- # Because we mutate the default value for the `namespaces` setting, rather
266
- # than assign a new one, to check if it's configured we must see whether any
267
- # namespaces have been added
268
- !config.namespaces.empty?
269
- else
270
- config._settings[key].input_defined?
271
- end
272
- end
273
-
274
250
  private
275
251
 
276
252
  def method_missing(name, *args, &block)
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "dry/core/deprecations"
4
+ require "dry/core/equalizer"
4
5
  require "dry/system/errors"
5
6
  require_relative "namespace"
6
7
 
@@ -13,6 +14,8 @@ module Dry
13
14
  #
14
15
  # @api private
15
16
  class Namespaces
17
+ include Dry::Equalizer(:namespaces)
18
+
16
19
  # @api private
17
20
  attr_reader :namespaces
18
21
 
@@ -86,8 +86,7 @@ module Dry
86
86
  setting :provider_registrar, default: Dry::System::ProviderRegistrar
87
87
  setting :importer, default: Dry::System::Importer
88
88
 
89
- # We presume "." as key namespace separator. This is not intended to be
90
- # user-configurable.
89
+ # Expect "." as key namespace separator. This is not intended to be user-configurable.
91
90
  config.namespace_separator = KEY_SEPARATOR
92
91
 
93
92
  class << self
@@ -127,14 +126,7 @@ module Dry
127
126
  # @api public
128
127
  def configure(finalize_config: true, &block)
129
128
  super(&block)
130
-
131
- unless configured?
132
- hooks[:after_configure].each { |hook| instance_eval(&hook) }
133
- config.finalize! if finalize_config
134
- @__configured__ = true
135
- end
136
-
137
- self
129
+ configured!(finalize_config: finalize_config)
138
130
  end
139
131
 
140
132
  # Marks the container as configured, runs the after-`configured` hooks, then
@@ -156,12 +148,19 @@ module Dry
156
148
  return self if configured?
157
149
 
158
150
  hooks[:after_configure].each { |hook| instance_eval(&hook) }
159
- config.finalize! if finalize_config
151
+
152
+ _configurable_finalize! if finalize_config
153
+
160
154
  @__configured__ = true
161
155
 
162
156
  self
163
157
  end
164
158
 
159
+ # Finalizes the config for this container
160
+ #
161
+ # @api private
162
+ alias_method :_configurable_finalize!, :finalize!
163
+
165
164
  def configured?
166
165
  @__configured__.equal?(true)
167
166
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module System
5
- VERSION = "0.25.0"
5
+ VERSION = "0.26.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-10 00:00:00.000000000 Z
11
+ date: 2022-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: concurrent-ruby
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: dry-auto_inject
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -44,20 +30,20 @@ dependencies:
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '0.14'
33
+ version: '0.16'
48
34
  - - ">="
49
35
  - !ruby/object:Gem::Version
50
- version: 0.14.0
36
+ version: 0.16.0
51
37
  type: :runtime
52
38
  prerelease: false
53
39
  version_requirements: !ruby/object:Gem::Requirement
54
40
  requirements:
55
41
  - - "~>"
56
42
  - !ruby/object:Gem::Version
57
- version: '0.14'
43
+ version: '0.16'
58
44
  - - ">="
59
45
  - !ruby/object:Gem::Version
60
- version: 0.14.0
46
+ version: 0.16.0
61
47
  - !ruby/object:Gem::Dependency
62
48
  name: dry-container
63
49
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +207,7 @@ metadata:
221
207
  changelog_uri: https://github.com/dry-rb/dry-system/blob/main/CHANGELOG.md
222
208
  source_code_uri: https://github.com/dry-rb/dry-system
223
209
  bug_tracker_uri: https://github.com/dry-rb/dry-system/issues
224
- post_install_message:
210
+ post_install_message:
225
211
  rdoc_options: []
226
212
  require_paths:
227
213
  - lib
@@ -236,8 +222,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
222
  - !ruby/object:Gem::Version
237
223
  version: '0'
238
224
  requirements: []
239
- rubygems_version: 3.1.6
240
- signing_key:
225
+ rubygems_version: 3.3.7
226
+ signing_key:
241
227
  specification_version: 4
242
228
  summary: Organize your code into reusable components
243
229
  test_files: []