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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d579a5d35dcf5dd24dbfad0ed44e189cc7466ef7
4
- data.tar.gz: 5ebe26e8b1af343354f623b63153f5979d31a5b5
3
+ metadata.gz: 731a52af8749c05786162ff9ec61cbef85cab761
4
+ data.tar.gz: 0fef51d2a93e2d9840220e0d9e02cf173c89a70c
5
5
  SHA512:
6
- metadata.gz: a41dc183dc222d220fb1b87233ebee6fe5cb9eedc06c00edbc35271a08bd795e94ab295ad5aa03179f92ae6ecac89244bff66182b4b259112de2dbd200ff8883
7
- data.tar.gz: f8913f9eee939a59f782797171d5068533fc147985a1f2a0b6ab87142da6647a85a8e0e380c55ad2611afe78e4b2969e0a7439a8474ad072e1585d1a0eb40261
6
+ metadata.gz: 0e24bf09c86a23c3fe64c81aa887738fe457c4b4978bab808e655917e7aa3f8e0181cb7d0493b7a016fa40476f3008458a374d8c9ce0d88dcc4ae31898fe2f9a
7
+ data.tar.gz: 601c51f248fb3074bd21d05103c7f049be65e40d6d46f2cf10861749c81408bfa534e6072a1e9bc088c5311fe60c3f937f3258aa07895b62f1418ba5c52538cf
@@ -1,3 +1,3 @@
1
1
  module ActiveGenerator
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
@@ -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'.freeze, 'config/initializers/active_generator.rb'.freeze)
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'.freeze, File.join('config/environments'.freeze, class_path, "#{file_name}.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(', '.freeze)}"
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'.freeze, File.join('config/initializers'.freeze, class_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/apis", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/controllers", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/helpers", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/jobs", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/mailers", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/models", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/services", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/tasks", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/uploaders", namespace_path, "#{file_name}.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'.freeze, File.join("config/locales/#{language}/views", namespace_path, "#{file_name}.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'.freeze, [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_controller_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_helper_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_job_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_mailer_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_model_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
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'.freeze, [name]) if ActiveGenerator.configuration.autoload_task_generator_locale
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'.freeze, File.join('app/services'.freeze, class_path, "#{file_name}.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'.freeze, [name]) if ActiveGenerator.configuration.autoload_service_generator_locale
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'.freeze, file_name)) if actions.empty?
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'.freeze, File.join('app/views'.freeze, class_path, file_name, "#{filename}.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'.freeze, [name]) if ActiveGenerator.configuration.autoload_view_generator_locale
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.0
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-10-18 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails