dry-system 0.19.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,12 +11,9 @@ module Dry
11
11
  module System
12
12
  module Settings
13
13
  class DSL < BasicObject
14
- attr_reader :identifier
15
-
16
14
  attr_reader :schema
17
15
 
18
- def initialize(identifier, &block)
19
- @identifier = identifier
16
+ def initialize(&block)
20
17
  @schema = {}
21
18
  instance_eval(&block)
22
19
  end
@@ -7,7 +7,7 @@ module Dry
7
7
  class Container
8
8
  # @api private
9
9
  module Stubs
10
- def finalize!(&block)
10
+ def finalize!(freeze: true, &block)
11
11
  super(freeze: false, &block)
12
12
  end
13
13
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module System
5
- VERSION = "0.19.0"
5
+ VERSION = "0.21.0"
6
6
  end
7
7
  end
data/lib/dry/system.rb CHANGED
@@ -8,17 +8,17 @@ module Dry
8
8
  # Register external component provider
9
9
  #
10
10
  # @api public
11
- def self.register_provider(identifier, options)
12
- providers.register(identifier, options)
13
- providers[identifier].load_components
11
+ def self.register_provider(name, options)
12
+ providers.register(name, options)
13
+ providers[name].load_components
14
14
  self
15
15
  end
16
16
 
17
17
  # Register an external component that can be booted within other systems
18
18
  #
19
19
  # @api public
20
- def self.register_component(identifier, provider:, &block)
21
- providers[provider].register_component(identifier, block)
20
+ def self.register_component(name, provider:, &block)
21
+ providers[provider].register_component(name, block)
22
22
  self
23
23
  end
24
24
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-22 00:00:00.000000000 Z
11
+ date: 2021-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -44,40 +44,40 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.12'
47
+ version: '0.13'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 0.12.1
50
+ version: 0.13.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '0.12'
57
+ version: '0.13'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 0.12.1
60
+ version: 0.13.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: dry-container
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.7'
67
+ version: '0.9'
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 0.7.2
70
+ version: 0.9.0
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '0.7'
77
+ version: '0.9'
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 0.7.2
80
+ version: 0.9.0
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: dry-core
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -197,11 +197,14 @@ files:
197
197
  - lib/dry/system/components/config.rb
198
198
  - lib/dry/system/config/component_dir.rb
199
199
  - lib/dry/system/config/component_dirs.rb
200
+ - lib/dry/system/config/namespace.rb
201
+ - lib/dry/system/config/namespaces.rb
200
202
  - lib/dry/system/constants.rb
201
203
  - lib/dry/system/container.rb
202
204
  - lib/dry/system/errors.rb
203
205
  - lib/dry/system/identifier.rb
204
206
  - lib/dry/system/importer.rb
207
+ - lib/dry/system/indirect_component.rb
205
208
  - lib/dry/system/lifecycle.rb
206
209
  - lib/dry/system/loader.rb
207
210
  - lib/dry/system/loader/autoloading.rb
@@ -240,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
243
  requirements:
241
244
  - - ">="
242
245
  - !ruby/object:Gem::Version
243
- version: 2.5.0
246
+ version: 2.6.0
244
247
  required_rubygems_version: !ruby/object:Gem::Requirement
245
248
  requirements:
246
249
  - - ">="