dry-system 0.8.0 → 0.8.1
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 +9 -0
- data/lib/dry/system/booter.rb +1 -1
- data/lib/dry/system/components/bootable.rb +9 -0
- data/lib/dry/system/container.rb +3 -3
- data/lib/dry/system/provider.rb +2 -1
- data/lib/dry/system/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a18b1a854bc129ce0971540b70db051a98d7af4f
|
4
|
+
data.tar.gz: 3028860d178d68633123d23fd3900508cd6defb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc8a1a34791ffaa7d4e345d7ca734f48a017d3ea85e7ccda787ea6ffecc2cf71542c84aaf697bbf66447e964a8a598f8e1ad766c4ea4750c1340edd18c8ac8c
|
7
|
+
data.tar.gz: 6a8566bac53d9feab8655d04022150c70a8d263e294ce4df82a8023430bd975cae426b74c444c442076961f7804f977bdfec2a3512834c9180b37aa4cf253728
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 0.8.0 - 2017-10-17
|
2
|
+
|
3
|
+
### Fixed
|
4
|
+
|
5
|
+
* Aliasing an external component works correctly (solnic)
|
6
|
+
* Manually calling `:init` will also finalize a component (solnic)
|
7
|
+
|
8
|
+
[Compare v0.8.0...v0.8.1](https://github.com/dry-rb/dry-system/compare/v0.8.0...v0.8.1)
|
9
|
+
|
1
10
|
# 0.8.0 - 2017-10-16
|
2
11
|
|
3
12
|
### Added
|
data/lib/dry/system/booter.rb
CHANGED
@@ -207,6 +207,15 @@ module Dry
|
|
207
207
|
self
|
208
208
|
end
|
209
209
|
|
210
|
+
# Return a new instance with updated name and options
|
211
|
+
#
|
212
|
+
# @return [Dry::Struct]
|
213
|
+
#
|
214
|
+
# @api private
|
215
|
+
def new(identifier, new_options = EMPTY_HASH)
|
216
|
+
self.class.new(identifier, options.merge(new_options))
|
217
|
+
end
|
218
|
+
|
210
219
|
# Return a new instance with updated options
|
211
220
|
#
|
212
221
|
# @return [Dry::Struct]
|
data/lib/dry/system/container.rb
CHANGED
@@ -231,7 +231,7 @@ module Dry
|
|
231
231
|
# @api private
|
232
232
|
def boot_external(identifier, from:, key: nil, namespace: nil, &block)
|
233
233
|
component = System.providers[from].component(
|
234
|
-
|
234
|
+
identifier, key: key, namespace: namespace, finalize: block, container: self
|
235
235
|
)
|
236
236
|
|
237
237
|
booter.register_component(component)
|
@@ -240,8 +240,8 @@ module Dry
|
|
240
240
|
end
|
241
241
|
|
242
242
|
# @api private
|
243
|
-
def boot_local(
|
244
|
-
component = Components::Bootable.new(
|
243
|
+
def boot_local(identifier, namespace: nil, &block)
|
244
|
+
component = Components::Bootable.new(identifier, container: self, namespace: namespace, &block)
|
245
245
|
|
246
246
|
booter.register_component(component)
|
247
247
|
|
data/lib/dry/system/provider.rb
CHANGED
data/lib/dry/system/version.rb
CHANGED
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.8.
|
4
|
+
version: 0.8.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: 2017-10-
|
11
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inflecto
|