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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 862c92f9c7ae97679147abca15142919401f394f
4
- data.tar.gz: 1a45f469ab76bdeb0d42a9a6839ae5dd0ead08db
3
+ metadata.gz: f1ca1aa8801b2316d47ce4f90b24084913cf7aef
4
+ data.tar.gz: d937a6e6ff219be139517026210658c73f264d73
5
5
  SHA512:
6
- metadata.gz: da1ce7d73b40142c868d279e88e1b138912127e47eca7b07e5c5ca90fc550da252ca09793e5a455b6dc8e24c5c50860f468f9d782d693148d18f8ec667b2bb44
7
- data.tar.gz: 4f7140f3cb3590acc9d4c0db85dc9f450ab41277fbbe79098c3546ea0f12a25b4e46b5da8089b2b2e474eb86eeaae07d8ea152088f8357059a5127b89e472327
6
+ metadata.gz: affb62535becfec20ecb7c24e2b5d2579aeb1b4f4217652ff83e2ed058e5da421ed1fe41a5318d1f903157b1fbfa3de5a8d2604f52b881dc52e4d030c93d46e4
7
+ data.tar.gz: f9588ed76b2beeacfb44665b3bf7ca36281d2715eaf9f764a36a92f7bb4798aa22c7a034e2633366cee1d54b6b70f471fef4e17d9b206f1b641d0246699fc825
@@ -32,18 +32,114 @@ module ActiveGenerator
32
32
 
33
33
  end
34
34
 
35
- %w(controller helper jbuilder job mailer model responders_controller task).each do |generator_name|
36
- if ActiveGenerator.configuration.send("autoload_#{generator_name}_generator_locale")
37
- begin
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
- "Rails::Generators::#{generator_name.to_s.camelize}Generator".constantize.class_eval do
41
- def copy_locale_file
42
- invoke("locale:#{generator_name}", [name])
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
@@ -1,3 +1,3 @@
1
1
  module ActiveGenerator
2
- VERSION = "2.0.6"
2
+ VERSION = "2.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez