From 589c9389b3cdab8038e0a12428dd2b889de80a7a Mon Sep 17 00:00:00 2001 From: John Weir Date: Tue, 30 Jan 2024 14:39:49 -0800 Subject: [PATCH] Remove checks for Ruby versions no longer supported The Gem specifies a version of Ruby greater than or equal to 2.7.0 --- Gemfile | 4 ++-- test/sanitizer_test.rb | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index ab10c23..1b4cfbc 100644 --- a/Gemfile +++ b/Gemfile @@ -16,5 +16,5 @@ group :rubocop do end # specify gem versions for old rubies -gem "nokogiri", RUBY_VERSION < "2.1" ? "~> 1.6.0" : ">= 1.7" -gem "activesupport", RUBY_VERSION < "2.2.2" ? "~> 4.2.0" : ">= 5" +gem "nokogiri", ">= 1.7" +gem "activesupport", ">= 5" diff --git a/test/sanitizer_test.rb b/test/sanitizer_test.rb index 6af882a..8cfb523 100644 --- a/test/sanitizer_test.rb +++ b/test/sanitizer_test.rb @@ -728,8 +728,6 @@ def test_abbr_attribute end def test_uri_escaping_of_href_attr_in_a_tag_in_safe_list_sanitizer - skip if RUBY_VERSION < "2.3" - html = %{test} text = safe_list_sanitize(html) @@ -747,8 +745,6 @@ def test_uri_escaping_of_href_attr_in_a_tag_in_safe_list_sanitizer end def test_uri_escaping_of_src_attr_in_a_tag_in_safe_list_sanitizer - skip if RUBY_VERSION < "2.3" - html = %{test} text = safe_list_sanitize(html) @@ -766,8 +762,6 @@ def test_uri_escaping_of_src_attr_in_a_tag_in_safe_list_sanitizer end def test_uri_escaping_of_name_attr_in_a_tag_in_safe_list_sanitizer - skip if RUBY_VERSION < "2.3" - html = %{test} text = safe_list_sanitize(html) @@ -785,8 +779,6 @@ def test_uri_escaping_of_name_attr_in_a_tag_in_safe_list_sanitizer end def test_uri_escaping_of_name_action_in_a_tag_in_safe_list_sanitizer - skip if RUBY_VERSION < "2.3" - html = %{test} text = safe_list_sanitize(html, attributes: ["action"])