diff --git a/Gemfile b/Gemfile index 85b4fde8342c1d791920922935507a810f021d75..da03752f287190e6d7116adfdd31a4cbfa730b8f 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 ca41231764121008d0f8c3c0ad2a5b698c8751f6..3972ab5f6bc91090c708181c22e2809d30f94e0f 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 b7da50db77c866e6f9ebac396b28ec1a7b9f66d1..0000000000000000000000000000000000000000 --- 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 31d3edd158bdb74aab5932ed697530dc9a47a749..7d29d018ff1b73cd119a8b10cc43990ccf37c12a 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) }