dry-system 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/dry-system.gemspec +1 -1
- data/lib/dry/system/container.rb +1 -1
- data/lib/dry/system/manual_registrar.rb +1 -2
- data/lib/dry/system/version.rb +1 -1
- data/spec/unit/container/config_spec.rb +38 -0
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a21788fc7c60708d5a764c16be462eb0efba44d1
|
4
|
+
data.tar.gz: f147f16d6283e31fa9382392259b3313c481c92a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f6252dd95293e42e307dbbf38991c07153b08f532ca222659625a166a29447e328c6a1acbe74070447ea8f143673fa86c4b3f7bbb13efa0aab50eb23015d21b
|
7
|
+
data.tar.gz: 8357c9d5e79c649d7d6794db762debf0056db52e213616a04e1660a2974b2d6c5ea75def5f43031385b794cd9d329063c81cec816e19ff8121ec3c35caf0b3d5
|
data/CHANGELOG.md
CHANGED
data/dry-system.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency 'dry-equalizer', '~> 0.2'
|
23
23
|
spec.add_runtime_dependency 'dry-container', '~> 0.6'
|
24
24
|
spec.add_runtime_dependency 'dry-auto_inject', '>= 0.4.0'
|
25
|
-
spec.add_runtime_dependency 'dry-configurable', '~> 0.
|
25
|
+
spec.add_runtime_dependency 'dry-configurable', '~> 0.7', '>= 0.7.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler'
|
28
28
|
spec.add_development_dependency 'rake'
|
data/lib/dry/system/container.rb
CHANGED
@@ -66,7 +66,7 @@ module Dry
|
|
66
66
|
|
67
67
|
setting :name
|
68
68
|
setting :default_namespace
|
69
|
-
setting
|
69
|
+
setting(:root, Pathname.pwd.freeze) { |path| Pathname(path) }
|
70
70
|
setting :system_dir, 'system'.freeze
|
71
71
|
setting :registrations_dir, 'container'.freeze
|
72
72
|
setting :auto_register, []
|
data/lib/dry/system/version.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'dry/system/container'
|
2
|
+
|
3
|
+
RSpec.describe Dry::System::Container, '.config' do
|
4
|
+
subject(:config) { Test::Container.config }
|
5
|
+
let(:configuration) { proc { } }
|
6
|
+
|
7
|
+
before do
|
8
|
+
class Test::Container < Dry::System::Container
|
9
|
+
end
|
10
|
+
Test::Container.configure(&configuration)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#root' do
|
14
|
+
subject(:root) { config.root }
|
15
|
+
|
16
|
+
context 'no value' do
|
17
|
+
it 'defaults to pwd' do
|
18
|
+
expect(root).to eq Pathname.pwd
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'string provided' do
|
23
|
+
let(:configuration) { proc { |config| config.root = '/tmp' } }
|
24
|
+
|
25
|
+
it 'coerces string paths to pathname' do
|
26
|
+
expect(root).to eq Pathname('/tmp')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'pathname provided' do
|
31
|
+
let(:configuration) { proc { |config| config.root = Pathname('/tmp') } }
|
32
|
+
|
33
|
+
it 'accepts the pathname' do
|
34
|
+
expect(root).to eq Pathname('/tmp')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
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.7.
|
4
|
+
version: 0.7.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-06-
|
11
|
+
date: 2017-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inflecto
|
@@ -86,14 +86,20 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.7'
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 0.7.0
|
90
93
|
type: :runtime
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
97
|
- - "~>"
|
95
98
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
99
|
+
version: '0.7'
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 0.7.0
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: bundler
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +239,7 @@ files:
|
|
233
239
|
- spec/unit/auto_registrar/configuration_spec.rb
|
234
240
|
- spec/unit/component_spec.rb
|
235
241
|
- spec/unit/container/auto_register_spec.rb
|
242
|
+
- spec/unit/container/config_spec.rb
|
236
243
|
- spec/unit/container/finalize_spec.rb
|
237
244
|
- spec/unit/container/import_spec.rb
|
238
245
|
- spec/unit/container/injector_spec.rb
|
@@ -315,6 +322,7 @@ test_files:
|
|
315
322
|
- spec/unit/auto_registrar/configuration_spec.rb
|
316
323
|
- spec/unit/component_spec.rb
|
317
324
|
- spec/unit/container/auto_register_spec.rb
|
325
|
+
- spec/unit/container/config_spec.rb
|
318
326
|
- spec/unit/container/finalize_spec.rb
|
319
327
|
- spec/unit/container/import_spec.rb
|
320
328
|
- spec/unit/container/injector_spec.rb
|