Skip to content

Commit e00903e

Browse files
committed
rubocop offenses be gone
1 parent 5b62fc0 commit e00903e

29 files changed

+128
-144
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
/sample
99
/spec/tmp
1010
/tmp
11-
/toc.txt

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ AllCops:
1111
TargetRubyVersion: 2.7
1212
Exclude:
1313
- dev/**/*
14+
- sample/**/*

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source "https://rubygems.org"
1+
source 'https://rubygems.org'
22

33
gem 'byebug'
44
gem 'lp'

Runfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ summary "Runfile tasks for building the Recode gem"
66
version Recode::VERSION
77

88
import_gem 'runfile-tasks/gem', gemname: 'recode'
9+
import 'dev/debug'
910

bin/console

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env ruby
22

3-
require "irb"
4-
require "irb/completion"
5-
require "recode"
3+
require 'irb'
4+
require 'irb/completion'
5+
require 'recode'
66

77
include Recode
88

9-
IRB.start
9+
IRB.start

bin/recode

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ rescue => e
1313
puts e.backtrace.reverse if ENV['DEBUG']
1414
say! "r`#{e.class}: #{e.message}`"
1515
exit 1
16-
end
16+
end

debug.rb

Lines changed: 0 additions & 13 deletions
This file was deleted.

demo/sample/people_controller.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
class PeopleController
22
def people
3-
"we are the people to rule the world"
3+
'we are the people to rule the world'
44
end
55

6-
def person
7-
end
8-
end
6+
def person; end
7+
end

lib/recode/change_variations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def change_variations(old_string, new_string)
1212
result.uniq
1313
end
1414
end
15-
end
15+
end

lib/recode/command.rb

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
module Recode
22
class Command < MisterBin::Command
3-
help "Code Refactoring Utility"
3+
help 'Code Refactoring Utility'
44

5-
usage "recode OLD [to] NEW [in] EXTENSIONS... [options]"
6-
usage "recode (-h|--help)"
5+
usage 'recode OLD [to] NEW [in] EXTENSIONS... [options]'
6+
usage 'recode (-h|--help)'
77

8-
option "-a --apply", "Apply changes"
9-
option "-p --prompt", "Apply changes interactively "
8+
option '-a --apply', 'Apply changes'
9+
option '-p --prompt', 'Apply changes interactively '
1010

11-
param "OLD", "Old string, singular and capitalized"
12-
param "NEW", "New string, singular and capitalized"
13-
param "EXTENSIONS", "Space delimited file extensions"
11+
param 'OLD', 'Old string, singular and capitalized'
12+
param 'NEW', 'New string, singular and capitalized'
13+
param 'EXTENSIONS', 'Space delimited file extensions'
1414

15-
example "recode Member User rb"
16-
example "recode Member to User in rb js"
17-
example "recode Member to User in rb js --apply"
18-
example "recode Member to User in rb js -p"
15+
example 'recode Member User rb'
16+
example 'recode Member to User in rb js'
17+
example 'recode Member to User in rb js --apply'
18+
example 'recode Member to User in rb js -p'
1919

2020
def run
21-
runner = Runner.new path: path,
22-
extensions: extensions,
23-
old_string: old_string,
21+
runner = Runner.new path: path,
22+
extensions: extensions,
23+
old_string: old_string,
2424
new_string: new_string
2525

2626
runner.execute handler
@@ -39,9 +39,9 @@ def handler
3939
end
4040

4141
def path
42-
"."
42+
'.'
4343
end
44-
44+
4545
def extensions
4646
args['EXTENSIONS']
4747
end
@@ -53,7 +53,5 @@ def old_string
5353
def new_string
5454
args['NEW']
5555
end
56-
57-
5856
end
5957
end

0 commit comments

Comments
 (0)