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/SpaceBeforeComma cop

This commit is contained in:
Kyrylo Silin 2019-02-26 00:42:17 +02:00
parent 800ba1b661
commit b44eea4bbe
4 changed files with 3 additions and 11 deletions

View file

@ -13,14 +13,6 @@ Gemspec/RequiredRubyVersion:
Exclude:
- 'pry.gemspec'
# Offense count: 3
# Cop supports --auto-correct.
Layout/SpaceBeforeComma:
Exclude:
- 'lib/pry/commands/hist.rb'
- 'lib/pry/helpers/text.rb'
- 'spec/sticky_locals_spec.rb'
# Offense count: 5
# Cop supports --auto-correct.
Layout/SpaceBeforeSemicolon:

View file

@ -25,7 +25,7 @@ class Pry
opt.on :T, :tail, "Display the last N items", optional_argument: true, as: Integer
opt.on :s, :show, "Show the given range of lines", optional_argument: true, as: Range
opt.on :G, :grep, "Show lines matching the given pattern", argument: true, as: String
opt.on :c, :clear , "Clear the current session's history"
opt.on :c, :clear, "Clear the current session's history"
opt.on :r, :replay, "Replay a line or range of lines", argument: true, as: Range
opt.on :save, "Save history to a file", argument: true, as: Range
opt.on :e, :'exclude-pry', "Exclude Pry commands from the history"

View file

@ -40,7 +40,7 @@ class Pry
# @param [String, #to_s] text
# @return [String] _text_ stripped of any color codes.
def strip_color(text)
text.to_s.gsub(/(\001)?\e\[.*?(\d)+m(\002)?/ , '')
text.to_s.gsub(/(\001)?\e\[.*?(\d)+m(\002)?/, '')
end
# Returns _text_ as bold text for use on a terminal.

View file

@ -119,7 +119,7 @@ describe "Sticky locals (_file_ and friends)" do
Pry.start(
o,
extra_sticky_locals: {
test_local1: :john ,
test_local1: :john,
test_local2: :carl
}
)