Skip to content

Commit

Permalink
build(deps-dev): update rubocop requirement from 1.52.1 to 1.53.1 (#2912
Browse files Browse the repository at this point in the history
)
  • Loading branch information
flavorjones committed Jun 29, 2023
2 parents 01ab95f + 53bbc78 commit a06ea51
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 50`
# on 2023-03-10 05:47:20 UTC using RuboCop version 1.46.0.
# on 2023-06-26 20:38:41 UTC using RuboCop version 1.53.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/MixedCaseRange:
Exclude:
- 'test/test_compaction.rb'

# Offense count: 22
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
Expand Down Expand Up @@ -35,7 +41,7 @@ Style/MissingRespondToMissing:
Exclude:
- 'lib/nokogiri/xml/builder.rb'

# Offense count: 74
# Offense count: 70
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ group :development do

# rubocop
if Gem::Requirement.new("~> 3.0").satisfied_by?(Gem::Version.new(RUBY_VERSION))
gem "rubocop", "1.52.1"
gem "rubocop", "1.53.1"
gem "rubocop-minitest", "0.31.0"
gem "rubocop-packaging", "0.5.2"
gem "rubocop-performance", "1.18.0"
Expand Down
2 changes: 1 addition & 1 deletion ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def recipe.port_path
# We use 'host' to set compiler prefix for cross-compiling. Prefer host_alias over host. And
# prefer i686 (what external dev tools use) to i386 (what ruby's configure.ac emits).
recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
recipe.host = recipe.host.gsub(/i386/, "i686")
recipe.host = recipe.host.gsub("i386", "i686")

recipe.target = File.join(PACKAGE_ROOT_DIR, "ports") if cacheable_p
recipe.configure_options << "--libdir=#{File.join(recipe.path, "lib")}"
Expand Down
2 changes: 1 addition & 1 deletion lib/nokogiri/xml/searchable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def xpath_internal(node, paths, handler, ns, binds)
def xpath_impl(node, path, handler, ns, binds)
ctx = XPathContext.new(node)
ctx.register_namespaces(ns)
path = path.gsub(/xmlns:/, " :") unless Nokogiri.uses_libxml?
path = path.gsub("xmlns:", " :") unless Nokogiri.uses_libxml?

binds&.each do |key, value|
ctx.register_variable(key.to_s, value)
Expand Down
2 changes: 1 addition & 1 deletion lib/nokogiri/xslt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def quote_params(params)
params.flatten.each_slice(2).with_object([]) do |kv, quoted_params|
key, value = kv.map(&:to_s)
value = if value.include?("'")
"concat('#{value.gsub(/'/, %q{', "'", '})}')"
"concat('#{value.gsub("'", %q{', "'", '})}')"
else
"'#{value}'"
end
Expand Down
2 changes: 1 addition & 1 deletion test/html5/test_serialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def test_initial_linefeed_pre_inner
# https://github.com/web-platform-tests/wpt/blob/master/html/syntax/serializing-html-fragments/serializing.html
def serializing_test_data
@serializing_test_data ||= begin
html = <<~EOF.gsub(/ /, "")
html = <<~EOF.gsub(" ", "")
<!DOCTYPE html>
<div id="test" style="display:none">
<span></span>
Expand Down
2 changes: 1 addition & 1 deletion test/xml/test_relax_ng.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_read_memory_with_parse_options
end

def test_parse_with_errors
xml = File.read(ADDRESS_SCHEMA_FILE).sub(/name="/, "name=")
xml = File.read(ADDRESS_SCHEMA_FILE).sub('name="', "name=")
assert_raises(Nokogiri::XML::SyntaxError) do
Nokogiri::XML::RelaxNG(xml)
end
Expand Down
2 changes: 1 addition & 1 deletion test/xml/test_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_parse_with_io
end

def test_parse_with_errors
xml = File.read(PO_SCHEMA_FILE).sub(/name="/, "name=")
xml = File.read(PO_SCHEMA_FILE).sub('name="', "name=")
assert_raises(Nokogiri::XML::SyntaxError) do
Nokogiri::XML::Schema(xml)
end
Expand Down

0 comments on commit a06ea51

Please sign in to comment.