diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd2aa28..de1975b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', 'jruby-head'] + ruby-version: ['3.0', '3.1', '3.2', '3.3', 'jruby-head'] steps: - uses: actions/checkout@v4 diff --git a/.rubocop.yml b/.rubocop.yml index a30ab8e..03af185 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ require: - rubocop-rake AllCops: - TargetRubyVersion: 2.7 # lowest supported version + TargetRubyVersion: 3.0 # lowest supported version NewCops: enable Layout/ArgumentAlignment: diff --git a/CHANGELOG.md b/CHANGELOG.md index eff5e3a..1448ae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Unreleased +### Version v1.18.0 + + * Drop Ruby 2.7 compatibility for parity with Premailer [#149](https://github.com/premailer/css_parser/pull/149) + ### Version v1.17.1 * Improve security by using `File.read` instead of `IO.read` [#149](https://github.com/premailer/css_parser/pull/149) diff --git a/Gemfile.lock b/Gemfile.lock index b6f2222..141e00e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - css_parser (1.17.1) + css_parser (1.18.0) addressable GEM diff --git a/css_parser.gemspec b/css_parser.gemspec index 242c11c..d8cf155 100644 --- a/css_parser.gemspec +++ b/css_parser.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new name, CssParser::VERSION do |s| s.author = 'Alex Dunae' s.files = Dir.glob('lib/**/*') + ['MIT-LICENSE'] s.license = 'MIT' - s.required_ruby_version = '>= 2.7' + s.required_ruby_version = '>= 3.0' s.metadata['changelog_uri'] = 'https://github.com/premailer/css_parser/blob/master/CHANGELOG.md' s.metadata['source_code_uri'] = 'https://github.com/premailer/css_parser' diff --git a/lib/css_parser/parser.rb b/lib/css_parser/parser.rb index 357b79e..609b0ac 100644 --- a/lib/css_parser/parser.rb +++ b/lib/css_parser/parser.rb @@ -16,7 +16,7 @@ class CircularReferenceError < StandardError; end # [import] Follow @import rules. Boolean, default is true. # [io_exceptions] Throw an exception if a link can not be found. Boolean, default is true. class Parser - USER_AGENT = "Ruby CSS Parser/#{CssParser::VERSION} (https://github.com/premailer/css_parser)" + USER_AGENT = "Ruby CSS Parser/#{CssParser::VERSION} (https://github.com/premailer/css_parser)".freeze STRIP_CSS_COMMENTS_RX = %r{/\*.*?\*/}m.freeze STRIP_HTML_COMMENTS_RX = //m.freeze diff --git a/lib/css_parser/version.rb b/lib/css_parser/version.rb index 8fb735d..c838ded 100644 --- a/lib/css_parser/version.rb +++ b/lib/css_parser/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module CssParser - VERSION = '1.17.1'.freeze + VERSION = '1.18.0'.freeze end