Skip to content

Commit 391da60

Browse files
Bump rubocop from 1.57.2 to 1.58.0 (#2864)
* Bump rubocop from 1.57.2 to 1.58.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.57.2 to 1.58.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v1.57.2...v1.58.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Rubocop fixes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 3c45ee7 commit 391da60

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
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.20.0'
1010
gem 'pry', '0.14.2'
1111
gem 'rake', '13.1.0'
12-
gem 'rubocop', '1.57.2'
12+
gem 'rubocop', '1.58.0'
1313
gem 'rubocop-minitest', '0.33.0'
1414
gem 'rubocop-rake', '0.6.0'
1515
gem 'simplecov', '0.22.0'

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GEM
1414
docile (1.4.0)
1515
i18n (1.14.1)
1616
concurrent-ruby (~> 1.0)
17-
json (2.6.3)
17+
json (2.7.0)
1818
language_server-protocol (3.17.0.3)
1919
method_source (1.0.0)
2020
minitest (5.20.0)
@@ -26,20 +26,20 @@ GEM
2626
pry (0.14.2)
2727
coderay (~> 1.1)
2828
method_source (~> 1.0)
29-
racc (1.7.1)
29+
racc (1.7.3)
3030
rainbow (3.1.1)
3131
rake (13.1.0)
3232
regexp_parser (2.8.2)
3333
rexml (3.2.6)
34-
rubocop (1.57.2)
34+
rubocop (1.58.0)
3535
json (~> 2.3)
3636
language_server-protocol (>= 3.17.0)
3737
parallel (~> 1.10)
3838
parser (>= 3.2.2.4)
3939
rainbow (>= 2.2.2, < 4.0)
4040
regexp_parser (>= 1.8, < 3.0)
4141
rexml (>= 3.2.5, < 4.0)
42-
rubocop-ast (>= 1.28.1, < 2.0)
42+
rubocop-ast (>= 1.30.0, < 2.0)
4343
ruby-progressbar (~> 1.7)
4444
unicode-display_width (>= 2.4.0, < 3.0)
4545
rubocop-ast (1.30.0)
@@ -70,7 +70,7 @@ DEPENDENCIES
7070
minitest (= 5.20.0)
7171
pry (= 0.14.2)
7272
rake (= 13.1.0)
73-
rubocop (= 1.57.2)
73+
rubocop (= 1.58.0)
7474
rubocop-minitest (= 0.33.0)
7575
rubocop-rake (= 0.6.0)
7676
simplecov (= 0.22.0)

lib/faker/default/json.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def add_depth_to_json(json: shallow_json, width: 3, options: { key: 'Name.first_
7171
options[:value] = "Faker::#{options[:value]}"
7272

7373
hash = JSON.parse(json)
74-
hash.each do |key, _|
74+
hash.each_key do |key|
7575
add_hash_to_bottom(hash, [key], width, options)
7676
end
7777
JSON.generate(hash)
@@ -93,7 +93,7 @@ def build_shallow_hash(width, options)
9393
def add_hash_to_bottom(hash, key_array, width, options)
9494
key_string = build_keys_from_array(key_array)
9595
if eval("hash#{key_string}").is_a?(::Hash)
96-
eval("hash#{key_string}").each do |key, _|
96+
eval("hash#{key_string}").each_key do |key|
9797
key_array << key
9898
add_hash_to_bottom(hash, key_array, width, options)
9999
end

test/faker/creature/test_faker_bird.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def test_common_name_with_bad_parameter
5959

6060
def test_order_with_common_names
6161
entry = @tester.order_with_common_name
62-
assert_includes(@common_order_map.keys, entry[:order].to_sym) && \
62+
63+
assert_includes(@common_order_map.keys, entry[:order].to_sym) &&
6364
assert_includes(@common_order_map[entry[:order]], entry[:common_name])
6465
end
6566

test/faker/default/test_faker_number.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def test_even_distribution
6060
assert stats[num] += 1
6161
end
6262

63-
stats.each do |_k, v|
64-
assert_in_delta 10.0, 100.0 * v / times, 2.0
63+
stats.each_value do |value|
64+
assert_in_delta 10.0, 100.0 * value / times, 2.0
6565
end
6666
end
6767

0 commit comments

Comments
 (0)