From 039cae95d02b96c41570eb00575a61b737f18cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=A4ppler?= <mkaeppler@gitlab.com> Date: Tue, 6 Jul 2021 20:21:23 +0000 Subject: [PATCH] Update asciidoc dependencies for Ruby 3 --- Gemfile | 2 +- Gemfile.lock | 6 +++--- config/initializers/asciidoctor_patch.rb | 20 -------------------- spec/lib/gitlab/kroki_spec.rb | 2 +- 4 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 config/initializers/asciidoctor_patch.rb diff --git a/Gemfile b/Gemfile index 85b4fde8342c..da03752f2871 100644 --- a/Gemfile +++ b/Gemfile @@ -164,7 +164,7 @@ gem 'wikicloth', '0.8.1' gem 'asciidoctor', '~> 2.0.10' gem 'asciidoctor-include-ext', '~> 0.3.1', require: false gem 'asciidoctor-plantuml', '~> 0.0.12' -gem 'asciidoctor-kroki', '~> 0.4.0', require: false +gem 'asciidoctor-kroki', '~> 0.5.0', require: false gem 'rouge', '~> 3.26.0' gem 'truncato', '~> 0.7.11' gem 'bootstrap_form', '~> 4.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index ca4123176412..3972ab5f6bc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,10 +92,10 @@ GEM faraday_middleware (~> 1.0) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.4) - asciidoctor (2.0.12) + asciidoctor (2.0.15) asciidoctor-include-ext (0.3.1) asciidoctor (>= 1.5.6, < 3.0.0) - asciidoctor-kroki (0.4.0) + asciidoctor-kroki (0.5.0) asciidoctor (~> 2.0) asciidoctor-plantuml (0.0.12) asciidoctor (>= 1.5.6, < 3.0.0) @@ -1409,7 +1409,7 @@ DEPENDENCIES asana (~> 0.10.3) asciidoctor (~> 2.0.10) asciidoctor-include-ext (~> 0.3.1) - asciidoctor-kroki (~> 0.4.0) + asciidoctor-kroki (~> 0.5.0) asciidoctor-plantuml (~> 0.0.12) atlassian-jwt (~> 0.2.0) attr_encrypted (~> 3.1.0) diff --git a/config/initializers/asciidoctor_patch.rb b/config/initializers/asciidoctor_patch.rb deleted file mode 100644 index b7da50db77c8..000000000000 --- a/config/initializers/asciidoctor_patch.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# Ensure that locked attributes can not be changed using a counter. -# TODO: this can be removed once `asciidoctor` gem is > 2.0.12 -# and https://github.com/asciidoctor/asciidoctor/issues/3939 is merged -module Asciidoctor - module DocumentPatch - def counter(name, seed = nil) - return @parent_document.counter(name, seed) if @parent_document # rubocop: disable Gitlab/ModuleWithInstanceVariables - - unless attribute_locked? name - super - end - end - end -end - -class Asciidoctor::Document - prepend Asciidoctor::DocumentPatch -end diff --git a/spec/lib/gitlab/kroki_spec.rb b/spec/lib/gitlab/kroki_spec.rb index 31d3edd158bd..7d29d018ff1b 100644 --- a/spec/lib/gitlab/kroki_spec.rb +++ b/spec/lib/gitlab/kroki_spec.rb @@ -6,7 +6,7 @@ describe '.formats' do def default_formats - %w[bytefield c4plantuml ditaa erd graphviz nomnoml plantuml svgbob umlet vega vegalite wavedrom].freeze + %w[bytefield c4plantuml ditaa erd graphviz nomnoml pikchr plantuml svgbob umlet vega vegalite wavedrom].freeze end subject { described_class.formats(Gitlab::CurrentSettings) } -- GitLab