active_generator 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_generator.rb +106 -10
- data/lib/active_generator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1ca1aa8801b2316d47ce4f90b24084913cf7aef
|
4
|
+
data.tar.gz: d937a6e6ff219be139517026210658c73f264d73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: affb62535becfec20ecb7c24e2b5d2579aeb1b4f4217652ff83e2ed058e5da421ed1fe41a5318d1f903157b1fbfa3de5a8d2604f52b881dc52e4d030c93d46e4
|
7
|
+
data.tar.gz: f9588ed76b2beeacfb44665b3bf7ca36281d2715eaf9f764a36a92f7bb4798aa22c7a034e2633366cee1d54b6b70f471fef4e17d9b206f1b641d0246699fc825
|
data/lib/active_generator.rb
CHANGED
@@ -32,18 +32,114 @@ module ActiveGenerator
|
|
32
32
|
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
require "rails/generators/rails/#{generator_name}/#{generator_name}_generator"
|
35
|
+
if ActiveGenerator.configuration.autoload_controller_generator_locale
|
36
|
+
begin
|
37
|
+
require "rails/generators/rails/controller/controller_generator"
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
39
|
+
Rails::Generators::ControllerGenerator.class_eval do
|
40
|
+
def copy_locale_file
|
41
|
+
invoke("locale:controller", [name])
|
44
42
|
end
|
45
|
-
rescue LoadError => e
|
46
|
-
# Skip over missing files
|
47
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
|
62
|
+
|
63
|
+
if ActiveGenerator.configuration.autoload_jbuilder_generator_locale
|
64
|
+
begin
|
65
|
+
require "rails/generators/rails/jbuilder/jbuilder_generator"
|
66
|
+
|
67
|
+
Rails::Generators::JbuilderGenerator.class_eval do
|
68
|
+
def copy_locale_file
|
69
|
+
invoke("locale:jbuilder", [name])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
rescue LoadError => e
|
73
|
+
# Skip over missing files
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
if ActiveGenerator.configuration.autoload_job_generator_locale
|
78
|
+
begin
|
79
|
+
require "rails/generators/rails/job/job_generator"
|
80
|
+
|
81
|
+
Rails::Generators::JobGenerator.class_eval do
|
82
|
+
def copy_locale_file
|
83
|
+
invoke("locale:job", [name])
|
84
|
+
end
|
85
|
+
end
|
86
|
+
rescue LoadError => e
|
87
|
+
# Skip over missing files
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
if ActiveGenerator.configuration.autoload_mailer_generator_locale
|
92
|
+
begin
|
93
|
+
require "rails/generators/rails/mailer/mailer_generator"
|
94
|
+
|
95
|
+
Rails::Generators::MailerGenerator.class_eval do
|
96
|
+
def copy_locale_file
|
97
|
+
invoke("locale:mailer", [name])
|
98
|
+
end
|
99
|
+
end
|
100
|
+
rescue LoadError => e
|
101
|
+
# Skip over missing files
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
if ActiveGenerator.configuration.autoload_model_generator_locale
|
106
|
+
begin
|
107
|
+
require "rails/generators/rails/model/model_generator"
|
108
|
+
|
109
|
+
Rails::Generators::ModelGenerator.class_eval do
|
110
|
+
def copy_locale_file
|
111
|
+
invoke("locale:model", [name])
|
112
|
+
end
|
113
|
+
end
|
114
|
+
rescue LoadError => e
|
115
|
+
# Skip over missing files
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
if ActiveGenerator.configuration.autoload_responders_controller_generator_locale
|
120
|
+
begin
|
121
|
+
require "rails/generators/rails/responders_controller/responders_controller_generator"
|
122
|
+
|
123
|
+
Rails::Generators::RespondersControllerGenerator.class_eval do
|
124
|
+
def copy_locale_file
|
125
|
+
invoke("locale:responders_controller", [name])
|
126
|
+
end
|
127
|
+
end
|
128
|
+
rescue LoadError => e
|
129
|
+
# Skip over missing files
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
if ActiveGenerator.configuration.autoload_task_generator_locale
|
134
|
+
begin
|
135
|
+
require "rails/generators/rails/task/task_generator"
|
136
|
+
|
137
|
+
Rails::Generators::TaskGenerator.class_eval do
|
138
|
+
def copy_locale_file
|
139
|
+
invoke("locale:task", [name])
|
140
|
+
end
|
141
|
+
end
|
142
|
+
rescue LoadError => e
|
143
|
+
# Skip over missing files
|
48
144
|
end
|
49
145
|
end
|