active_generator 2.0.9 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04fddd3190e12ddaac63b2edbfade868861bda28
|
4
|
+
data.tar.gz: 134cdebbab181dd6076889e929993110c1e69b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8996dd20ce99d1863d7d74ee9123a41794558682e07d3859c1edb1b0edf2c81adc8477d52dacda1ed4807266e9a1b235fa0d2271e5c80c5dc113f132c308c5f
|
7
|
+
data.tar.gz: 9ed0eddd51b3c6017636d3faa2ebcf90a72d8db4820ba0efb269e92247c1ae80d8b5c24ffc494f339788c702e3ab184a60333e1b949aa3062c9ebe658381e1d2
|
data/lib/active_generator.rb
CHANGED
@@ -4,14 +4,6 @@ require "active_object"
|
|
4
4
|
require "active_generator/version"
|
5
5
|
require "active_generator/configuration"
|
6
6
|
|
7
|
-
require "generators/environment/environment_generator"
|
8
|
-
require "generators/initializer/initializer_generator"
|
9
|
-
require "generators/service/service_generator"
|
10
|
-
|
11
|
-
%w(api controller helper jbuilder job mailer model responders_controller service task uploader view).each do |generator_name|
|
12
|
-
require "generators/locale/#{generator_name}/#{generator_name}_generator"
|
13
|
-
end
|
14
|
-
|
15
7
|
module ActiveGenerator
|
16
8
|
|
17
9
|
class << self
|
@@ -32,33 +24,13 @@ module ActiveGenerator
|
|
32
24
|
|
33
25
|
end
|
34
26
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
44
|
-
rescue LoadError => e
|
45
|
-
# Skip over missing files
|
46
|
-
end
|
47
|
-
#end
|
48
|
-
|
49
|
-
#if ActiveGenerator.configuration.autoload_helper_generator_locale
|
50
|
-
begin
|
51
|
-
require "rails/generators/rails/helper/helper_generator"
|
52
|
-
|
53
|
-
Rails::Generators::HelperGenerator.class_eval do
|
54
|
-
def copy_locale_file
|
55
|
-
invoke("locale:helper", [name])
|
56
|
-
end
|
57
|
-
end
|
58
|
-
rescue LoadError => e
|
59
|
-
# Skip over missing files
|
60
|
-
end
|
61
|
-
#end
|
27
|
+
require "generators/environment/environment_generator"
|
28
|
+
require "generators/initializer/initializer_generator"
|
29
|
+
require "generators/service/service_generator"
|
30
|
+
|
31
|
+
%w(api controller helper jbuilder job mailer model responders_controller service task uploader view).each do |generator_name|
|
32
|
+
require "generators/locale/#{generator_name}/#{generator_name}_generator"
|
33
|
+
end
|
62
34
|
|
63
35
|
# if ActiveGenerator.configuration.autoload_jbuilder_generator_locale
|
64
36
|
# begin
|
@@ -15,4 +15,18 @@ module Locale
|
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
18
|
+
end
|
19
|
+
|
20
|
+
if ActiveGenerator.configuration.autoload_controller_generator_locale
|
21
|
+
begin
|
22
|
+
require "rails/generators/rails/controller/controller_generator"
|
23
|
+
|
24
|
+
Rails::Generators::ControllerGenerator.class_eval do
|
25
|
+
def copy_controller_locale_file
|
26
|
+
invoke("locale:controller", [name])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
rescue LoadError => e
|
30
|
+
# Skip over missing files
|
31
|
+
end
|
18
32
|
end
|
@@ -15,4 +15,18 @@ module Locale
|
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
18
|
+
end
|
19
|
+
|
20
|
+
if ActiveGenerator.configuration.autoload_helper_generator_locale
|
21
|
+
begin
|
22
|
+
require "rails/generators/rails/helper/helper_generator"
|
23
|
+
|
24
|
+
Rails::Generators::HelperGenerator.class_eval do
|
25
|
+
def copy_helper_locale_file
|
26
|
+
invoke("locale:helper", [name])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
rescue LoadError => e
|
30
|
+
# Skip over missing files
|
31
|
+
end
|
18
32
|
end
|