Skip to content

Commit

Permalink
add Ruby 3.1 to CI matrix; update error message transformation to acc…
Browse files Browse the repository at this point in the history
…ount for changes
  • Loading branch information
mojavelinux committed Dec 27, 2021
1 parent b2de2a9 commit 0fc983c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/upstream-dispatch.yml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/asciidoctor/pdf/converter.rb
Expand Up @@ -444,7 +444,7 @@ def load_theme doc
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
Expand Down
1 change: 1 addition & 0 deletions spec/image_spec.rb
Expand Up @@ -1426,6 +1426,7 @@
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
Expand Down

0 comments on commit 0fc983c

Please sign in to comment.