ddd_domain 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ddd_domain/version.rb +1 -1
- data/lib/generators/domains/domains_generator.rb +8 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72b5644958153fa25e1700fd658f71bd401498828e45f14521c59c7af744bf3c
|
4
|
+
data.tar.gz: c9487867564cad97bdc7d1b41c03a75b51748ac781a4954b02e5ede7d287633f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b330af4ddc1b25fd8f9d5d3e70be7ef2329633573a45d5f45a96e5f4a87f5c9bc7beb0c5f312b16988211e5c404a2612d824833b1df17edcaeefaf512d335c24
|
7
|
+
data.tar.gz: b895ee1d71f4c6d53ca899973214ac39fdc8ed6c5558590cea9c6d414291c6df06bbbadfd96dfc008c1d199c7081ee632bb44d11fe36e687313935b017d8472c
|
data/lib/ddd_domain/version.rb
CHANGED
@@ -5,20 +5,17 @@ class DomainsGenerator < Rails::Generators::NamedBase
|
|
5
5
|
empty_directory "app/domains/#{file_name}"
|
6
6
|
create_file "app/domains/#{file_name}/.keep"
|
7
7
|
|
8
|
-
if File.exists? "config/
|
9
|
-
inject_into_file 'config/
|
8
|
+
if File.exists? "config/initializers/ddd_domain.rb"
|
9
|
+
inject_into_file 'config/initializers/ddd_domain.rb' do
|
10
10
|
<<-"RUBY"
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
Rails.configuration do |config|
|
12
|
+
config.paths.add 'app/domains/#{file_name}', eager_load: true
|
13
|
+
end
|
14
14
|
RUBY
|
15
15
|
end
|
16
|
-
|
17
|
-
inject_into_file
|
18
|
-
|
19
|
-
|
20
|
-
config.autoload_paths += %W(\#{config.root}/app/domains/#{file_name})
|
21
|
-
RUBY
|
16
|
+
else
|
17
|
+
inject_into_file 'config/initializers/ddd_domain.rb', :before => "end" do
|
18
|
+
config.paths.add 'app/domains/#{file_name}', eager_load: true
|
22
19
|
end
|
23
20
|
end
|
24
21
|
end
|