diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-12-26 23:59:03 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2021-12-27 04:28:18 -0700 |
| commit | 0fc983c86cdf49f0ce46618aab67e765e32ee0db (patch) | |
| tree | 14b5ffa9d1be729c3eeb06ae1b6dd4c6ebce04ca | |
| parent | b2de2a94996bea2662700852396d723383e772aa (diff) | |
add Ruby 3.1 to CI matrix; update error message transformation to account for changes
| -rw-r--r-- | .github/workflows/ci.yml | 14 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 3 | ||||
| -rw-r--r-- | .github/workflows/upstream-dispatch.yml | 3 | ||||
| -rw-r--r-- | CHANGELOG.adoc | 1 | ||||
| -rw-r--r-- | Gemfile | 3 | ||||
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 2 | ||||
| -rw-r--r-- | spec/image_spec.rb | 1 |
7 files changed, 16 insertions, 11 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f3e0bee..25566335 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' + ruby-version: '3.1' - name: Configure Bundler run: | bundle config --local path .bundle/gems @@ -41,15 +41,19 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - ruby: [jruby-9.2, '2.5', '2.6', '2.7', '3.0'] + ruby: [jruby-9.2, '2.5', '2.7', '3.0', '3.1'] rouge-version: [~] upstream: [~] exclude: + # remove 3.1 on ubuntu-latest to mark as primary - os: ubuntu-latest - ruby: '3.0' + ruby: '3.1' + # remove 3.1 on windows as it's not yet available + - os: windows-latest + ruby: '3.1' include: - os: macos-latest - ruby: '3.0' + ruby: '3.1' # NOTE: enable once Asciidoctor 2.1.0 is released #- os: ubuntu-latest # ruby: '2.5' @@ -61,7 +65,7 @@ jobs: ruby: '3.0' upstream: upstream - os: ubuntu-latest - ruby: '3.0' + ruby: '3.1' primary: primary runs-on: ${{ matrix.os }} env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fdfa5a7f..0d9080f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,8 +18,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' - bundler: '2.2' + ruby-version: '3.1' - name: Configure Bundler run: | bundle config --local path .bundle/gems diff --git a/.github/workflows/upstream-dispatch.yml b/.github/workflows/upstream-dispatch.yml index 1eae1eae..e7d6e7e1 100644 --- a/.github/workflows/upstream-dispatch.yml +++ b/.github/workflows/upstream-dispatch.yml @@ -14,8 +14,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' - bundler: '2.2' + ruby-version: '3.1' - name: Configure Bundler run: | bundle config --local clean true diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 93124389..5c95ce44 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -191,6 +191,7 @@ Build / Infrastructure:: * migrate Linux CI jobs to GitHub Actions (#1814) * enable CI job on macOS (#1817) +* add Ruby 3.1 to CI matrix; use as primary Ruby * test against Asciidoctor upstream (#1821) * skip tests for unreadable files when euid is 0 * test against pygments.rb 2.0.0 @@ -8,7 +8,8 @@ gemspec gem 'asciidoctor', ENV['ASCIIDOCTOR_VERSION'], require: false if ENV.key? 'ASCIIDOCTOR_VERSION' gem 'asciidoctor-diagram', ENV['ASCIIDOCTOR_DIAGRAM_VERSION'], require: false if ENV.key? 'ASCIIDOCTOR_DIAGRAM_VERSION' gem 'coderay', '~> 1.1.0', require: false -gem 'open-uri-cached', require: false +gem 'matrix' if (Gem::Version.new RUBY_VERSION) >= (Gem::Version.new '3.1.0') +gem 'open-uri-cached', require: false if (Gem::Version.new RUBY_VERSION) < (Gem::Version.new '3.1.0') gem 'prawn-gmagick', ENV['PRAWN_GMAGICK_VERSION'], require: false if ENV.key? 'PRAWN_GMAGICK_VERSION' # NOTE: use prawn-table from upstream (pre-0.2.3) to verify fix for #599 gem 'prawn-table', git: 'https://github.com/prawnpdf/prawn-table', ref: '515f2db294866a343b05d15f94e5fb417a32f6ff', require: false diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index bf10dcc7..b5720978 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -444,7 +444,7 @@ module Asciidoctor message = %(could not locate or load the built-in pdf theme `#{theme_name}') end message += %( because of #{$!.class} #{$!.message}) - log :error, %(#{message}; reverting to default theme) + log :error, (message.sub %r/$/, '; reverting to default theme') @themesdir = (theme = ThemeLoader.load_theme).__dir__ prepare_theme theme end diff --git a/spec/image_spec.rb b/spec/image_spec.rb index a1ad8350..69b567a8 100644 --- a/spec/image_spec.rb +++ b/spec/image_spec.rb @@ -1426,6 +1426,7 @@ describe 'Asciidoctor::PDF::Converter - Image' do end).to log_message severity: :WARN, message: %(~image file is an unrecognised format) end + # TODO reenable once Asciidoctor 2.0.17 is available context 'Cache', if: (gem_available? 'open-uri-cached'), &(proc do before :context do # rubocop:disable RSpec/BeforeAfterAll (expect defined? OpenURI::Cache).to be_falsy # rubocop:disable RSpec/ExpectInHook |
