Skip to content

Commit 30e8a92

Browse files
Bump rubocop version and fix offenses (#3198)
I am removing the version from Gemfile since we don't have any reason to pin it to a specific version. We keep the dependency up to date. Offenses fixed: - lib/faker/default/string.rb:27:25: C: [Correctable] Style/ModuleMemberExistenceCheck: Use include?(Enumerable) instead. - lib/helpers/unique_generator.rb:33:5: C: [Correctable] Style/EmptyClassDefinition: Prefer a two-line class definition over Class.new for classes with no body.
1 parent 4c57e48 commit 30e8a92

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem 'minitest', '5.27.0'
1010
gem 'pry', '0.16.0'
1111
gem 'rake', '13.3.1'
1212
gem 'rdoc'
13-
gem 'rubocop', '1.82.1'
13+
gem 'rubocop'
1414
gem 'rubocop-minitest', '0.38.2'
1515
gem 'rubocop-rake', '0.7.1'
1616
gem 'simplecov', '0.22.0'

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ GEM
3030
method_source (1.1.0)
3131
minitest (5.27.0)
3232
parallel (1.27.0)
33-
parser (3.3.10.0)
33+
parser (3.3.10.1)
3434
ast (~> 2.4.1)
3535
racc
3636
power_assert (3.0.1)
3737
pp (0.6.3)
3838
prettyprint
3939
prettyprint (0.2.0)
40-
prism (1.7.0)
40+
prism (1.9.0)
4141
pry (0.16.0)
4242
coderay (~> 1.1)
4343
method_source (~> 1.0)
@@ -55,15 +55,15 @@ GEM
5555
regexp_parser (2.11.3)
5656
reline (0.6.3)
5757
io-console (~> 0.5)
58-
rubocop (1.82.1)
58+
rubocop (1.84.0)
5959
json (~> 2.3)
6060
language_server-protocol (~> 3.17.0.2)
6161
lint_roller (~> 1.1.0)
6262
parallel (~> 1.10)
6363
parser (>= 3.3.0.2)
6464
rainbow (>= 2.2.2, < 4.0)
6565
regexp_parser (>= 2.9.3, < 3.0)
66-
rubocop-ast (>= 1.48.0, < 2.0)
66+
rubocop-ast (>= 1.49.0, < 2.0)
6767
ruby-progressbar (~> 1.7)
6868
unicode-display_width (>= 2.4.0, < 4.0)
6969
rubocop-ast (1.49.0)
@@ -107,7 +107,7 @@ DEPENDENCIES
107107
pry (= 0.16.0)
108108
rake (= 13.3.1)
109109
rdoc
110-
rubocop (= 1.82.1)
110+
rubocop
111111
rubocop-minitest (= 0.38.2)
112112
rubocop-rake (= 0.7.1)
113113
simplecov (= 0.22.0)

lib/faker/default/string.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def random(length: 32)
2424
private
2525

2626
def select_a(length)
27-
if length.class.included_modules.include? Enumerable
27+
if length.class.include?(Enumerable)
2828
select_a sample(length.to_enum.to_a)
2929
else
3030
length # recursive base case

lib/helpers/unique_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def respond_to_missing?(method_name, include_private = false)
3030
method_name.to_s.start_with?('faker_') || super
3131
end
3232

33-
RetryLimitExceeded = Class.new(StandardError)
33+
class RetryLimitExceeded < StandardError; end
3434

3535
def previous_results
3636
Thread.current[:faker_unique_generator_previous_results] ||= {}

0 commit comments

Comments
 (0)