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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab-ci.yml +26 -0
  3. data/.rubocop.yml +27 -2
  4. data/.rubocop_todo.yml +5 -15
  5. data/.yardopts +5 -0
  6. data/CHANGELOG.md +39 -3
  7. data/CONTRIBUTING.md +0 -6
  8. data/Gemfile.lock +116 -92
  9. data/README.md +213 -6
  10. data/auxiliary_rails.gemspec +13 -12
  11. data/bin/rubocop +29 -0
  12. data/bitbucket-pipelines.yml +35 -0
  13. data/lib/auxiliary_rails.rb +5 -3
  14. data/lib/auxiliary_rails/application/command.rb +56 -0
  15. data/lib/auxiliary_rails/application/error.rb +10 -0
  16. data/lib/auxiliary_rails/application/form.rb +30 -0
  17. data/lib/auxiliary_rails/application/query.rb +71 -0
  18. data/lib/auxiliary_rails/cli.rb +18 -5
  19. data/lib/auxiliary_rails/concerns/errorable.rb +22 -0
  20. data/lib/auxiliary_rails/concerns/performable.rb +128 -0
  21. data/lib/auxiliary_rails/version.rb +1 -1
  22. data/lib/generators/auxiliary_rails/api_resource_generator.rb +10 -1
  23. data/lib/generators/auxiliary_rails/command_generator.rb +44 -0
  24. data/lib/generators/auxiliary_rails/install_commands_generator.rb +6 -1
  25. data/lib/generators/auxiliary_rails/install_generator.rb +0 -1
  26. data/lib/generators/auxiliary_rails/templates/apis/api_entity_template.rb.erb +2 -1
  27. data/lib/generators/auxiliary_rails/templates/apis/api_resource_spec_template.rb.erb +36 -9
  28. data/lib/generators/auxiliary_rails/templates/apis/api_resource_template.rb.erb +12 -6
  29. data/lib/generators/auxiliary_rails/templates/application_error_template.rb +1 -1
  30. data/lib/generators/auxiliary_rails/templates/commands/application_command_template.rb +2 -0
  31. data/lib/generators/auxiliary_rails/templates/commands/command_spec_template.rb +11 -0
  32. data/lib/generators/auxiliary_rails/templates/commands/command_template.rb +6 -0
  33. data/lib/generators/auxiliary_rails/templates/commands/commands.en_template.yml +5 -0
  34. data/templates/rails/elementary.rb +40 -10
  35. metadata +81 -24
  36. data/lib/auxiliary_rails/abstract_command.rb +0 -96
  37. data/lib/auxiliary_rails/abstract_error.rb +0 -7
  38. data/lib/generators/auxiliary_rails/install_rubocop_generator.rb +0 -29
  39. data/lib/generators/auxiliary_rails/templates/application_command_template.rb +0 -2
  40. data/lib/generators/auxiliary_rails/templates/rubocop/rubocop_auxiliary_rails_template.yml +0 -51
  41. data/lib/generators/auxiliary_rails/templates/rubocop/rubocop_template.yml +0 -7
@@ -1,7 +0,0 @@
1
- module AuxiliaryRails
2
- class AbstractError < StandardError
3
- def self.wrap(error)
4
- new(error.message)
5
- end
6
- end
7
- end
@@ -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,2 +0,0 @@
1
- class ApplicationCommand < AuxiliaryRails::AbstractCommand
2
- 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
@@ -1,7 +0,0 @@
1
- inherit_from:
2
- - .rubocop_auxiliary_rails.yml
3
-
4
- require:
5
- - rubocop-performance
6
- - rubocop-rails
7
- - rubocop-rspec