Skip to content

Commit 3d94071

Browse files
authored
deps: bump rubocop version to v1.81.7 (#3143)
* deps: bump Rubocop version from `v1.75.4` to `v1.81.7` * fix: Rubocop format
1 parent 887b5f4 commit 3d94071

18 files changed

+42
-40
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ gem 'benchmark'
99
gem 'minitest', '5.25.5'
1010
gem 'pry', '0.15.2'
1111
gem 'rake', '13.3.1'
12-
gem 'rubocop', '1.75.4'
12+
gem 'rubocop', '1.81.7'
1313
gem 'rubocop-minitest', '0.38.2'
1414
gem 'rubocop-rake', '0.7.1'
1515
gem 'simplecov', '0.22.0'

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ GEM
3232
rainbow (3.1.1)
3333
rake (13.3.1)
3434
regexp_parser (2.11.3)
35-
rubocop (1.75.4)
35+
rubocop (1.81.7)
3636
json (~> 2.3)
3737
language_server-protocol (~> 3.17.0.2)
3838
lint_roller (~> 1.1.0)
3939
parallel (~> 1.10)
4040
parser (>= 3.3.0.2)
4141
rainbow (>= 2.2.2, < 4.0)
4242
regexp_parser (>= 2.9.3, < 3.0)
43-
rubocop-ast (>= 1.44.0, < 2.0)
43+
rubocop-ast (>= 1.47.1, < 2.0)
4444
ruby-progressbar (~> 1.7)
4545
unicode-display_width (>= 2.4.0, < 4.0)
4646
rubocop-ast (1.48.0)
@@ -78,7 +78,7 @@ DEPENDENCIES
7878
minitest (= 5.25.5)
7979
pry (= 0.15.2)
8080
rake (= 13.3.1)
81-
rubocop (= 1.75.4)
81+
rubocop (= 1.81.7)
8282
rubocop-minitest (= 0.38.2)
8383
rubocop-rake (= 0.7.1)
8484
simplecov (= 0.22.0)

lib/faker/books/lovecraft.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def paragraph_by_chars(characters: 256)
240240

241241
paragraph += " #{paragraph(sentence_count: 3)}" while paragraph.length < characters
242242

243-
"#{paragraph[0...characters - 1]}."
243+
"#{paragraph[0...(characters - 1)]}."
244244
end
245245
end
246246
end

lib/faker/default/boolean.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class << self
1515
# Faker::Boolean.boolean(true_ratio: 0.2) #=> false
1616
#
1717
# @faker.version 1.6.2
18-
def boolean(true_ratio: 0.5)
18+
#
19+
def boolean(true_ratio: 0.5) # rubocop:disable Naming/PredicateMethod
1920
(rand < true_ratio)
2021
end
2122
end

lib/faker/default/company.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def collect_regon_sum(array)
591591

592592
def weight_sum(array, weights)
593593
sum = 0
594-
(0..weights.size - 1).each do |index|
594+
(0..(weights.size - 1)).each do |index|
595595
sum += (array[index] * weights[index])
596596
end
597597
sum

lib/faker/default/hipster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def paragraph_by_chars(characters: 256, supplemental: false)
147147

148148
paragraph += " #{paragraph(sentence_count: 3, supplemental: supplemental)}" while paragraph.length < characters
149149

150-
"#{paragraph[0...characters - 1]}."
150+
"#{paragraph[0...(characters - 1)]}."
151151
end
152152
end
153153
end

lib/faker/default/html.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def element(tag: 'div', content: Lorem.sentence(word_count: 3), attributes: { cl
187187
def random(exclude: [])
188188
method_list = available_methods
189189
exclude.each { |ex| method_list.delete_if { |meth| meth == ex.to_sym } }
190-
send(method_list[Faker::Config.random.rand(0..method_list.length - 1)])
190+
send(method_list[Faker::Config.random.rand(0..(method_list.length - 1))])
191191
end
192192

193193
##

lib/faker/default/lorem.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def paragraph_by_chars(number: 256, supplemental: false)
194194

195195
paragraph += " #{paragraph(sentence_count: 3, supplemental: supplemental)}" while paragraph.length < number
196196

197-
"#{paragraph[0...number - 1]}."
197+
"#{paragraph[0...(number - 1)]}."
198198
end
199199

200200
##

lib/faker/default/markdown.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def headers
2828
def emphasis
2929
paragraph = Faker::Lorem.paragraph(sentence_count: 3)
3030
words = paragraph.split
31-
position = rand(0..words.length - 1)
31+
position = rand(0..(words.length - 1))
3232
formatting = fetch('markdown.emphasis')
3333
words[position] = "#{formatting}#{words[position]}#{formatting}"
3434
words.join(' ')
@@ -133,7 +133,7 @@ def table
133133
def random(*args)
134134
method_list = available_methods
135135
args&.each { |ex| method_list.delete_if { |meth| meth == ex.to_sym } }
136-
send(method_list[Faker::Config.random.rand(0..method_list.length - 1)])
136+
send(method_list[Faker::Config.random.rand(0..(method_list.length - 1))])
137137
end
138138

139139
##

lib/faker/default/types.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def rb_array(len: 1, type: -> { random_type })
116116
#
117117
# @faker.version 1.8.6
118118
def random_type
119-
type_to_use = SIMPLE_TYPES[rand(0..SIMPLE_TYPES.length - 1)]
119+
type_to_use = SIMPLE_TYPES[rand(0..(SIMPLE_TYPES.length - 1))]
120120
case type_to_use
121121
when :string
122122
rb_string
@@ -136,7 +136,7 @@ def random_type
136136
# @faker.version 1.8.6
137137
def random_complex_type
138138
types = SIMPLE_TYPES + COMPLEX_TYPES
139-
type_to_use = types[rand(0..types.length - 1)]
139+
type_to_use = types[rand(0..(types.length - 1))]
140140
case type_to_use
141141
when :string
142142
rb_string

0 commit comments

Comments
 (0)