active_generator 2.3.0 → 2.3.1
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/version.rb +1 -1
- data/lib/generators/active_generator/install/install_generator.rb +1 -1
- data/lib/generators/environment/environment_generator.rb +2 -2
- data/lib/generators/initializer/initializer_generator.rb +1 -1
- data/lib/generators/locale/api/api_generator.rb +1 -1
- data/lib/generators/locale/controller/controller_generator.rb +1 -1
- data/lib/generators/locale/helper/helper_generator.rb +1 -1
- data/lib/generators/locale/job/job_generator.rb +1 -1
- data/lib/generators/locale/mailer/mailer_generator.rb +1 -1
- data/lib/generators/locale/model/model_generator.rb +1 -1
- data/lib/generators/locale/service/service_generator.rb +1 -1
- data/lib/generators/locale/task/task_generator.rb +1 -1
- data/lib/generators/locale/uploader/uploader_generator.rb +1 -1
- data/lib/generators/locale/view/view_generator.rb +1 -1
- data/lib/generators/rails/controller_generator.rb +2 -2
- data/lib/generators/rails/helper_generator.rb +1 -1
- data/lib/generators/rails/job_generator.rb +1 -1
- data/lib/generators/rails/mailer_generator.rb +2 -2
- data/lib/generators/rails/model_generator.rb +1 -1
- data/lib/generators/rails/scaffold_generator.rb +1 -1
- data/lib/generators/rails/task_generator.rb +1 -1
- data/lib/generators/service/service_generator.rb +2 -2
- data/lib/generators/view/view_generator.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 731a52af8749c05786162ff9ec61cbef85cab761
|
4
|
+
data.tar.gz: 0fef51d2a93e2d9840220e0d9e02cf173c89a70c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e24bf09c86a23c3fe64c81aa887738fe457c4b4978bab808e655917e7aa3f8e0181cb7d0493b7a016fa40476f3008458a374d8c9ce0d88dcc4ae31898fe2f9a
|
7
|
+
data.tar.gz: 601c51f248fb3074bd21d05103c7f049be65e40d6d46f2cf10861749c81408bfa534e6072a1e9bc088c5311fe60c3f937f3258aa07895b62f1418ba5c52538cf
|
@@ -3,7 +3,7 @@ module ActiveGenerator
|
|
3
3
|
source_root File.expand_path('../templates', __FILE__)
|
4
4
|
|
5
5
|
def copy_initializer_file
|
6
|
-
copy_file('install.rb'
|
6
|
+
copy_file('install.rb', 'config/initializers/active_generator.rb')
|
7
7
|
end
|
8
8
|
|
9
9
|
end
|
@@ -4,7 +4,7 @@ class EnvironmentGenerator < Rails::Generators::NamedBase
|
|
4
4
|
|
5
5
|
def create_environment_file
|
6
6
|
assert_valid_environment!
|
7
|
-
template('environment.rb'
|
7
|
+
template('environment.rb', File.join('config/environments', class_path, "#{file_name}.rb"))
|
8
8
|
end
|
9
9
|
|
10
10
|
private
|
@@ -19,7 +19,7 @@ class EnvironmentGenerator < Rails::Generators::NamedBase
|
|
19
19
|
unless environment.nil?
|
20
20
|
unless ENVIRONMENTS.include?(environment)
|
21
21
|
raise ArgumentError,
|
22
|
-
"Unknown environment: #{environment.inspect}. Valid environments are: #{ENVIRONMENTS.map(&:inspect).join(', '
|
22
|
+
"Unknown environment: #{environment.inspect}. Valid environments are: #{ENVIRONMENTS.map(&:inspect).join(', ')}"
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -2,7 +2,7 @@ class InitializerGenerator < Rails::Generators::NamedBase
|
|
2
2
|
source_root File.expand_path('../templates', __FILE__)
|
3
3
|
|
4
4
|
def copy_initializer_file
|
5
|
-
copy_file('initializer.rb'
|
5
|
+
copy_file('initializer.rb', File.join('config/initializers', class_path, "#{file_name}.rb"))
|
6
6
|
end
|
7
7
|
|
8
8
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_api_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('api.yml'
|
14
|
+
template('api.yml', File.join("config/locales/#{language}/apis", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_controller_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('controller.yml'
|
14
|
+
template('controller.yml', File.join("config/locales/#{language}/controllers", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_helper_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('helper.yml'
|
14
|
+
template('helper.yml', File.join("config/locales/#{language}/helpers", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_job_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('job.yml'
|
14
|
+
template('job.yml', File.join("config/locales/#{language}/jobs", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_mailer_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('mailer.yml'
|
14
|
+
template('mailer.yml', File.join("config/locales/#{language}/mailers", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_model_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('model.yml'
|
14
|
+
template('model.yml', File.join("config/locales/#{language}/models", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_service_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('service.yml'
|
14
|
+
template('service.yml', File.join("config/locales/#{language}/services", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def copy_task_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('task.yml'
|
14
|
+
template('task.yml', File.join("config/locales/#{language}/tasks", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_uploader_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('uploader.yml'
|
14
|
+
template('uploader.yml', File.join("config/locales/#{language}/uploaders", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -11,7 +11,7 @@ module Locale
|
|
11
11
|
|
12
12
|
def create_view_file
|
13
13
|
assert_valid_language!
|
14
|
-
template('view.yml'
|
14
|
+
template('view.yml', File.join("config/locales/#{language}/views", namespace_path, "#{file_name}.yml"))
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -6,7 +6,7 @@ module Erb
|
|
6
6
|
class ControllerGenerator
|
7
7
|
|
8
8
|
def generate_locale_file
|
9
|
-
invoke('locale:view'
|
9
|
+
invoke('locale:view', [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
10
10
|
end
|
11
11
|
|
12
12
|
def generate_test_file
|
@@ -24,7 +24,7 @@ module Rails
|
|
24
24
|
class ControllerGenerator
|
25
25
|
|
26
26
|
def generate_locale_file
|
27
|
-
invoke('locale:controller'
|
27
|
+
invoke('locale:controller', [name]) if ActiveGenerator.configuration.autoload_controller_generator_locale
|
28
28
|
end
|
29
29
|
|
30
30
|
def generate_test_file
|
@@ -5,7 +5,7 @@ module Rails
|
|
5
5
|
class HelperGenerator
|
6
6
|
|
7
7
|
def generate_locale_file
|
8
|
-
invoke('locale:helper'
|
8
|
+
invoke('locale:helper', [name]) if ActiveGenerator.configuration.autoload_helper_generator_locale
|
9
9
|
end
|
10
10
|
|
11
11
|
def generate_test_file
|
@@ -5,7 +5,7 @@ module Rails
|
|
5
5
|
class JobGenerator
|
6
6
|
|
7
7
|
def generate_locale_file
|
8
|
-
invoke('locale:job'
|
8
|
+
invoke('locale:job', [name]) if ActiveGenerator.configuration.autoload_job_generator_locale
|
9
9
|
end
|
10
10
|
|
11
11
|
def generate_test_file
|
@@ -6,7 +6,7 @@ module Erb
|
|
6
6
|
class MailerGenerator
|
7
7
|
|
8
8
|
def generate_locale_file
|
9
|
-
invoke('locale:view'
|
9
|
+
invoke('locale:view', [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
10
10
|
end
|
11
11
|
|
12
12
|
def generate_test_file
|
@@ -24,7 +24,7 @@ module Rails
|
|
24
24
|
class MailerGenerator
|
25
25
|
|
26
26
|
def generate_locale_file
|
27
|
-
invoke('locale:mailer'
|
27
|
+
invoke('locale:mailer', [name]) if ActiveGenerator.configuration.autoload_mailer_generator_locale
|
28
28
|
end
|
29
29
|
|
30
30
|
def generate_test_file
|
@@ -11,7 +11,7 @@ module ActiveRecord
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def generate_locale_file
|
14
|
-
invoke('locale:model'
|
14
|
+
invoke('locale:model', [name]) if ActiveGenerator.configuration.autoload_model_generator_locale
|
15
15
|
end
|
16
16
|
|
17
17
|
def generate_test_file
|
@@ -5,7 +5,7 @@ module Erb
|
|
5
5
|
class ScaffoldGenerator
|
6
6
|
|
7
7
|
def generate_locale_file
|
8
|
-
invoke('locale:view'
|
8
|
+
invoke('locale:view', [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
9
9
|
end
|
10
10
|
|
11
11
|
def generate_test_file
|
@@ -5,7 +5,7 @@ module Rails
|
|
5
5
|
class TaskGenerator
|
6
6
|
|
7
7
|
def generate_locale_file
|
8
|
-
invoke('locale:task'
|
8
|
+
invoke('locale:task', [name]) if ActiveGenerator.configuration.autoload_task_generator_locale
|
9
9
|
end
|
10
10
|
|
11
11
|
end
|
@@ -2,11 +2,11 @@ class ServiceGenerator < Rails::Generators::NamedBase
|
|
2
2
|
source_root File.expand_path('../templates', __FILE__)
|
3
3
|
|
4
4
|
def create_service_file
|
5
|
-
template('service.rb'
|
5
|
+
template('service.rb', File.join('app/services', class_path, "#{file_name}.rb"))
|
6
6
|
end
|
7
7
|
|
8
8
|
def generate_locale_file
|
9
|
-
invoke('locale:service'
|
9
|
+
invoke('locale:service', [name]) if ActiveGenerator.configuration.autoload_service_generator_locale
|
10
10
|
end
|
11
11
|
|
12
12
|
end
|
@@ -5,19 +5,19 @@ class ViewGenerator < Rails::Generators::NamedBase
|
|
5
5
|
argument :actions, type: :array, required: false, default: [], desc: 'The pages to generate'
|
6
6
|
|
7
7
|
def create_root_directory
|
8
|
-
empty_directory(File.join('app/views'
|
8
|
+
empty_directory(File.join('app/views', file_name)) if actions.empty?
|
9
9
|
end
|
10
10
|
|
11
11
|
def create_view_file
|
12
12
|
unless actions.empty?
|
13
13
|
actions.each do |filename|
|
14
|
-
template('view.html.erb'
|
14
|
+
template('view.html.erb', File.join('app/views', class_path, file_name, "#{filename}.html.erb"))
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
19
|
def generate_locale_file
|
20
|
-
invoke('locale:view'
|
20
|
+
invoke('locale:view', [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
|
21
21
|
end
|
22
22
|
|
23
23
|
def generate_test_file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|