active_generator 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/active_generator/configuration.rb +3 -1
- data/lib/active_generator/version.rb +1 -1
- data/lib/generators/rails/controller_generator.rb +12 -0
- data/lib/generators/rails/helper_generator.rb +3 -1
- data/lib/generators/rails/job_generator.rb +6 -0
- data/lib/generators/rails/mailer_generator.rb +12 -0
- data/lib/generators/rails/model_generator.rb +6 -0
- data/lib/generators/rails/scaffold_generator.rb +6 -0
- data/lib/generators/view/view_generator.rb +6 -0
- 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: be9f82b23248e0bdc190eedaa53813f4f3f7578b
|
4
|
+
data.tar.gz: 4971159e830272571bfd66173a766b6e15bd6156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bb5d098d3449c23d6d636c95b3782948beaf5a86347009843d96e2983d000dafc5e997e692d9d3c3879f8a3dc11f9fd24ae094a20f9b3118f4e94728ef9ec36
|
7
|
+
data.tar.gz: f0475cd4f9175a8e176555f853e3a071b2f85c14c31eaceeef4d8207aea9eda02289c05d063fee1ffd727f92deac8406048dcfe727d765317ce046512f56ab09
|
data/README.md
CHANGED
@@ -7,7 +7,8 @@ class ActiveGenerator::Configuration
|
|
7
7
|
:autoload_model_generator_locale,
|
8
8
|
:autoload_service_generator_locale,
|
9
9
|
:autoload_task_generator_locale,
|
10
|
-
:autoload_view_generator_locale
|
10
|
+
:autoload_view_generator_locale,
|
11
|
+
:test_framework
|
11
12
|
|
12
13
|
def initialize
|
13
14
|
@autoload_controller_generator_locale = true
|
@@ -18,6 +19,7 @@ class ActiveGenerator::Configuration
|
|
18
19
|
@autoload_service_generator_locale = true
|
19
20
|
@autoload_task_generator_locale = true
|
20
21
|
@autoload_view_generator_locale = true
|
22
|
+
@test_framework = :test_unit
|
21
23
|
end
|
22
24
|
|
23
25
|
end
|
@@ -9,6 +9,12 @@ module Erb
|
|
9
9
|
invoke("locale:view", [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
10
10
|
end
|
11
11
|
|
12
|
+
def generate_test_file
|
13
|
+
unless ["test_unit", nil].include?(ActiveGenerator.configuration.test_framework)
|
14
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:view", [name]) rescue nil
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
@@ -21,6 +27,12 @@ module Rails
|
|
21
27
|
invoke("locale:controller", [name]) if ActiveGenerator.configuration.autoload_controller_generator_locale
|
22
28
|
end
|
23
29
|
|
30
|
+
def generate_test_file
|
31
|
+
unless ActiveGenerator.configuration.test_framework.nil?
|
32
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:controller", [name]) rescue nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
end
|
25
37
|
end
|
26
38
|
end
|
@@ -8,6 +8,12 @@ module Rails
|
|
8
8
|
invoke("locale:job", [name]) if ActiveGenerator.configuration.autoload_job_generator_locale
|
9
9
|
end
|
10
10
|
|
11
|
+
def generate_test_file
|
12
|
+
unless ActiveGenerator.configuration.test_framework.nil?
|
13
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:job", [name]) rescue nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -9,6 +9,12 @@ module Erb
|
|
9
9
|
invoke("locale:view", [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
10
10
|
end
|
11
11
|
|
12
|
+
def generate_test_file
|
13
|
+
unless ["test_unit", nil].include?(ActiveGenerator.configuration.test_framework)
|
14
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:view", [name]) rescue nil
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
@@ -21,6 +27,12 @@ module Rails
|
|
21
27
|
invoke("locale:mailer", [name]) if ActiveGenerator.configuration.autoload_mailer_generator_locale
|
22
28
|
end
|
23
29
|
|
30
|
+
def generate_test_file
|
31
|
+
unless ActiveGenerator.configuration.test_framework.nil?
|
32
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:mailer", [name]) rescue nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
end
|
25
37
|
end
|
26
38
|
end
|
@@ -14,6 +14,12 @@ module ActiveRecord
|
|
14
14
|
invoke("locale:model", [name]) if ActiveGenerator.configuration.autoload_model_generator_locale
|
15
15
|
end
|
16
16
|
|
17
|
+
def generate_test_file
|
18
|
+
unless ActiveGenerator.configuration.test_framework.nil?
|
19
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:model", [name]) rescue nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
17
23
|
end
|
18
24
|
end
|
19
25
|
end
|
@@ -8,6 +8,12 @@ module Erb
|
|
8
8
|
invoke("locale:view", [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
9
9
|
end
|
10
10
|
|
11
|
+
def generate_test_file
|
12
|
+
unless ActiveGenerator.configuration.test_framework.nil?
|
13
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:view", [name]) rescue nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -20,4 +20,10 @@ class ViewGenerator < Rails::Generators::NamedBase
|
|
20
20
|
invoke("locale:view", [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
21
21
|
end
|
22
22
|
|
23
|
+
def generate_test_file
|
24
|
+
unless ["test_unit", nil].include?(ActiveGenerator.configuration.test_framework)
|
25
|
+
invoke("#{ActiveGenerator.configuration.test_framework}:view", [name]) rescue nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
23
29
|
end
|