mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
b92065d465
First of all, we move the spec file from `spec` to `spec/helpers`. This is where it is supposed to be. Next, we add tests for all the methods that the module defines. During this process I had to change `module_function` to `extend self`. Rubocop doesn't like it for some unknown to me reason, so I had to disable the rule. There's no harm in doing so. Finally, I refactored some methods (low-hanging fruits only) and discovered that the `command_error` method is not necessary at all. All in all, this module is a lot better now but I feel like it shouldn't exist at all, since almost all methods are very specific to certain Pry commands. It's hardly a general purpose module for Pry plugins.
73 lines
1.3 KiB
YAML
73 lines
1.3 KiB
YAML
inherit_from: .rubocop_todo.yml
|
|
|
|
Style/NumericPredicate:
|
|
Enabled: false
|
|
|
|
Layout/IndentHeredoc:
|
|
Enabled: false
|
|
|
|
Naming/MethodName:
|
|
Exclude:
|
|
- 'spec/code_object_spec.rb'
|
|
- 'lib/pry/method.rb'
|
|
- 'lib/pry/wrapped_module.rb'
|
|
- 'lib/pry/code.rb'
|
|
|
|
Metrics/ModuleLength:
|
|
Exclude:
|
|
- 'lib/pry/config/behavior.rb'
|
|
|
|
Layout/CommentIndentation:
|
|
Exclude:
|
|
- 'spec/fixtures/example_nesting.rb'
|
|
|
|
Layout/MultilineMethodCallIndentation:
|
|
EnforcedStyle: indented
|
|
|
|
Style/ClassAndModuleChildren:
|
|
Exclude:
|
|
- 'spec/fixtures/example_nesting.rb'
|
|
|
|
# TODO: delete exclusions when we drop Ruby 1.9.3 support.
|
|
Style/ExpandPathArguments:
|
|
Exclude:
|
|
- 'lib/pry/commands.rb'
|
|
- 'pry.gemspec'
|
|
|
|
Style/Semicolon:
|
|
Exclude:
|
|
- 'spec/method_spec.rb'
|
|
|
|
Style/SingleLineMethods:
|
|
Exclude:
|
|
- 'spec/method_spec.rb'
|
|
- 'spec/fixtures/example_nesting.rb'
|
|
|
|
Style/StringLiterals:
|
|
Enabled: false
|
|
|
|
# TODO: delete this rule when we drop Ruby 1.9.3 support.
|
|
Style/SymbolArray:
|
|
EnforcedStyle: brackets
|
|
|
|
Metrics/LineLength:
|
|
Max: 90
|
|
|
|
Bundler/OrderedGems:
|
|
Enabled: false
|
|
|
|
Style/DoubleNegation:
|
|
Enabled: false
|
|
|
|
Style/Documentation:
|
|
Enabled: false
|
|
|
|
Style/CommentedKeyword:
|
|
Exclude:
|
|
- 'spec/fixtures/example_nesting.rb'
|
|
|
|
Gemspec/RequiredRubyVersion:
|
|
Enabled: false
|
|
|
|
Style/ModuleFunction:
|
|
Enabled: false
|