diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42189dc8..db0f280f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,6 @@ jobs: fail-fast: false matrix: ruby: - - '2.7' - - '3.0' - '3.1' - '3.2' name: Run test with Ruby ${{ matrix.ruby }} @@ -49,8 +47,6 @@ jobs: fail-fast: false matrix: ruby: - - '2.7' - - '3.0' - '3.1' - '3.2' name: Run assets:precompile with Ruby ${{ matrix.ruby }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 17c7db7d..1eaea885 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ ## lastest(master branch) +- Dependencies + - Upgrade html-pipeline to v3 + - Drop support for Ruby <= 3.0 + ## v0.8.0 - Upgrade Rails to v7.0 - Support Ruby 3.2 diff --git a/app/helpers/kuroko2/job_definitions_helper.rb b/app/helpers/kuroko2/job_definitions_helper.rb index 4754ab4a..a0bbaf69 100644 --- a/app/helpers/kuroko2/job_definitions_helper.rb +++ b/app/helpers/kuroko2/job_definitions_helper.rb @@ -5,7 +5,7 @@ def first_line(text) end def markdown_format(text) - pipeline = HTML::Pipeline.new([HTML::Pipeline::MarkdownFilter]) + pipeline = HTMLPipeline.new(convert_filter: HTMLPipeline::ConvertFilter::MarkdownFilter.new) raw(pipeline.call(text)[:output].to_s) end diff --git a/kuroko2.gemspec b/kuroko2.gemspec index 4005c569..57aee6e4 100644 --- a/kuroko2.gemspec +++ b/kuroko2.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |s| s.add_dependency 'omniauth-google-oauth2', '>= 1.0.0' s.add_dependency 'omniauth-rails_csrf_protection' - s.add_dependency 'html-pipeline' + s.add_dependency 'html-pipeline', '>= 3' s.add_dependency 'commonmarker', '>= 0.17.8' s.add_dependency 'font-awesome-rails' s.add_dependency 'rinku' diff --git a/lib/kuroko2.rb b/lib/kuroko2.rb index 0a8dc1fd..5724869a 100644 --- a/lib/kuroko2.rb +++ b/lib/kuroko2.rb @@ -3,7 +3,8 @@ require 'aws-sdk-cloudwatchlogs' require 'retryable' require 'faraday' -require 'html/pipeline' +require 'html_pipeline' +require 'html_pipeline/convert_filter/markdown_filter' require 'hipchat' require 'omniauth-google-oauth2' require 'omniauth/rails_csrf_protection' diff --git a/spec/helpers/job_definition_helper_spec.rb b/spec/helpers/job_definition_helper_spec.rb index d3cccb5f..548114f8 100644 --- a/spec/helpers/job_definition_helper_spec.rb +++ b/spec/helpers/job_definition_helper_spec.rb @@ -37,7 +37,8 @@ EOF end - it { is_expected.to match %r(

Title

) } + # commonmarker >= 1 includes an anchor in headings + it { is_expected.to match %r(

()?Title

) } it { is_expected.to match %r(LGTM) } end