auxiliary_rails 0.1.6 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +26 -0
- data/.rubocop.yml +27 -2
- data/.rubocop_todo.yml +5 -15
- data/.yardopts +5 -0
- data/CHANGELOG.md +39 -3
- data/CONTRIBUTING.md +0 -6
- data/Gemfile.lock +116 -92
- data/README.md +213 -6
- data/auxiliary_rails.gemspec +13 -12
- data/bin/rubocop +29 -0
- data/bitbucket-pipelines.yml +35 -0
- data/lib/auxiliary_rails.rb +5 -3
- data/lib/auxiliary_rails/application/command.rb +56 -0
- data/lib/auxiliary_rails/application/error.rb +10 -0
- data/lib/auxiliary_rails/application/form.rb +30 -0
- data/lib/auxiliary_rails/application/query.rb +71 -0
- data/lib/auxiliary_rails/cli.rb +18 -5
- data/lib/auxiliary_rails/concerns/errorable.rb +22 -0
- data/lib/auxiliary_rails/concerns/performable.rb +128 -0
- data/lib/auxiliary_rails/version.rb +1 -1
- data/lib/generators/auxiliary_rails/api_resource_generator.rb +10 -1
- data/lib/generators/auxiliary_rails/command_generator.rb +44 -0
- data/lib/generators/auxiliary_rails/install_commands_generator.rb +6 -1
- data/lib/generators/auxiliary_rails/install_generator.rb +0 -1
- data/lib/generators/auxiliary_rails/templates/apis/api_entity_template.rb.erb +2 -1
- data/lib/generators/auxiliary_rails/templates/apis/api_resource_spec_template.rb.erb +36 -9
- data/lib/generators/auxiliary_rails/templates/apis/api_resource_template.rb.erb +12 -6
- data/lib/generators/auxiliary_rails/templates/application_error_template.rb +1 -1
- data/lib/generators/auxiliary_rails/templates/commands/application_command_template.rb +2 -0
- data/lib/generators/auxiliary_rails/templates/commands/command_spec_template.rb +11 -0
- data/lib/generators/auxiliary_rails/templates/commands/command_template.rb +6 -0
- data/lib/generators/auxiliary_rails/templates/commands/commands.en_template.yml +5 -0
- data/templates/rails/elementary.rb +40 -10
- metadata +81 -24
- data/lib/auxiliary_rails/abstract_command.rb +0 -96
- data/lib/auxiliary_rails/abstract_error.rb +0 -7
- data/lib/generators/auxiliary_rails/install_rubocop_generator.rb +0 -29
- data/lib/generators/auxiliary_rails/templates/application_command_template.rb +0 -2
- data/lib/generators/auxiliary_rails/templates/rubocop/rubocop_auxiliary_rails_template.yml +0 -51
- data/lib/generators/auxiliary_rails/templates/rubocop/rubocop_template.yml +0 -7
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'rails'
|
2
|
-
|
3
|
-
module AuxiliaryRails
|
4
|
-
class InstallRubocopGenerator < ::Rails::Generators::Base
|
5
|
-
class_option :specify_gems,
|
6
|
-
type: :boolean,
|
7
|
-
default: true,
|
8
|
-
desc: 'Indicates if `rubocop` gem needs to be added to Gemfile'
|
9
|
-
source_root File.expand_path('templates/rubocop', __dir__)
|
10
|
-
|
11
|
-
def copy_config_files
|
12
|
-
copy_file 'rubocop_template.yml',
|
13
|
-
'.rubocop.yml'
|
14
|
-
copy_file 'rubocop_auxiliary_rails_template.yml',
|
15
|
-
'.rubocop_auxiliary_rails.yml'
|
16
|
-
end
|
17
|
-
|
18
|
-
def specify_gems_dependency
|
19
|
-
return unless options[:specify_gems]
|
20
|
-
|
21
|
-
gem_group :development, :test do
|
22
|
-
gem 'rubocop'
|
23
|
-
gem 'rubocop-performance'
|
24
|
-
gem 'rubocop-rails'
|
25
|
-
gem 'rubocop-rspec'
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# AuxiliaryRails RuboCop Config
|
2
|
-
# Homepage: https://github.com/ergoserv/auxiliary_rails
|
3
|
-
# Version: 7
|
4
|
-
|
5
|
-
AllCops:
|
6
|
-
Exclude:
|
7
|
-
- 'bin/*'
|
8
|
-
- 'db/schema.rb'
|
9
|
-
- 'db/migrate/*'
|
10
|
-
- 'node_modules/**/*'
|
11
|
-
- 'vendor/**/*'
|
12
|
-
|
13
|
-
#################### Layout ###############################
|
14
|
-
|
15
|
-
Layout/AlignArguments:
|
16
|
-
EnforcedStyle: with_fixed_indentation
|
17
|
-
|
18
|
-
#################### Metrics ###############################
|
19
|
-
|
20
|
-
Metrics/MethodLength:
|
21
|
-
Max: 30
|
22
|
-
|
23
|
-
#################### Rails #################################
|
24
|
-
|
25
|
-
Rails:
|
26
|
-
Enabled: true
|
27
|
-
|
28
|
-
#################### RSpec #################################
|
29
|
-
|
30
|
-
RSpec/NamedSubject:
|
31
|
-
Enabled: false
|
32
|
-
|
33
|
-
#################### Style #################################
|
34
|
-
|
35
|
-
Style/Documentation:
|
36
|
-
Enabled: false
|
37
|
-
|
38
|
-
Style/FrozenStringLiteralComment:
|
39
|
-
Enabled: false
|
40
|
-
|
41
|
-
Style/IfUnlessModifier:
|
42
|
-
Enabled: false
|
43
|
-
|
44
|
-
Style/NegatedIf:
|
45
|
-
EnforcedStyle: postfix
|
46
|
-
|
47
|
-
Style/NumericPredicate:
|
48
|
-
EnforcedStyle: comparison
|
49
|
-
|
50
|
-
Style/RescueStandardError:
|
51
|
-
EnforcedStyle: implicit
|