dry-system-rails 0.0.1 → 0.0.2
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 +6 -0
- data/lib/dry/system/rails.rb +11 -4
- data/lib/dry/system/rails/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: 7ce6cf373baf2d9b26197f0f1bf463c955104e6c
|
|
4
|
+
data.tar.gz: a2445418d71b4c62b7ab6fc5200fe83bc8d7f0d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60f714a3d7fa60b6617d9a956552a95e9eb59a3ecd6850297090ed5953a3b809cd2bb016fb5c37b4da9914c0a7ebcc9e34463b1b77a16c288fc3e3d720c2b0dd
|
|
7
|
+
data.tar.gz: a0d025871d900dd3a1601fef49d74ca81e85c94abe08bc97d5acc5999e63477c26f7354b804b6bfce5490a0186c097ba9c7dc85b8bfaad9fe8764ede43238e92
|
data/CHANGELOG.md
CHANGED
data/lib/dry/system/rails.rb
CHANGED
|
@@ -40,17 +40,24 @@ module Dry
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def finalize!
|
|
43
|
-
|
|
43
|
+
app_namespace.const_set(:Container, container)
|
|
44
44
|
container.config.name = name
|
|
45
45
|
container.finalize!
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def name
|
|
49
|
-
|
|
49
|
+
app_namespace.name.underscore.to_sym
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
# TODO: we had to rename namespace=>app_namespace because
|
|
53
|
+
# Rake::DSL's Kernel#namespace *sometimes* breaks things.
|
|
54
|
+
# Currently we are missing specs verifying that rake tasks work
|
|
55
|
+
# correctly and those must be added!
|
|
56
|
+
def app_namespace
|
|
57
|
+
@app_namespace ||= begin
|
|
58
|
+
top_level_namespace = ::Rails.application.class.to_s.split('::').first
|
|
59
|
+
Object.const_get(top_level_namespace)
|
|
60
|
+
end
|
|
54
61
|
end
|
|
55
62
|
|
|
56
63
|
def container
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dry-system-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Solnica
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-08-
|
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dry-system
|