1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

rubocop: fix offences of the Layout/EmptyLinesAroundModuleBody cop

This commit is contained in:
Kyrylo Silin 2019-02-25 00:26:22 +02:00
parent 1e46f17b4f
commit f0a6af8492
10 changed files with 0 additions and 31 deletions

View file

@ -13,22 +13,6 @@ Gemspec/RequiredRubyVersion:
Exclude:
- 'pry.gemspec'
# Offense count: 16
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
Layout/EmptyLinesAroundModuleBody:
Exclude:
- 'lib/pry/commands/ls/interrogatable.rb'
- 'lib/pry/commands/ls/jruby_hacks.rb'
- 'lib/pry/commands/ls/methods_helper.rb'
- 'lib/pry/helpers/command_helpers.rb'
- 'lib/pry/helpers/documentation_helpers.rb'
- 'lib/pry/helpers/table.rb'
- 'lib/pry/rubygem.rb'
- 'spec/commands/show_doc_spec.rb'
- 'spec/commands/show_source_spec.rb'
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.

View file

@ -1,5 +1,4 @@
module Pry::Command::Ls::Interrogatable
private
def interrogating_a_module?
@ -14,5 +13,4 @@ module Pry::Command::Ls::Interrogatable
singleton.ancestors.grep(::Class).reject { |c| c == singleton }.first
end
end
end

View file

@ -1,5 +1,4 @@
module Pry::Command::Ls::JRubyHacks
private
# JRuby creates lots of aliases for methods imported from java in an attempt
@ -45,5 +44,4 @@ module Pry::Command::Ls::JRubyHacks
end
end.inject(&:+) + (name.size / 100.0)
end
end

View file

@ -1,7 +1,6 @@
require 'pry/commands/ls/jruby_hacks'
module Pry::Command::Ls::MethodsHelper
include Pry::Command::Ls::JRubyHacks
private
@ -42,5 +41,4 @@ module Pry::Command::Ls::MethodsHelper
end
end
end
end

View file

@ -1,6 +1,5 @@
class Pry
module Helpers
module CommandHelpers
include OptionsHelpers
@ -152,6 +151,5 @@ class Pry
_pry_.inject_local("_dir_", _pry_.last_dir, target)
end
end
end
end

View file

@ -1,6 +1,5 @@
class Pry
module Helpers
# This class contains methods useful for extracting
# documentation from methods and classes.
module DocumentationHelpers

View file

@ -110,6 +110,5 @@ class Pry
@colorless_cache[thing]
end
end
end
end

View file

@ -2,7 +2,6 @@ require 'rubygems'
class Pry
module Rubygem
class << self
def installed?(name)
if Gem::Specification.respond_to?(:find_all_by_name)
@ -79,6 +78,5 @@ class Pry
Gem.refresh
end
end
end
end

View file

@ -356,7 +356,6 @@ describe "show-doc" do
describe "when no class/module arg is given" do
before do
module TestHost
# hello there froggy
module M
def d; end
@ -530,7 +529,6 @@ describe "show-doc" do
describe "for modules" do
before do
module Jesus
# alpha-doc
module Alpha
def alpha; :alpha; end

View file

@ -611,7 +611,6 @@ describe "show-source" do
describe "should skip over broken modules" do
before do
module BabyDuck
module Muesli
binding.eval("def a; end", "dummy.rb", 1)
binding.eval("def b; end", "dummy.rb", 2)