Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
838fb1a9ee | ||
|
|
3d7bae2b69 | ||
|
|
75de982163 |
7 changed files with 20 additions and 270 deletions
|
|
@ -1,25 +0,0 @@
|
|||
From cc9a8d3cd12f2c15e43bd263b8b8a9b32d097831 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Allen <dan.j.allen@gmail.com>
|
||||
Date: Thu, 25 May 2023 18:39:56 -0600
|
||||
Subject: [PATCH] use single-line block in manify method in manpage converter
|
||||
to make it easier to patch
|
||||
|
||||
---
|
||||
lib/asciidoctor/converter/manpage.rb | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb
|
||||
index bcf2b784..a7aba996 100644
|
||||
--- a/lib/asciidoctor/converter/manpage.rb
|
||||
+++ b/lib/asciidoctor/converter/manpage.rb
|
||||
@@ -716,9 +716,7 @@ def manify str, opts = {}
|
||||
.gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence)
|
||||
.gsub(EllipsisCharRefRx, '...') # horizontal ellipsis
|
||||
.gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&.
|
||||
- .gsub(EscapedMacroRx) do # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line
|
||||
- (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest})
|
||||
- end
|
||||
+ .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line
|
||||
.gsub('-', '\-')
|
||||
.gsub('<', '<')
|
||||
.gsub('>', '>')
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
From b7c03964cfc96af9ced5db3c1a6c7a7663de5cb2 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Allen <dan.j.allen@gmail.com>
|
||||
Date: Fri, 26 May 2023 01:44:09 -0600
|
||||
Subject: [PATCH] change dot layout in chained method call to be compatible
|
||||
with rdoc generator from Ruby 2.5
|
||||
|
||||
---
|
||||
lib/asciidoctor/converter/manpage.rb | 64 ++++++++++++++--------------
|
||||
1 file changed, 32 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb
|
||||
index a7aba996..be52e9be 100644
|
||||
--- a/lib/asciidoctor/converter/manpage.rb
|
||||
+++ b/lib/asciidoctor/converter/manpage.rb
|
||||
@@ -712,38 +712,38 @@ def manify str, opts = {}
|
||||
else
|
||||
str = str.tr_s WHITESPACE, ' '
|
||||
end
|
||||
- str = str
|
||||
- .gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence)
|
||||
- .gsub(EllipsisCharRefRx, '...') # horizontal ellipsis
|
||||
- .gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&.
|
||||
- .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line
|
||||
- .gsub('-', '\-')
|
||||
- .gsub('<', '<')
|
||||
- .gsub('>', '>')
|
||||
- .gsub('+', '+') # plus sign; alternately could use \c(pl
|
||||
- .gsub(' ', '\~') # non-breaking space
|
||||
- .gsub('©', '\(co') # copyright sign
|
||||
- .gsub('®', '\(rg') # registered sign
|
||||
- .gsub('™', '\(tm') # trademark sign
|
||||
- .gsub('°', '\(de') # degree sign
|
||||
- .gsub(' ', ' ') # thin space
|
||||
- .gsub('–', '\(en') # en dash
|
||||
- .gsub(EmDashCharRefRx, '\(em') # em dash
|
||||
- .gsub('‘', '\(oq') # left single quotation mark
|
||||
- .gsub('’', '\(cq') # right single quotation mark
|
||||
- .gsub('“', '\(lq') # left double quotation mark
|
||||
- .gsub('”', '\(rq') # right double quotation mark
|
||||
- .gsub('←', '\(<-') # leftwards arrow
|
||||
- .gsub('→', '\(->') # rightwards arrow
|
||||
- .gsub('⇐', '\(lA') # leftwards double arrow
|
||||
- .gsub('⇒', '\(rA') # rightwards double arrow
|
||||
- .gsub('​', '\:') # zero width space
|
||||
- .gsub('&', '&') # literal ampersand (NOTE must take place after any other replacement that includes &)
|
||||
- .gsub('\'', '\*(Aq') # apostrophe / neutral single quote
|
||||
- .gsub(MockMacroRx, '\1') # mock boundary
|
||||
- .gsub(ESC_BS, '\\') # unescape troff backslash (NOTE update if more escapes are added)
|
||||
- .gsub(ESC_FS, '.') # unescape full stop in troff commands (NOTE must take place after gsub(LeadingPeriodRx))
|
||||
- .rstrip # strip trailing space
|
||||
+ str = str.
|
||||
+ gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' }. # literal backslash (not a troff escape sequence)
|
||||
+ gsub(EllipsisCharRefRx, '...'). # horizontal ellipsis
|
||||
+ gsub(LeadingPeriodRx, '\\\&.'). # leading . is used in troff for macro call or other formatting; replace with \&.
|
||||
+ gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) }. # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line
|
||||
+ gsub('-', '\-').
|
||||
+ gsub('<', '<').
|
||||
+ gsub('>', '>').
|
||||
+ gsub('+', '+'). # plus sign; alternately could use \c(pl
|
||||
+ gsub(' ', '\~'). # non-breaking space
|
||||
+ gsub('©', '\(co'). # copyright sign
|
||||
+ gsub('®', '\(rg'). # registered sign
|
||||
+ gsub('™', '\(tm'). # trademark sign
|
||||
+ gsub('°', '\(de'). # degree sign
|
||||
+ gsub(' ', ' '). # thin space
|
||||
+ gsub('–', '\(en'). # en dash
|
||||
+ gsub(EmDashCharRefRx, '\(em'). # em dash
|
||||
+ gsub('‘', '\(oq'). # left single quotation mark
|
||||
+ gsub('’', '\(cq'). # right single quotation mark
|
||||
+ gsub('“', '\(lq'). # left double quotation mark
|
||||
+ gsub('”', '\(rq'). # right double quotation mark
|
||||
+ gsub('←', '\(<-'). # leftwards arrow
|
||||
+ gsub('→', '\(->'). # rightwards arrow
|
||||
+ gsub('⇐', '\(lA'). # leftwards double arrow
|
||||
+ gsub('⇒', '\(rA'). # rightwards double arrow
|
||||
+ gsub('​', '\:'). # zero width space
|
||||
+ gsub('&', '&'). # literal ampersand (NOTE must take place after any other replacement that includes &)
|
||||
+ gsub('\'', '\*(Aq'). # apostrophe / neutral single quote
|
||||
+ gsub(MockMacroRx, '\1'). # mock boundary
|
||||
+ gsub(ESC_BS, '\\'). # unescape troff backslash (NOTE update if more escapes are added)
|
||||
+ gsub(ESC_FS, '.'). # unescape full stop in troff commands (NOTE must take place after gsub(LeadingPeriodRx))
|
||||
+ rstrip # strip trailing space
|
||||
opts[:append_newline] ? %(#{str}#{LF}) : str
|
||||
end
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From 4c93df1eeff84463c6fc299b62b78c20c3163a09 Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Fri, 29 Sep 2023 15:00:12 +0900
|
||||
Subject: [PATCH] Support ruby3.3 Logger by properly initialize super class
|
||||
|
||||
Upcoming ruby3.3 will have enhanced Logger class:
|
||||
https://github.com/ruby/ruby/commit/194520f80e1cdb71faa055d731450855a1ddb8d1
|
||||
which initializes newly added instance variables.
|
||||
Without initializing such variables (in super class), now using
|
||||
subclass of Logger will cause exception.
|
||||
|
||||
To avoid this, first call super, then execute additional subclass
|
||||
initialization.
|
||||
|
||||
Closes #4493 .
|
||||
---
|
||||
lib/asciidoctor/logging.rb | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/lib/asciidoctor/logging.rb b/lib/asciidoctor/logging.rb
|
||||
index 7664c7e75d..1f846c4fba 100644
|
||||
--- a/lib/asciidoctor/logging.rb
|
||||
+++ b/lib/asciidoctor/logging.rb
|
||||
@@ -42,6 +42,7 @@ class MemoryLogger < ::Logger
|
||||
attr_reader :messages
|
||||
|
||||
def initialize
|
||||
+ super nil
|
||||
self.level = WARN
|
||||
@messages = []
|
||||
end
|
||||
@@ -69,6 +70,7 @@ class NullLogger < ::Logger
|
||||
attr_reader :max_severity
|
||||
|
||||
def initialize
|
||||
+ super nil
|
||||
self.level = WARN
|
||||
end
|
||||
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
From fb4d1d6295153f1722711ee0b232f980b0793b1c Mon Sep 17 00:00:00 2001
|
||||
From: Dan Allen <dan.j.allen@gmail.com>
|
||||
Date: Thu, 7 Mar 2024 16:35:09 -0700
|
||||
Subject: [PATCH] resolves #4561 remove use of base64 library to prevent
|
||||
warning in Ruby >= 3.3
|
||||
|
||||
---
|
||||
CHANGELOG.adoc | 1 +
|
||||
Gemfile | 1 +
|
||||
asciidoctor.gemspec | 2 +-
|
||||
lib/asciidoctor.rb | 1 -
|
||||
lib/asciidoctor/abstract_node.rb | 12 ++++++------
|
||||
5 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/lib/asciidoctor.rb b/lib/asciidoctor.rb
|
||||
index 18b6743bfc..08a5db02c0 100644
|
||||
--- a/lib/asciidoctor.rb
|
||||
+++ b/lib/asciidoctor.rb
|
||||
@@ -7,7 +7,6 @@
|
||||
# this require is satisfied by the Asciidoctor.js build; it augments the Ruby environment for Asciidoctor.js
|
||||
require 'asciidoctor/js'
|
||||
else
|
||||
- autoload :Base64, 'base64'
|
||||
require 'cgi/util'
|
||||
autoload :OpenURI, 'open-uri'
|
||||
autoload :Pathname, 'pathname'
|
||||
diff --git a/lib/asciidoctor/abstract_node.rb b/lib/asciidoctor/abstract_node.rb
|
||||
index a60ab7956c..07ad0291d1 100644
|
||||
--- a/lib/asciidoctor/abstract_node.rb
|
||||
+++ b/lib/asciidoctor/abstract_node.rb
|
||||
@@ -355,8 +355,8 @@ def media_uri target, asset_dir_key = 'imagesdir'
|
||||
#
|
||||
# First, and foremost, the target image path is cleaned if the document safe mode level
|
||||
# is set to at least SafeMode::SAFE (a condition which is true by default) to prevent access
|
||||
- # to ancestor paths in the filesystem. The image data is then read and converted to
|
||||
- # Base64. Finally, a data URI is built which can be used in an image tag.
|
||||
+ # to ancestor paths in the filesystem. The image data is then read and converted to base64.
|
||||
+ # Finally, a data URI is built which can be used in an image tag.
|
||||
#
|
||||
# target_image - A String path to the target image
|
||||
# asset_dir_key - The String attribute key used to lookup the directory where
|
||||
@@ -377,8 +377,8 @@ def generate_data_uri target_image, asset_dir_key = nil
|
||||
end
|
||||
|
||||
if ::File.readable? image_path
|
||||
- # NOTE base64 is autoloaded by reference to ::Base64
|
||||
- %(data:#{mimetype};base64,#{::Base64.strict_encode64 ::File.binread image_path})
|
||||
+ # NOTE pack 'm0' is equivalent to Base64.strict_encode64
|
||||
+ %(data:#{mimetype};base64,#{[(::File.binread image_path)].pack 'm0'})
|
||||
else
|
||||
logger.warn %(image to embed not found or not readable: #{image_path})
|
||||
%(data:#{mimetype};base64,)
|
||||
@@ -411,8 +411,8 @@ def generate_data_uri_from_uri image_uri, cache_uri = false
|
||||
|
||||
begin
|
||||
mimetype, bindata = ::OpenURI.open_uri(image_uri, URI_READ_MODE) {|f| [f.content_type, f.read] }
|
||||
- # NOTE base64 is autoloaded by reference to ::Base64
|
||||
- %(data:#{mimetype};base64,#{::Base64.strict_encode64 bindata})
|
||||
+ # NOTE pack 'm0' is equivalent to Base64.strict_encode64
|
||||
+ %(data:#{mimetype};base64,#{[bindata].pack 'm0'})
|
||||
rescue
|
||||
logger.warn %(could not retrieve image data from URI: #{image_uri})
|
||||
image_uri
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From e5442fc2848680eada862841b0e92dc9265e1a29 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Allen <dan.j.allen@gmail.com>
|
||||
Date: Thu, 31 Oct 2024 04:20:33 -0600
|
||||
Subject: [PATCH] resolves #4634 normalize output from inspect when comparing
|
||||
to fixture
|
||||
|
||||
---
|
||||
test/extensions_test.rb | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/test/extensions_test.rb b/test/extensions_test.rb
|
||||
index 93c475a070..20df46cb34 100644
|
||||
--- a/test/extensions_test.rb
|
||||
+++ b/test/extensions_test.rb
|
||||
@@ -1468,17 +1468,17 @@ def process parent, reader, attributes
|
||||
++++
|
||||
EOS
|
||||
expected = <<~'EOS'.chop
|
||||
- target="", attributes={}
|
||||
- target="value,key=val", attributes={1=>"value", "key"=>"val", "name"=>"value"}
|
||||
- target="", attributes={"text"=>""}
|
||||
- target="[text]", attributes={"text"=>"[text]"}
|
||||
- target="target", attributes={}
|
||||
- target="target", attributes={1=>"value", "key"=>"val", "name"=>"value"}
|
||||
- target="target", attributes={"text"=>""}
|
||||
- target="target", attributes={"text"=>"[text]"}
|
||||
- target="target", attributes={}
|
||||
+ target="",attributes={}
|
||||
+ target="value,key=val",attributes={1=>"value","key"=>"val","name"=>"value"}
|
||||
+ target="",attributes={"text"=>""}
|
||||
+ target="[text]",attributes={"text"=>"[text]"}
|
||||
+ target="target",attributes={}
|
||||
+ target="target",attributes={1=>"value","key"=>"val","name"=>"value"}
|
||||
+ target="target",attributes={"text"=>""}
|
||||
+ target="target",attributes={"text"=>"[text]"}
|
||||
+ target="target",attributes={}
|
||||
EOS
|
||||
- output = convert_string_to_embedded input
|
||||
+ output = ((convert_string_to_embedded input).gsub ' => ', '=>').gsub ', ', ','
|
||||
assert_equal expected, output
|
||||
ensure
|
||||
Asciidoctor::Extensions.unregister_all
|
||||
|
|
@ -6,23 +6,11 @@
|
|||
|
||||
Summary: A fast, open source AsciiDoc implementation in Ruby
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 2.0.20
|
||||
Release: 9%{?dist}
|
||||
Version: 2.0.26
|
||||
Release: 1%{?dist}
|
||||
License: MIT
|
||||
URL: https://asciidoctor.org
|
||||
Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz
|
||||
# improve ruby-2.5 compatibility
|
||||
# https://github.com/asciidoctor/asciidoctor/issues/4462
|
||||
# https://github.com/asciidoctor/asciidoctor/commit/cc9a8d3c
|
||||
Patch0: 0001-use-single-line-block-in-manify-method-in-manpage-co.patch
|
||||
# https://github.com/asciidoctor/asciidoctor/commit/b7c03964
|
||||
Patch1: 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch
|
||||
# https://github.com/asciidoctor/asciidoctor/pull/4494
|
||||
Patch2: 0003-support-ruby33-Logger.patch
|
||||
# https://github.com/asciidoctor/asciidoctor/pull/4562/
|
||||
Patch3: 0004-remove-base64-dependency.patch
|
||||
# https://github.com/asciidoctor/asciidoctor/commit/e5442fc2
|
||||
Patch4: 0005-normalize-inspect-output.patch
|
||||
%if 0%{?el7}
|
||||
Requires: ruby(release)
|
||||
BuildRequires: ruby(release)
|
||||
|
|
@ -35,6 +23,7 @@ BuildRequires: rubygem(coderay)
|
|||
BuildRequires: rubygem(concurrent-ruby)
|
||||
BuildRequires: rubygem(erubi)
|
||||
BuildRequires: rubygem(haml)
|
||||
BuildRequires: rubygem(logger)
|
||||
BuildRequires: rubygem(minitest)
|
||||
BuildRequires: rubygem(nokogiri)
|
||||
BuildRequires: rubygem(rouge)
|
||||
|
|
@ -48,7 +37,7 @@ Provides: rubygem(%{gem_name}) = %{version}
|
|||
%endif
|
||||
|
||||
%if %{?pre:1}
|
||||
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{pre}
|
||||
%global gem_instdir() %{gem_dir}/gems/%{gem_name}-%{version}%{pre}
|
||||
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{pre}.gem
|
||||
%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{pre}.gemspec
|
||||
%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{pre}
|
||||
|
|
@ -78,6 +67,11 @@ sed -i -e 's/#\(s\.test_files\)/\1/' %{gem_name}.gemspec
|
|||
# Fix shebang (avoid Requires: /usr/bin/env)
|
||||
sed -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' bin/%{gem_name}
|
||||
|
||||
# ref: https://github.com/asciidoctor/asciidoctor/issues/4684
|
||||
# the upstream plans to remove logger dep, but for now
|
||||
# add logger dep explicitly for ruby3_5
|
||||
%gemspec_add_dep -g logger -s ./%{gem_name}.gemspec
|
||||
|
||||
%build
|
||||
gem build %{gem_name}.gemspec
|
||||
%gem_install -n %{gem_name}-%{version}%{pre}.gem
|
||||
|
|
@ -133,6 +127,16 @@ cp -a .%{gem_instdir}/man/*.1 \
|
|||
%doc %{gem_docdir}
|
||||
|
||||
%changelog
|
||||
* Mon Dec 15 2025 Dominik Mierzejewski <dominik@greysector.net> - 2.0.26-1
|
||||
- updated to 2.0.26 (resolves rhbz#2265214)
|
||||
- droped upstreamed patches
|
||||
|
||||
* Wed Nov 05 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.20-11
|
||||
- Add logger dep for ruby3_5
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (asciidoctor-2.0.20.tar.gz) = b6b730de8f83e36630dc6146b4c0e07a26b502b695e78e50fc87790391126d52ef0b6b02b82ecb225adff680c94305b4e31403cc067bdbf1740e2d759417f440
|
||||
SHA512 (asciidoctor-2.0.26.tar.gz) = 5e42079374fb1767dd0fd6767fd1e718d2c1c673e131ef1ae401c7b17e5b413168de3b25889eda35d2021ded55855b83b78f6110729e1a7765f757b37bbf5858
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue