active_generator 5.0.0 → 5.1.0

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
- SHA1:
3
- metadata.gz: 42522c4d97f6b3deb34f6d74fd3c016e6fd4b479
4
- data.tar.gz: 81b786cba681cd79eb9dbb33d32508cc1dd0b8b5
2
+ SHA256:
3
+ metadata.gz: 0ea2f69f57a857ee78fe624c6f573fac446897272a603782791fff30f550d827
4
+ data.tar.gz: 3f905ef46130e0a5250026d81f1369d64ed72e7daba2c29b836c283424cdc872
5
5
  SHA512:
6
- metadata.gz: b5a078be27984a9a71bada2d9958c14cf4dc393e84a99e446de484a9102852857cdeaeaddc0863839116a8a226e36f732828d3799a397a5d8c3641bffd75449e
7
- data.tar.gz: f6dc9736676f851d3bdf907b1fcb8c60cb8829bd08112989b80cb240b7f1637481f8c91ca78074e44d3489c9b08b78612bc6cd6ac77c662f63dd478ec13c8d34
6
+ metadata.gz: 6fc59cf493e9ec06a7a726754551f470fc7c0704b1275d92acafe88d2585d0d09f0ea4af369c57024d516fe015782f11bad024755e6c237c1e474b9ce720637c
7
+ data.tar.gz: f82144372798a7ddeb0bdd878dcf8db7848fcdf4022afa0cb5997aa579321ffb6cf17740f40df57db3afa8e0612a4d79611cce684a614d2e7b07f49329e11c93
@@ -0,0 +1,16 @@
1
+ ---
2
+ detectors:
3
+ Attribute:
4
+ enabled: false
5
+ IrresponsibleModule:
6
+ enabled: false
7
+ MissingSafeMethod:
8
+ enabled: false
9
+ NilCheck:
10
+ enabled: false
11
+ TooManyInstanceVariables:
12
+ enabled: false
13
+ TooManyStatements:
14
+ max_statements: 10
15
+ UtilityFunction:
16
+ enabled: false
@@ -11,11 +11,13 @@ Layout/EmptyLinesAroundModuleBody:
11
11
  Enabled: false
12
12
  LineLength:
13
13
  Max: 100
14
- Lint/RescueWithoutErrorClass:
15
- Enabled: false
16
14
  Lint/ScriptPermission:
17
15
  Enabled: false
18
16
  Style/Documentation:
19
17
  Enabled: false
18
+ Style/ExpandPathArguments:
19
+ Enabled: false
20
20
  Style/RescueModifier:
21
21
  Enabled: false
22
+ Style/RescueStandardError:
23
+ Enabled: false
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # coding: utf-8
4
-
5
3
  lib = File.expand_path('../lib', __FILE__)
6
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
5
  require 'active_generator/version'
@@ -25,10 +23,10 @@ Gem::Specification.new do |spec|
25
23
  spec.add_runtime_dependency 'rails'
26
24
 
27
25
  spec.add_development_dependency 'bundler'
28
- spec.add_development_dependency 'rake'
29
- spec.add_development_dependency 'rspec'
30
- spec.add_development_dependency 'generator_spec'
31
26
  spec.add_development_dependency 'fasterer'
27
+ spec.add_development_dependency 'generator_spec'
28
+ spec.add_development_dependency 'rake'
32
29
  spec.add_development_dependency 'reek'
30
+ spec.add_development_dependency 'rspec'
33
31
  spec.add_development_dependency 'rubocop'
34
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveGenerator
4
- VERSION ||= '5.0.0'
4
+ VERSION ||= '5.1.0'
5
5
  end
@@ -20,6 +20,7 @@ class EnvironmentGenerator < Rails::Generators::NamedBase
20
20
 
21
21
  def assert_valid_environment!
22
22
  return if environment.nil? || ENVIRONMENTS.include?(environment)
23
+
23
24
  raise ArgumentError, ["Unknown environment: #{environment.inspect}.",
24
25
  "Valid options: #{ENVIRONMENTS.map(&:inspect).join(', ')}"].join(' ')
25
26
  end
@@ -7,6 +7,7 @@ module Locale
7
7
 
8
8
  def assert_valid_language!
9
9
  return if [2, 4, 5, 6].include?(language.size) && /^[A-Za-z-]+$/.match?(language)
10
+
10
11
  raise ArgumentError,
11
12
  "Unknown language format: #{language.inspect}. Valid format example is: 'en'"
12
13
  end
@@ -3,14 +3,14 @@
3
3
  #==================================================
4
4
  <% if namespaced? -%>
5
5
  # <%= namespace_human %>
6
- # <%= file_name_human %>
6
+ # <%= file_name_human %> mailer
7
7
  # Methods
8
8
  # TODO
9
9
 
10
10
  <%= language %>:
11
11
  mailers:
12
12
  <%= namespace_table %>:
13
- <%= file_name_table %>:
13
+ <%= file_name_table %>_mailer:
14
14
 
15
15
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
16
  # Methods
@@ -27,7 +27,7 @@
27
27
 
28
28
  <%= language %>:
29
29
  mailers:
30
- <%= file_name_table %>:
30
+ <%= file_name_table %>_mailer:
31
31
 
32
32
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
33
  # Methods
@@ -17,6 +17,7 @@ module Erb
17
17
  framework = configuration.test_framework
18
18
 
19
19
  return if framework.nil?
20
+
20
21
  invoke("#{framework}:view", [name]) rescue nil
21
22
  end
22
23
 
@@ -37,6 +38,7 @@ module Rails
37
38
  framework = configuration.test_framework
38
39
 
39
40
  return if framework.nil?
41
+
40
42
  invoke("#{framework}:controller", [name]) rescue nil
41
43
  end
42
44
 
@@ -16,6 +16,7 @@ module Rails
16
16
  framework = configuration.test_framework
17
17
 
18
18
  return if framework.nil?
19
+
19
20
  invoke("#{framework}:helper", [name]) rescue nil
20
21
  end
21
22
 
@@ -16,6 +16,7 @@ module Rails
16
16
  framework = configuration.test_framework
17
17
 
18
18
  return if framework.nil?
19
+
19
20
  invoke("#{framework}:job", [name]) rescue nil
20
21
  end
21
22
  end
@@ -17,6 +17,7 @@ module Erb
17
17
  framework = configuration.test_framework
18
18
 
19
19
  return if framework.nil?
20
+
20
21
  invoke("#{framework}:view", [name]) rescue nil
21
22
  end
22
23
 
@@ -37,6 +38,7 @@ module Rails
37
38
  framework = configuration.test_framework
38
39
 
39
40
  return if framework.nil?
41
+
40
42
  invoke("#{framework}:mailer", [name]) rescue nil
41
43
  end
42
44
 
@@ -30,6 +30,7 @@ module ActiveRecord
30
30
  framework = configuration.test_framework
31
31
 
32
32
  return if framework.nil?
33
+
33
34
  invoke("#{framework}:model", [name]) rescue nil
34
35
  end
35
36
 
@@ -16,6 +16,7 @@ module Erb
16
16
  framework = configuration.test_framework
17
17
 
18
18
  return if framework.nil?
19
+
19
20
  invoke("#{framework}:view", [name]) rescue nil
20
21
  end
21
22
 
@@ -8,6 +8,7 @@ module Rails
8
8
 
9
9
  def generate_locale_file
10
10
  return unless ActiveGenerator.configuration.autoload_task_generator_locale
11
+
11
12
  invoke('locale:task', [name])
12
13
  end
13
14
 
@@ -9,6 +9,7 @@ class ServiceGenerator < Rails::Generators::NamedBase
9
9
 
10
10
  def generate_locale_file
11
11
  return unless ActiveGenerator.configuration.autoload_service_generator_locale
12
+
12
13
  invoke('locale:service', [name])
13
14
  end
14
15
 
@@ -27,6 +27,7 @@ class ViewGenerator < Rails::Generators::NamedBase
27
27
  framework = configuration.test_framework
28
28
 
29
29
  return if framework.nil?
30
+
30
31
  invoke("#{framework}:view", [name]) rescue nil
31
32
  end
32
33
 
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: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-06 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: fasterer
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: generator_spec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: generator_spec
70
+ name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: fasterer
84
+ name: reek
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: reek
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -131,7 +131,7 @@ extra_rdoc_files: []
131
131
  files:
132
132
  - ".fasterer.yml"
133
133
  - ".gitignore"
134
- - ".reek"
134
+ - ".reek.yml"
135
135
  - ".rspec"
136
136
  - ".rubocop.yml"
137
137
  - ".travis.yml"
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  version: '0'
221
221
  requirements: []
222
222
  rubyforge_project:
223
- rubygems_version: 2.6.13
223
+ rubygems_version: 2.7.7
224
224
  signing_key:
225
225
  specification_version: 4
226
226
  summary: Gem for commonly used generators.
data/.reek DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- Attribute:
3
- enabled: false
4
- IrresponsibleModule:
5
- enabled: false
6
- NilCheck:
7
- enabled: false
8
- PrimaDonnaMethod:
9
- enabled: false
10
- TooManyInstanceVariables:
11
- enabled: false
12
- TooManyStatements:
13
- max_statements: 10
14
- UtilityFunction:
15
- enabled: false