openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2024
- 2 participants
- 1220 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-parallel_tests for openSUSE:Factory checked in at 2024-06-24 20:51:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-parallel_tests (Old)
and /work/SRC/openSUSE:Factory/.rubygem-parallel_tests.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-parallel_tests"
Mon Jun 24 20:51:20 2024 rev:19 rq:1182818 version:4.7.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-parallel_tests/rubygem-parallel_tests.changes 2024-02-27 22:45:23.180093858 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-parallel_tests.new.18349/rubygem-parallel_tests.changes 2024-06-24 20:52:19.090170306 +0200
@@ -1,0 +2,5 @@
+Fri Jun 21 10:22:16 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- New upstream release 4.7.1, no changelog found
+
+-------------------------------------------------------------------
Old:
----
parallel_tests-4.4.0.gem
New:
----
parallel_tests-4.7.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-parallel_tests.spec ++++++
--- /var/tmp/diff_new_pack.hLQAOE/_old 2024-06-24 20:52:20.326215488 +0200
+++ /var/tmp/diff_new_pack.hLQAOE/_new 2024-06-24 20:52:20.326215488 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-parallel_tests
-Version: 4.4.0
+Version: 4.7.1
Release: 0
%define mod_name parallel_tests
%define mod_full_name %{mod_name}-%{version}
++++++ parallel_tests-4.4.0.gem -> parallel_tests-4.7.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Readme.md new/Readme.md
--- old/Readme.md 2023-12-25 05:12:45.000000000 +0100
+++ new/Readme.md 2024-04-25 21:57:55.000000000 +0200
@@ -33,35 +33,45 @@
### Create additional database(s)
rake parallel:create
+### (Multi-DB) Create individual database
+ rake parallel:create:<database>
+ rake parallel:create:secondary
+
### Copy development schema (repeat after migrations)
rake parallel:prepare
### Run migrations in additional database(s) (repeat after migrations)
rake parallel:migrate
+### (Multi-DB) Run migrations in individual database
+ rake parallel:migrate:<database>
+
### Setup environment from scratch (create db and loads schema, useful for CI)
rake parallel:setup
### Drop all test databases
rake parallel:drop
+### (Multi-DB) Drop individual test database
+ rake parallel:drop:<database>
+
### Run!
rake parallel:test # Minitest
rake parallel:spec # RSpec
rake parallel:features # Cucumber
rake parallel:features-spinach # Spinach
- rake parallel:test[1] --> force 1 CPU --> 86 seconds
+ rake "parallel:test[1]" --> force 1 CPU --> 86 seconds
rake parallel:test --> got 2 CPUs? --> 47 seconds
rake parallel:test --> got 4 CPUs? --> 26 seconds
...
Test by pattern with Regex (e.g. use one integration server per subfolder / see if you broke any 'user'-related tests)
- rake parallel:test[^test/unit] # every test file in test/unit folder
- rake parallel:test[user] # run users_controller + user_helper + user tests
- rake parallel:test['user|product'] # run user and product related tests
- rake parallel:spec['spec\/(?!features)'] # run RSpec tests except the tests in spec/features
+ rake "parallel:test[^test/unit]" # every test file in test/unit folder
+ rake "parallel:test[user]" # run users_controller + user_helper + user tests
+ rake "parallel:test['user|product']" # run user and product related tests
+ rake "parallel:spec['spec\/(?!features)']" # run RSpec tests except the tests in spec/features
### Example output
@@ -77,9 +87,9 @@
```Bash
RAILS_ENV=test parallel_test -e "rake my:custom:task"
# or
-rake parallel:rake[my:custom:task]
+rake "parallel:rake[my:custom:task]"
# limited parallelism
-rake parallel:rake[my:custom:task,2]
+rake "parallel:rake[my:custom:task,2]"
```
@@ -240,8 +250,9 @@
-m, --multiply-processes [FLOAT] use given number as a multiplier of processes to run
-s, --single [PATTERN] Run all matching files in the same process
-i, --isolate Do not run any other tests in the group used by --single(-s)
- --isolate-n [PROCESSES] Use 'isolate' singles with number of processes, default: 1.
+ --isolate-n [PROCESSES] Use 'isolate' singles with number of processes, default: 1
--highest-exit-status Exit with the highest exit status provided by test run(s)
+ --failure-exit-code [INT] Specify the exit code to use when tests fail
--specify-groups [SPECS] Use 'specify-groups' if you want to specify multiple specs running in multiple
processes in a specific formation. Commas indicate specs in the same process,
pipes indicate specs in a new process. Cannot use with --single, --isolate, or
@@ -250,9 +261,8 @@
Process 1 will contain 1_spec.rb and 2_spec.rb
Process 2 will contain 3_spec.rb
Process 3 will contain all other specs
- --only-group INT[,INT] Only run the given group numbers. Note that this will force the 'filesize'
- grouping strategy (even when the runtime log is present) unless you explicitly
- set it otherwise via the '-group-by' flag.
+ --only-group INT[,INT] Only run the given group numbers.
+ Changes `--group-by` default to 'filesize'.
-e, --exec [COMMAND] execute this code parallel and with ENV['TEST_ENV_NUMBER']
-o, --test-options '[OPTIONS]' execute test commands with those options
-t, --type [TYPE] test(default) / rspec / cucumber / spinach
@@ -269,11 +279,14 @@
--nice execute test commands with low priority.
--runtime-log [PATH] Location of previously recorded test runtimes
--allowed-missing [INT] Allowed percentage of missing runtimes (default = 50)
+ --allow-duplicates When detecting files to run, allow duplicates
--unknown-runtime [FLOAT] Use given number as unknown runtime (otherwise use average time)
--first-is-1 Use "1" as TEST_ENV_NUMBER to not reuse the default test environment
--fail-fast Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported
--verbose Print debug output
- --verbose-command Displays the command that will be executed by each process and when there are failures displays the command executed by each process that failed
+ --verbose-command Combines options --verbose-process-command and --verbose-rerun-command
+ --verbose-process-command Print the command that will be executed by each process before it begins
+ --verbose-rerun-command After a process fails, print the command executed by that process
--quiet Print only tests output
-v, --version Show Version
-h, --help Show this.
@@ -427,6 +440,9 @@
- [Jon Dufresne](https://github.com/jdufresne)
- [Eric Kessler](https://github.com/enkessler)
- [Adis Osmonov](https://github.com/adis-io)
+ - [Josh Westbrook](https://github.com/joshwestbrook)
+ - [Jay Dorsey](https://github.com/jaydorsey)
+ - [hatsu](https://github.com/hatsu38)
[Michael Grosser](http://grosser.it)<br/>
michael(a)grosser.it<br/>
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/cli.rb new/lib/parallel_tests/cli.rb
--- old/lib/parallel_tests/cli.rb 2023-12-25 05:12:45.000000000 +0100
+++ new/lib/parallel_tests/cli.rb 2024-04-25 21:57:55.000000000 +0200
@@ -57,8 +57,8 @@
Tempfile.open 'parallel_tests-lock' do |lock|
ParallelTests.with_pid_file do
simulate_output_for_ci options[:serialize_stdout] do
- Parallel.map(items, in_threads: num_processes) do |item|
- result = yield(item)
+ Parallel.map_with_index(items, in_threads: num_processes) do |item, index|
+ result = yield(item, index)
reprint_output(result, lock.path) if options[:serialize_stdout]
ParallelTests.stop_all_processes if options[:fail_fast] && result[:exit_status] != 0
result
@@ -81,8 +81,8 @@
end
report_number_of_tests(groups) unless options[:quiet]
- test_results = execute_in_parallel(groups, groups.size, options) do |group|
- run_tests(group, groups.index(group), num_processes, options)
+ test_results = execute_in_parallel(groups, groups.size, options) do |group, index|
+ run_tests(group, index, num_processes, options)
end
report_results(test_results, options) unless options[:quiet]
end
@@ -96,8 +96,9 @@
if any_test_failed?(test_results)
warn final_fail_message
- # return the highest exit status to allow sub-processes to send things other than 1
- exit_status = if options[:highest_exit_status]
+ exit_status = if options[:failure_exit_code]
+ options[:failure_exit_code]
+ elsif options[:highest_exit_status]
test_results.map { |data| data.fetch(:exit_status) }.max
else
1
@@ -145,7 +146,7 @@
failing_sets = test_results.reject { |r| r[:exit_status] == 0 }
return if failing_sets.none?
- if options[:verbose] || options[:verbose_command]
+ if options[:verbose] || options[:verbose_rerun_command]
puts "\n\nTests have failed for a parallel_test group. Use the following command to run the group again:\n\n"
failing_sets.each do |failing_set|
command = failing_set[:command]
@@ -223,12 +224,19 @@
opts.on(
"--isolate-n [PROCESSES]",
Integer,
- "Use 'isolate' singles with number of processes, default: 1."
+ "Use 'isolate' singles with number of processes, default: 1"
) { |n| options[:isolate_count] = n }
- opts.on("--highest-exit-status", "Exit with the highest exit status provided by test run(s)") do
- options[:highest_exit_status] = true
- end
+ opts.on(
+ "--highest-exit-status",
+ "Exit with the highest exit status provided by test run(s)"
+ ) { options[:highest_exit_status] = true }
+
+ opts.on(
+ "--failure-exit-code [INT]",
+ Integer,
+ "Specify the exit code to use when tests fail"
+ ) { |code| options[:failure_exit_code] = code }
opts.on(
"--specify-groups [SPECS]",
@@ -237,7 +245,7 @@
processes in a specific formation. Commas indicate specs in the same process,
pipes indicate specs in a new process. Cannot use with --single, --isolate, or
--isolate-n. Ex.
- $ parallel_test -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
+ $ parallel_tests -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
Process 1 will contain 1_spec.rb and 2_spec.rb
Process 2 will contain 3_spec.rb
Process 3 will contain all other specs
@@ -278,11 +286,14 @@
opts.on("--nice", "execute test commands with low priority.") { options[:nice] = true }
opts.on("--runtime-log [PATH]", "Location of previously recorded test runtimes") { |path| options[:runtime_log] = path }
opts.on("--allowed-missing [INT]", Integer, "Allowed percentage of missing runtimes (default = 50)") { |percent| options[:allowed_missing_percent] = percent }
+ opts.on('--allow-duplicates', 'When detecting files to run, allow duplicates') { options[:allow_duplicates] = true }
opts.on("--unknown-runtime [FLOAT]", Float, "Use given number as unknown runtime (otherwise use average time)") { |time| options[:unknown_runtime] = time }
opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true }
opts.on("--fail-fast", "Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported") { options[:fail_fast] = true }
opts.on("--verbose", "Print debug output") { options[:verbose] = true }
- opts.on("--verbose-command", "Displays the command that will be executed by each process and when there are failures displays the command executed by each process that failed") { options[:verbose_command] = true }
+ opts.on("--verbose-command", "Combines options --verbose-process-command and --verbose-rerun-command") { options.merge! verbose_process_command: true, verbose_rerun_command: true }
+ opts.on("--verbose-process-command", "Print the command that will be executed by each process before it begins") { options[:verbose_process_command] = true }
+ opts.on("--verbose-rerun-command", "After a process fails, print the command executed by that process") { options[:verbose_rerun_command] = true }
opts.on("--quiet", "Print only tests output") { options[:quiet] = true }
opts.on("-v", "--version", "Show Version") do
puts ParallelTests::VERSION
@@ -330,6 +341,10 @@
raise "Can't pass --specify-groups with any of these keys: --single, --isolate, or --isolate-n"
end
+ if options[:failure_exit_code] && options[:highest_exit_status]
+ raise "Can't pass --failure-exit-code and --highest-exit-status"
+ end
+
options
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/spinach/runner.rb new/lib/parallel_tests/spinach/runner.rb
--- old/lib/parallel_tests/spinach/runner.rb 2023-12-25 05:12:45.000000000 +0100
+++ new/lib/parallel_tests/spinach/runner.rb 2024-04-25 21:57:55.000000000 +0200
@@ -15,7 +15,7 @@
def runtime_logging
# Not Yet Supported
- ""
+ []
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/tasks.rb new/lib/parallel_tests/tasks.rb
--- old/lib/parallel_tests/tasks.rb 2023-12-25 05:12:45.000000000 +0100
+++ new/lib/parallel_tests/tasks.rb 2024-04-25 21:57:55.000000000 +0200
@@ -48,6 +48,9 @@
activate_pipefail = "set -o pipefail"
remove_ignored_lines = %{(grep -v #{Shellwords.escape(ignore_regex)} || true)}
+ # remove nil values (ex: #purge_before_load returns nil)
+ command.compact!
+
if system('/bin/bash', '-c', "#{activate_pipefail} 2>/dev/null")
shell_command = "#{activate_pipefail} && (#{Shellwords.shelljoin(command)}) | #{remove_ignored_lines}"
['/bin/bash', '-c', shell_command]
@@ -125,6 +128,24 @@
command
end
+ def configured_databases
+ return [] unless defined?(ActiveRecord) && rails_61_or_greater?
+
+ @@configured_databases ||= ActiveRecord::Tasks::DatabaseTasks.setup_initial_database_yaml
+ end
+
+ def for_each_database(&block)
+ # Use nil to represent all databases
+ block&.call(nil)
+
+ # skip if not rails or old rails version
+ return if !defined?(ActiveRecord::Tasks::DatabaseTasks) || !ActiveRecord::Tasks::DatabaseTasks.respond_to?(:for_each)
+
+ ActiveRecord::Tasks::DatabaseTasks.for_each(configured_databases) do |name|
+ block&.call(name)
+ end
+ end
+
private
def rails_7_or_greater?
@@ -145,25 +166,33 @@
ParallelTests::Tasks.run_in_parallel(ParallelTests::Tasks.suppress_schema_load_output(command), args)
end
- desc "Create test databases via db:create --> parallel:create[num_cpus]"
- task :create, :count do |_, args|
- ParallelTests::Tasks.run_in_parallel(
- [$0, "db:create", "RAILS_ENV=#{ParallelTests::Tasks.rails_env}"],
- args
- )
+ ParallelTests::Tasks.for_each_database do |name|
+ task_name = 'create'
+ task_name += ":#{name}" if name
+ desc "Create test#{" #{name}" if name} database via db:#{task_name} --> parallel:#{task_name}[num_cpus]"
+ task task_name.to_sym, :count do |_, args|
+ ParallelTests::Tasks.run_in_parallel(
+ [$0, "db:#{task_name}", "RAILS_ENV=#{ParallelTests::Tasks.rails_env}"],
+ args
+ )
+ end
end
- desc "Drop test databases via db:drop --> parallel:drop[num_cpus]"
- task :drop, :count do |_, args|
- ParallelTests::Tasks.run_in_parallel(
- [
- $0,
- "db:drop",
- "RAILS_ENV=#{ParallelTests::Tasks.rails_env}",
- "DISABLE_DATABASE_ENVIRONMENT_CHECK=1"
- ],
- args
- )
+ ParallelTests::Tasks.for_each_database do |name|
+ task_name = 'drop'
+ task_name += ":#{name}" if name
+ desc "Drop test#{" #{name}" if name} database via db:#{task_name} --> parallel:#{task_name}[num_cpus]"
+ task task_name.to_sym, :count do |_, args|
+ ParallelTests::Tasks.run_in_parallel(
+ [
+ $0,
+ "db:#{task_name}",
+ "RAILS_ENV=#{ParallelTests::Tasks.rails_env}",
+ "DISABLE_DATABASE_ENVIRONMENT_CHECK=1"
+ ],
+ args
+ )
+ end
end
desc "Update test databases by dumping and loading --> parallel:prepare[num_cpus]"
@@ -190,12 +219,16 @@
end
# when dumping/resetting takes too long
- desc "Update test databases via db:migrate --> parallel:migrate[num_cpus]"
- task :migrate, :count do |_, args|
- ParallelTests::Tasks.run_in_parallel(
- [$0, "db:migrate", "RAILS_ENV=#{ParallelTests::Tasks.rails_env}"],
- args
- )
+ ParallelTests::Tasks.for_each_database do |name|
+ task_name = 'migrate'
+ task_name += ":#{name}" if name
+ desc "Update test#{" #{name}" if name} database via db:#{task_name} --> parallel:#{task_name}[num_cpus]"
+ task task_name.to_sym, :count do |_, args|
+ ParallelTests::Tasks.run_in_parallel(
+ [$0, "db:#{task_name}", "RAILS_ENV=#{ParallelTests::Tasks.rails_env}"],
+ args
+ )
+ end
end
desc "Rollback test databases via db:rollback --> parallel:rollback[num_cpus]"
@@ -207,16 +240,24 @@
end
# just load the schema (good for integration server <-> no development db)
- desc "Load dumped schema for test databases via db:schema:load --> parallel:load_schema[num_cpus]"
- task :load_schema, :count do |_, args|
- command = [
- $0,
- ParallelTests::Tasks.purge_before_load,
- "db:schema:load",
- "RAILS_ENV=#{ParallelTests::Tasks.rails_env}",
- "DISABLE_DATABASE_ENVIRONMENT_CHECK=1"
- ]
- ParallelTests::Tasks.run_in_parallel(ParallelTests::Tasks.suppress_schema_load_output(command), args)
+ ParallelTests::Tasks.for_each_database do |name|
+ rails_task = 'db:schema:load'
+ rails_task += ":#{name}" if name
+
+ task_name = 'load_schema'
+ task_name += ":#{name}" if name
+
+ desc "Load dumped schema for test#{" #{name}" if name} database via #{rails_task} --> parallel:#{task_name}[num_cpus]"
+ task task_name.to_sym, :count do |_, args|
+ command = [
+ $0,
+ ParallelTests::Tasks.purge_before_load,
+ rails_task,
+ "RAILS_ENV=#{ParallelTests::Tasks.rails_env}",
+ "DISABLE_DATABASE_ENVIRONMENT_CHECK=1"
+ ]
+ ParallelTests::Tasks.run_in_parallel(ParallelTests::Tasks.suppress_schema_load_output(command), args)
+ end
end
# load the structure from the structure.sql file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/test/runner.rb new/lib/parallel_tests/test/runner.rb
--- old/lib/parallel_tests/test/runner.rb 2023-12-25 05:12:45.000000000 +0100
+++ new/lib/parallel_tests/test/runner.rb 2024-04-25 21:57:55.000000000 +0200
@@ -238,8 +238,9 @@
suffix_pattern = options[:suffix] || test_suffix
include_pattern = options[:pattern] || //
exclude_pattern = options[:exclude_pattern]
+ allow_duplicates = options[:allow_duplicates]
- (tests || []).flat_map do |file_or_folder|
+ files = (tests || []).flat_map do |file_or_folder|
if File.directory?(file_or_folder)
files = files_in_folder(file_or_folder, options)
files = files.grep(suffix_pattern).grep(include_pattern)
@@ -248,7 +249,9 @@
else
file_or_folder
end
- end.uniq
+ end
+
+ allow_duplicates ? files : files.uniq
end
def files_in_folder(folder, options = {})
@@ -290,7 +293,7 @@
end
def report_process_command?(options)
- options[:verbose] || options[:verbose_command]
+ options[:verbose] || options[:verbose_process_command]
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests/version.rb new/lib/parallel_tests/version.rb
--- old/lib/parallel_tests/version.rb 2023-12-25 05:12:45.000000000 +0100
+++ new/lib/parallel_tests/version.rb 2024-04-25 21:57:55.000000000 +0200
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module ParallelTests
- VERSION = '4.4.0'
+ VERSION = '4.7.1'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel_tests.rb new/lib/parallel_tests.rb
--- old/lib/parallel_tests.rb 2023-12-25 05:12:45.000000000 +0100
+++ new/lib/parallel_tests.rb 2024-04-25 21:57:55.000000000 +0200
@@ -44,6 +44,8 @@
def stop_all_processes
pids.all.each { |pid| Process.kill(:INT, pid) }
+ rescue Errno::ESRCH
+ # Process already terminated, do nothing
end
# copied from http://github.com/carlhuda/bundler Bundler::SharedHelpers#find_gemfile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2023-12-25 05:12:45.000000000 +0100
+++ new/metadata 2024-04-25 21:57:55.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: parallel_tests
version: !ruby/object:Gem::Version
- version: 4.4.0
+ version: 4.7.1
platform: ruby
authors:
- Michael Grosser
autorequire:
bindir: bin
cert_chain: []
-date: 2023-12-25 00:00:00.000000000 Z
+date: 2024-04-25 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: parallel
@@ -69,8 +69,8 @@
- MIT
metadata:
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
- documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.4.0/Readme.md
- source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.4.0
+ documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.7.1/Readme.md
+ source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.7.1
wiki_uri: https://github.com/grosser/parallel_tests/wiki
post_install_message:
rdoc_options: []
@@ -87,7 +87,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.3.3
+rubygems_version: 3.4.10
signing_key:
specification_version: 4
summary: Run Test::Unit / RSpec / Cucumber / Spinach in parallel
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-parallel for openSUSE:Factory checked in at 2024-06-24 20:51:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-parallel (Old)
and /work/SRC/openSUSE:Factory/.rubygem-parallel.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-parallel"
Mon Jun 24 20:51:19 2024 rev:11 rq:1182817 version:1.25.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-parallel/rubygem-parallel.changes 2024-02-27 22:45:19.711968075 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-parallel.new.18349/rubygem-parallel.changes 2024-06-24 20:52:17.566114597 +0200
@@ -1,0 +2,5 @@
+Fri Jun 21 10:22:00 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- New upstream release 1.25.1, no changelog found
+
+-------------------------------------------------------------------
Old:
----
parallel-1.24.0.gem
New:
----
parallel-1.25.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-parallel.spec ++++++
--- /var/tmp/diff_new_pack.LwZYBi/_old 2024-06-24 20:52:18.790159340 +0200
+++ /var/tmp/diff_new_pack.LwZYBi/_new 2024-06-24 20:52:18.794159486 +0200
@@ -24,11 +24,11 @@
#
Name: rubygem-parallel
-Version: 1.24.0
+Version: 1.25.1
Release: 0
%define mod_name parallel
%define mod_full_name %{mod_name}-%{version}
-BuildRequires: %{ruby >= 2.5}
+BuildRequires: %{ruby >= 2.7}
BuildRequires: %{rubygem gem2rpm}
BuildRequires: ruby-macros >= 5
URL: https://github.com/grosser/parallel
++++++ parallel-1.24.0.gem -> parallel-1.25.1.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel/version.rb new/lib/parallel/version.rb
--- old/lib/parallel/version.rb 2023-12-16 01:52:15.000000000 +0100
+++ new/lib/parallel/version.rb 2024-06-08 18:08:10.000000000 +0200
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Parallel
- VERSION = Version = '1.24.0' # rubocop:disable Naming/ConstantName
+ VERSION = Version = '1.25.1' # rubocop:disable Naming/ConstantName
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/parallel.rb new/lib/parallel.rb
--- old/lib/parallel.rb 2023-12-16 01:52:15.000000000 +0100
+++ new/lib/parallel.rb 2024-06-08 18:08:10.000000000 +0200
@@ -24,7 +24,7 @@
attr_reader :backtrace
def initialize(original)
- super "#{original.class}: #{original.message}"
+ super("#{original.class}: #{original.message}")
@backtrace = original.backtrace
end
end
@@ -300,12 +300,12 @@
map(array, options.merge(with_index: true), &block)
end
- def flat_map(*args, &block)
- map(*args, &block).flatten(1)
+ def flat_map(...)
+ map(...).flatten(1)
end
- def filter_map(*args, &block)
- map(*args, &block).compact
+ def filter_map(...)
+ map(...).compact
end
# Number of physical processor cores on the current system.
@@ -328,11 +328,7 @@
end
cores.count
when /mswin|mingw/
- require 'win32ole'
- result_set = WIN32OLE.connect("winmgmts://").ExecQuery(
- "select NumberOfCores from Win32_Processor"
- )
- result_set.to_enum.collect(&:NumberOfCores).reduce(:+)
+ physical_processor_count_windows
else
processor_count
end
@@ -358,8 +354,35 @@
private
+ def physical_processor_count_windows
+ # Get-CimInstance introduced in PowerShell 3 or earlier: https://learn.microsoft.com/en-us/previous-versions/powershell/module/cimcm…
+ result = run(
+ 'powershell -command "Get-CimInstance -ClassName Win32_Processor -Property NumberOfCores ' \
+ '| Select-Object -Property NumberOfCores"'
+ )
+ if !result || $?.exitstatus != 0
+ # fallback to deprecated wmic for older systems
+ result = run("wmic cpu get NumberOfCores")
+ end
+ if !result || $?.exitstatus != 0
+ # Bail out if both commands returned something unexpected
+ warn "guessing pyhsical processor count"
+ processor_count
+ else
+ # powershell: "\nNumberOfCores\n-------------\n 4\n\n\n"
+ # wmic: "NumberOfCores \n\n4 \n\n\n\n"
+ result.scan(/\d+/).map(&:to_i).reduce(:+)
+ end
+ end
+
+ def run(command)
+ IO.popen(command, &:read)
+ rescue Errno::ENOENT
+ # Ignore
+ end
+
def add_progress_bar!(job_factory, options)
- if progress_options = options[:progress]
+ if (progress_options = options[:progress])
raise "Progressbar can only be used with array like items" if job_factory.size == Float::INFINITY
require 'ruby-progressbar'
@@ -388,7 +411,7 @@
results = []
exception = nil
begin
- while set = job_factory.next
+ while (set = job_factory.next)
item, index = set
results << with_instrumentation(item, index, options) do
call_with_index(item, index, options, &block)
@@ -411,7 +434,7 @@
in_threads(options) do |worker_num|
self.worker_number = worker_num
# as long as there are more jobs, work on one of them
- while !exception && set = job_factory.next
+ while !exception && (set = job_factory.next)
begin
item, index = set
result = with_instrumentation item, index, options do
@@ -455,7 +478,7 @@
# start
ractors.dup.each do |ractor|
- if set = job_factory.next
+ if (set = job_factory.next)
item, index = set
instrument_start item, index, options
ractor.send [callback, item, index]
@@ -466,7 +489,7 @@
end
# replace with new items
- while set = job_factory.next
+ while (set = job_factory.next)
item_next, index_next = set
done, (exception, result, item, index) = Ractor.select(*ractors)
if exception
@@ -669,7 +692,7 @@
end
def instrument_start(item, index, options)
- return unless on_start = options[:start]
+ return unless (on_start = options[:start])
options[:mutex].synchronize { on_start.call(item, index) }
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2023-12-16 01:52:15.000000000 +0100
+++ new/metadata 2024-06-08 18:08:10.000000000 +0200
@@ -1,16 +1,16 @@
--- !ruby/object:Gem::Specification
name: parallel
version: !ruby/object:Gem::Version
- version: 1.24.0
+ version: 1.25.1
platform: ruby
authors:
- Michael Grosser
-autorequire:
+autorequire:
bindir: bin
cert_chain: []
-date: 2023-12-16 00:00:00.000000000 Z
+date: 2024-06-08 00:00:00.000000000 Z
dependencies: []
-description:
+description:
email: michael(a)grosser.it
executables: []
extensions: []
@@ -24,10 +24,10 @@
- MIT
metadata:
bug_tracker_uri: https://github.com/grosser/parallel/issues
- documentation_uri: https://github.com/grosser/parallel/blob/v1.24.0/Readme.md
- source_code_uri: https://github.com/grosser/parallel/tree/v1.24.0
+ documentation_uri: https://github.com/grosser/parallel/blob/v1.25.1/Readme.md
+ source_code_uri: https://github.com/grosser/parallel/tree/v1.25.1
wiki_uri: https://github.com/grosser/parallel/wiki
-post_install_message:
+post_install_message:
rdoc_options: []
require_paths:
- lib
@@ -35,15 +35,15 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '2.5'
+ version: '2.7'
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.1.6
-signing_key:
+rubygems_version: 3.4.10
+signing_key:
specification_version: 4
summary: Run any kind of code in parallel processes
test_files: []
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-pairing_heap for openSUSE:Factory checked in at 2024-06-24 20:51:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-pairing_heap (Old)
and /work/SRC/openSUSE:Factory/.rubygem-pairing_heap.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-pairing_heap"
Mon Jun 24 20:51:17 2024 rev:4 rq:1182816 version:3.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-pairing_heap/rubygem-pairing_heap.changes 2023-11-05 12:18:53.821364032 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-pairing_heap.new.18349/rubygem-pairing_heap.changes 2024-06-24 20:52:16.710083306 +0200
@@ -1,0 +2,9 @@
+Fri Jun 21 10:21:28 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- 3.1.0:
+
+* Implement merge operation for SimplePairingHeap
+
+
+
+-------------------------------------------------------------------
Old:
----
pairing_heap-3.0.1.gem
New:
----
pairing_heap-3.1.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-pairing_heap.spec ++++++
--- /var/tmp/diff_new_pack.OM9cGV/_old 2024-06-24 20:52:17.294104654 +0200
+++ /var/tmp/diff_new_pack.OM9cGV/_new 2024-06-24 20:52:17.298104801 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-pairing_heap
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-pairing_heap
-Version: 3.0.1
+Version: 3.1.0
Release: 0
%define mod_name pairing_heap
%define mod_full_name %{mod_name}-%{version}
++++++ pairing_heap-3.0.1.gem -> pairing_heap-3.1.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.github/workflows/main.yml new/.github/workflows/main.yml
--- old/.github/workflows/main.yml 2023-04-09 15:46:33.000000000 +0200
+++ new/.github/workflows/main.yml 2024-02-11 16:03:25.000000000 +0100
@@ -8,7 +8,7 @@
matrix:
os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
- ruby: ['2.7', '3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head]
+ ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', head, jruby, jruby-head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock
--- old/Gemfile.lock 2023-04-09 15:46:33.000000000 +0200
+++ new/Gemfile.lock 2024-02-11 16:03:25.000000000 +0100
@@ -1,51 +1,66 @@
PATH
remote: .
specs:
- pairing_heap (3.0.1)
+ pairing_heap (3.1.0)
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
+ base64 (0.1.1)
docile (1.4.0)
json (2.6.3)
json (2.6.3-java)
- language_server-protocol (3.17.0.2)
- minitest (5.15.0)
- parallel (1.22.1)
- parser (3.1.3.0)
+ language_server-protocol (3.17.0.3)
+ lint_roller (1.1.0)
+ minitest (5.21.2)
+ parallel (1.23.0)
+ parser (3.2.2.3)
ast (~> 2.4.1)
+ racc
+ racc (1.7.1)
+ racc (1.7.1-java)
rainbow (3.1.1)
rake (13.0.6)
- regexp_parser (2.6.1)
- rexml (3.2.5)
- rubocop (1.40.0)
+ regexp_parser (2.8.1)
+ rexml (3.2.6)
+ rubocop (1.56.3)
+ base64 (~> 0.1.1)
json (~> 2.3)
+ language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
- parser (>= 3.1.2.1)
+ parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
- rubocop-ast (>= 1.23.0, < 2.0)
+ rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
- unicode-display_width (>= 1.4.0, < 3.0)
- rubocop-ast (1.24.0)
- parser (>= 3.1.1.0)
- rubocop-performance (1.15.1)
+ unicode-display_width (>= 2.4.0, < 3.0)
+ rubocop-ast (1.29.0)
+ parser (>= 3.2.1.0)
+ rubocop-performance (1.19.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
- ruby-progressbar (1.11.0)
+ ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
- standard (1.20.0)
+ standard (1.31.1)
language_server-protocol (~> 3.17.0.2)
- rubocop (= 1.40.0)
- rubocop-performance (= 1.15.1)
- unicode-display_width (2.3.0)
+ lint_roller (~> 1.0)
+ rubocop (~> 1.56.2)
+ standard-custom (~> 1.0.0)
+ standard-performance (~> 1.2)
+ standard-custom (1.0.2)
+ lint_roller (~> 1.0)
+ rubocop (~> 1.50)
+ standard-performance (1.2.0)
+ lint_roller (~> 1.1)
+ rubocop-performance (~> 1.19.0)
+ unicode-display_width (2.4.2)
PLATFORMS
universal-java-17
@@ -53,14 +68,15 @@
x86_64-darwin-20
x86_64-darwin-21
x86_64-darwin-22
+ x86_64-darwin-23
x86_64-linux
DEPENDENCIES
- minitest (~> 5.0)
+ minitest (~> 5.21)
pairing_heap!
rake (~> 13.0)
simplecov (~> 0.22.0)
- standard (~> 1.20)
+ standard (~> 1.31)
BUNDLED WITH
2.3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2023-04-09 15:46:33.000000000 +0200
+++ new/README.md 2024-02-11 16:03:25.000000000 +0100
@@ -101,9 +101,12 @@
| dequeue | O(n) | O(log n) |
| * change_priority | O(1) | o(log n) |
| * delete | O(n) | O(log n) |
+| ^ merge | O(1) | O(1) |
`*` Not available in `SimplePairingHeap`
+`^` Only available in `SimplePairingHeap`
+
## Benchmarks
I picked the three fastest pure Ruby priority queue implementations I was aware of for the comparison:
@@ -117,7 +120,7 @@
> A stress test of 1,000,000 operations: starting with 1,000 pushes/0 pops, following 999 pushes/1 pop, and so on till 0 pushes/1000 pops.
<table>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -127,36 +130,36 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>23</td>
- <td>62.014773</td>
- <td>0.371</td>
+ <td>26</td>
+ <td>62.249427</td>
+ <td>0.419</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>16</td>
- <td>63.135240</td>
- <td>0.253(1.46x slower)</td>
+ <td>17</td>
+ <td>61.624806</td>
+ <td>0.276(1.52x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>14</td>
- <td>61.123304</td>
- <td>0.229(1.62x slower)</td>
+ <td>16</td>
+ <td>63.656502</td>
+ <td>0.251(1.67x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>10</td>
- <td>66.208647</td>
- <td>0.151(2.46x slower)</td>
+ <td>7</td>
+ <td>63.339192</td>
+ <td>0.111(3.79x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>8</td>
- <td>66.353147</td>
- <td>0.121(3.08x slower)</td>
+ <td>5</td>
+ <td>69.010737</td>
+ <td>0.073(5.77x slower)</td>
</tr>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -166,36 +169,36 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>25</td>
- <td>60.423579</td>
- <td>0.414</td>
+ <td>39</td>
+ <td>60.725689</td>
+ <td>0.642</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>19</td>
- <td>60.869907</td>
- <td>0.312(1.33x slower)</td>
+ <td>31</td>
+ <td>60.370348</td>
+ <td>0.514(1.25x slower)</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>17</td>
- <td>61.389127</td>
- <td>0.277(1.49x slower)</td>
+ <td>25</td>
+ <td>62.269577</td>
+ <td>0.402(1.6x slower)</td>
</tr>
<tr>
- <td>Fibonacci</td>
- <td>14</td>
- <td>64.417807</td>
- <td>0.217(1.90x slower)</td>
+ <td>lazy_priority_queue</td>
+ <td>9</td>
+ <td>62.144710</td>
+ <td>0.145(4.43x slower)</td>
</tr>
<tr>
- <td>lazy_priority_queue</td>
- <td>11</td>
- <td>63.151856</td>
- <td>0.174(2.38x slower)</td>
+ <td>Fibonacci</td>
+ <td>8</td>
+ <td>65.064385</td>
+ <td>0.123(5.22x slower)</td>
</tr>
<tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
+ <th colspan="4">jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -205,36 +208,36 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>47</td>
- <td>60.391633</td>
- <td>0.778</td>
+ <td>43</td>
+ <td>60.734661</td>
+ <td>0.709</td>
</tr>
<tr>
<td>rb_heap</td>
<td>34</td>
- <td>60.878639</td>
- <td>0.559(1.39x slower)</td>
+ <td>61.677228</td>
+ <td>0.552(1.28x slower)</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>32</td>
- <td>61.211985</td>
- <td>0.523(1.49x slower)</td>
+ <td>28</td>
+ <td>61.284382</td>
+ <td>0.458(1.55x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>23</td>
- <td>60.297670</td>
- <td>0.382(2.04x slower)</td>
+ <td>22</td>
+ <td>61.396897</td>
+ <td>0.359(1.97x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>23</td>
- <td>61.973538</td>
- <td>0.371(2.10x slower)</td>
+ <td>20</td>
+ <td>61.841463</td>
+ <td>0.324(2.19x slower)</td>
</tr>
<tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
+ <th colspan="4">truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -244,33 +247,33 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>206</td>
- <td>60.191686</td>
- <td>3.433</td>
+ <td>202</td>
+ <td>60.225639</td>
+ <td>3.388</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>97</td>
- <td>60.134011</td>
- <td>1.614(1.93x slower)</td>
+ <td>140</td>
+ <td>60.190881</td>
+ <td>2.357(1.44x slower)</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>85</td>
- <td>60.193608s</td>
- <td>1.434(2.40x slower)</td>
+ <td>100</td>
+ <td>60.373610</td>
+ <td>1.692(2x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>19</td>
- <td>63.212429</td>
- <td>0.301(11.45x slower)</td>
+ <td>31</td>
+ <td>61.179244</td>
+ <td>0.510(6.65x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>2</td>
- <td>83.508571</td>
- <td>0.024(143.70x slower)</td>
+ <td>11</td>
+ <td>64.413419</td>
+ <td>0.171(19.81x slower)</td>
</tr>
</table>
@@ -278,7 +281,7 @@
A stress test of 1,501,500 operations: starting with 1,000 pushes/1000 change_priorities/0 pops, following 999 pushes/999 change_priorities/1 pop, and so on till 0 pushes/0 change_priorities/1000 pops.
<table>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -289,23 +292,23 @@
<tr>
<td>pairing_heap</td>
<td>15</td>
- <td>62.946988</td>
- <td>0.238</td>
+ <td>60.817878</td>
+ <td>0.247</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>9</td>
- <td>61.876691</td>
- <td>0.145(1.64x slower)</td>
+ <td>7</td>
+ <td>63.990376s</td>
+ <td>0.109(2.26x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>8</td>
- <td>67.809982</td>
- <td>0.118(2.02x slower)</td>
+ <td>5</td>
+ <td>70.148980s</td>
+ <td>0.071(3.47x slower)</td>
</tr>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -315,24 +318,24 @@
</tr>
<tr>
<td>pairing_heap</td>
- <td>16</td>
- <td>62.576693</td>
- <td>0.256</td>
+ <td>22</td>
+ <td>62.429264</td>
+ <td>0.353</td>
</tr>
<tr>
- <td>Fibonacci</td>
- <td>13</td>
- <td>63.164614</td>
- <td>0.206(1.24x slower)</td>
+ <td>lazy_priority_queue</td>
+ <td>9</td>
+ <td>63.464818</td>
+ <td>0.142(2.49x slower)</td>
</tr>
<tr>
- <td>lazy_priority_queue</td>
- <td>10</td>
- <td>63.172995s</td>
- <td>0.158(1.62x slower)</td>
+ <td>Fibonacci</td>
+ <td>8</td>
+ <td>67.908812</td>
+ <td>0.118(2.99x slower)</td>
</tr>
<tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
+ <th colspan="4">jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -342,24 +345,24 @@
</tr>
<tr>
<td>pairing_heap</td>
- <td>28</td>
- <td>60.280368</td>
- <td>0.465</td>
+ <td>27</td>
+ <td>61.709517</td>
+ <td>0.438</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>22</td>
- <td>61.405561</td>
- <td>0.465(1.30x slower)</td>
+ <td>20</td>
+ <td>61.495636</td>
+ <td>0.326(1.34x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>20</td>
- <td>60.397535</td>
- <td>0.331(1.40x slower)</td>
+ <td>19</td>
+ <td>63.401601</td>
+ <td>0.309(1.46x slower)</td>
</tr>
<tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
+ <th colspan="4">truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -369,21 +372,21 @@
</tr>
<tr>
<td>pairing_heap</td>
- <td>70</td>
- <td>60.663184</td>
- <td>1.160</td>
+ <td>93</td>
+ <td>60.125750</td>
+ <td>1.577</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>23</td>
- <td>60.474587</td>
- <td>0.382(3.04x slower)</td>
+ <td>26</td>
+ <td>62.372660s</td>
+ <td>0.419(3.77x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>2</td>
- <td>74.873854</td>
- <td>0.027(43.44x slower)</td>
+ <td>11</td>
+ <td>62.620172s</td>
+ <td>0.177(8.92x slower)</td>
</tr>
</table>
@@ -393,7 +396,7 @@
* If does not support changing priority 500 push calls, then 1000 pops
<table>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -401,26 +404,26 @@
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>436.4</td>
+ <td>748.9</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>380.2(1.94x slower)</td>
+ <td>388.6(1.93x slower)</td>
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>339.9.02(2.17x slower)</td>
+ <td>336.2(2.23x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>313.9(2.35x slower)</td>
+ <td>225.9(3.31x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>194.7(3.78 slower)</td>
+ <td>215.2(3.48x slower)</td>
</tr>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -428,26 +431,26 @@
</tr>
<tr>
<td>pairing_heap</td>
- <td>854.6</td>
+ <td>1276</td>
</tr>
<tr>
- <td>Fibonacci</td>
- <td>651.3(1.31x slower)</td>
+ <td>pairing_heap(SimplePairingHeap)</td>
+ <td>625.6(2.04x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>453.6(1.88x slower)</td>
+ <td>533.36(2.39x slower)</td>
</tr>
<tr>
- <td>pairing_heap(SimplePairingHeap)</td>
- <td>390.9(2.19x slower)</td>
+ <td>Fibonacci</td>
+ <td>495.519(2.57x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>268.8(3.18x slower)</td>
+ <td>453.323(2.81x slower)</td>
</tr>
<tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
+ <th colspan="4">jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -455,26 +458,26 @@
</tr>
<tr>
<td>pairing_heap(PairingHeap)</td>
- <td>1591</td>
+ <td>1377</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>1092(1.46x slower)</td>
+ <td>1088(1.27x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>986(1.61x slower)</td>
+ <td>953.935(1.44x slower)</td>
</tr>
<tr>
<td>pairing_heap(SimplePairingHeap)</td>
- <td>562(2.37x slower)</td>
+ <td>621.35(2.22x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>623(2.55x slower)</td>
+ <td>595.11(2.31x slower)</td>
</tr>
<tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
+ <th colspan="4">truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -482,135 +485,23 @@
</tr>
<tr>
<td>pairing_heap(PairingHeap)</td>
- <td>7404</td>
+ <td>12712</td>
</tr>
<tr>
<td>pairing_heap(SimplePairingHeap)</td>
- <td>5104(1.45x slower)</td>
+ <td>9447(1.35x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>1575(4.70x slower)</td>
- </tr>
- <tr>
- <td>Fibonacci</td>
- <td>1258(5.88x slower)</td>
- </tr>
- <tr>
- <td>lazy_priority_queue</td>
- <td>1004(7.38x slower)</td>
- </tr>
-</table>
-
-### Dijkstra's algorithm with RGL [source code](./test/performance_rgl.rb)
-<table>
- <tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
- </tr>
- <tr>
- <th>Library</th>
- <th>Iterations</th>
- <th>Seconds</th>
- <th>Iterations per second</th>
- </tr>
- <tr>
- <td>pairing_heap</td>
- <td>9</td>
- <td>61.469343</td>
- <td>0.116</td>
- </tr>
- <tr>
- <td>lazy_priority_queue</td>
- <td>8</td>
- <td>64.312672</td>
- <td>0.125(1.18x slower)</td>
- </tr>
- <tr>
- <td>Fibonacci</td>
- <td>7</td>
- <td>60.555716</td>
- <td>0.116(1.27x slower)</td>
- </tr>
- <tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
- </tr>
- <tr>
- <th>Library</th>
- <th>Iterations</th>
- <th>Seconds</th>
- <th>Iterations per second</th>
- </tr>
- <tr>
- <td>pairing_heap</td>
- <td>10</td>
- <td>65.160945s</td>
- <td>0.154</td>
- </tr>
- <tr>
- <td>Fibonacci</td>
- <td>9</td>
- <td>61.950587</td>
- <td>0.145(1.06x slower)</td>
- </tr>
- <tr>
- <td>lazy_priority_queue</td>
- <td>9</td>
- <td>66.592123</td>
- <td>0.135(1.14x slower)</td>
- </tr>
- <tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
- </tr>
- <tr>
- <th>Library</th>
- <th>Iterations</th>
- <th>Seconds</th>
- <th>Iterations per second</th>
- </tr>
- <tr>
- <td>lazy_priority_queue</td>
- <td>20</td>
- <td>61.149944</td>
- <td>0.328</td>
- </tr>
- <tr>
- <td>pairing_heap</td>
- <td>20</td>
- <td>61.210225s</td>
- <td>0.328</td>
+ <td>4009(3.17x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>18</td>
- <td>62.330882</td>
- <td>0.292(1.12x slower)</td>
- </tr>
- <tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
- </tr>
- <tr>
- <th>Library</th>
- <th>Iterations</th>
- <th>Seconds</th>
- <th>Iterations per second</th>
- </tr>
- <tr>
- <td>pairing_heap</td>
- <td>59</td>
- <td>60.053843</td>
- <td>0.991</td>
+ <td>2793(4.55x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>34</td>
- <td>60.586461</td>
- <td>0.563(1.76x slower)</td>
- </tr>
- <tr>
- <td>Fibonacci</td>
- <td>31</td>
- <td>60.633711</td>
- <td>0.520(1.90x slower)</td>
+ <td>1188(10.7x slower)</td>
</tr>
</table>
@@ -618,7 +509,7 @@
Heaps that support change_priority operation use it. Heaps that do not support it use dijkstra implementation that do not rely on change_priority instead and do additional pops and pushes instead(see Dijkstra-NoDec from [Priority Queues and Dijkstra’s Algorithm](https://www3.cs.stonybrook.edu/~rezaul/papers/TR-07-54.pdf))
<table>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -628,36 +519,36 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>28</td>
- <td>62.100299</td>
- <td>0.451</td>
+ <td>41</td>
+ <td>60.100316</td>
+ <td>0.682</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>23</td>
- <td>60.633153</td>
- <td>0.380(1.19x slower)</td>
+ <td>38</td>
+ <td>61.003607</td>
+ <td>0.623(1.09x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>14</td>
- <td>62.019763</td>
- <td>0.226(2.00x slower)</td>
+ <td>30</td>
+ <td>61.486216</td>
+ <td>0.488(1.40x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>11</td>
- <td>63.105064s</td>
- <td>0.174(2.58x slower)</td>
+ <td>23</td>
+ <td>60.251764</td>
+ <td>0.382(1.79x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>10</td>
- <td>64.407187</td>
- <td>0.155(2.90x slower)</td>
+ <td>13</td>
+ <td>61.158622</td>
+ <td>0.213(3.21x slower)</td>
</tr>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -667,36 +558,36 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>32</td>
- <td>61.289321</td>
- <td>0.522</td>
+ <td>65</td>
+ <td>60.805882</td>
+ <td>1.070</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>26</td>
- <td>60.657625</td>
- <td>0.429(1.22x slower)</td>
+ <td>60</td>
+ <td>60.790842</td>
+ <td>0.987(1.08x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>19</td>
- <td>60.710888s</td>
- <td>0.313(1.67x slower)</td>
+ <td>54</td>
+ <td>60.917679</td>
+ <td>0.887(1.21x slower)</td>
</tr>
<tr>
- <td>Fibonacci</td>
- <td>19</td>
- <td>61.471203</td>
- <td>0.310(1.69x slower)</td>
+ <td>lazy_priority_queue</td>
+ <td>30</td>
+ <td>60.712786</td>
+ <td>0.495(2.16x slower)</td>
</tr>
<tr>
- <td>lazy_priority_queue</td>
- <td>12</td>
- <td>60.125779</td>
- <td>0.200(2.61x slower)</td>
+ <td>Fibonacci</td>
+ <td>24</td>
+ <td>61.900715</td>
+ <td>0.388(2.76x slower)</td>
</tr>
<tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
+ <th colspan="4">jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -705,37 +596,37 @@
<th>Iterations per second</th>
</tr>
<tr>
- <td>pairing_heap (SimplePairingHeap)</td>
- <td>46</td>
- <td>61.226924</td>
- <td>0.753</td>
+ <td>rb_heap</td>
+ <td>70</td>
+ <td>60.077928</td>
+ <td>1.168</td>
</tr>
<tr>
- <td>rb_heap</td>
- <td>38</td>
- <td>60.563995</td>
- <td>0.628(1.20x slower)</td>
+ <td>pairing_heap (SimplePairingHeap)</td>
+ <td>66</td>
+ <td>60.420935</td>
+ <td>1.094(1.07x slower)</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>37</td>
- <td>60.928350</td>
- <td>0.608(1.24x slower)</td>
+ <td>64</td>
+ <td>60.114467</td>
+ <td>1.066(1.1x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>28</td>
- <td>61.136970</td>
- <td>0.461(1.63x slower)</td>
+ <td>54</td>
+ <td>60.426971</td>
+ <td>0.898(1.30x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>22</td>
- <td>62.214796</td>
- <td>0.354(2.13x slower)</td>
+ <td>49</td>
+ <td>60.636963</td>
+ <td>0.809(1.44x slower)</td>
</tr>
<tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
+ <th colspan="4">truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -745,33 +636,33 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>176</td>
- <td>60.029817</td>
- <td>3.006</td>
+ <td>288</td>
+ <td>60.102278</td>
+ <td>4.936</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>124</td>
- <td>60.366607</td>
- <td>2.078(1.45x slower)</td>
+ <td>232</td>
+ <td>60.159057</td>
+ <td>3.936(1.25x slower)</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>95</td>
- <td>60.021043</td>
- <td>1.585(1.90x slower)</td>
+ <td>227</td>
+ <td>60.082482</td>
+ <td>3.881(1.27x slower)</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>38</td>
- <td>60.020976</td>
- <td>0.636(4.72x slower)</td>
+ <td>101</td>
+ <td>60.076691</td>
+ <td>1.721(2.87x slower)</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>27</td>
- <td>61.349925</td>
- <td>0.445(6.75x slower)</td>
+ <td>66</td>
+ <td>60.771569</td>
+ <td>1.1(4.49x slower)</td>
</tr>
</table>
@@ -779,7 +670,7 @@
#### Change priority required
<table>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -791,14 +682,14 @@
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>1.688x slower</td>
+ <td>2.1x slower</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>1.987x slower</td>
+ <td>3.38x slower</td>
</tr>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -809,15 +700,15 @@
<td>1</td>
</tr>
<tr>
- <td>Fibonacci</td>
- <td>1.256x slower</td>
+ <td>lazy_priority_queue</td>
+ <td>2.55x slower</td>
</tr>
<tr>
- <td>lazy_priority_queue</td>
- <td>1.648x slower</td>
+ <td>Fibonacci</td>
+ <td>2.74x slower</td>
</tr>
<tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
+ <th colspan="4">jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -829,14 +720,14 @@
</tr>
<tr>
<td>Fibonacci</td>
- <td>1.327x slower</td>
+ <td>1.267x slower</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>1.383x slower</td>
+ <td>1.396x slower</td>
</tr>
<tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
+ <th colspan="4">truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -848,18 +739,18 @@
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>3.878x slower</td>
+ <td>3.54x slower</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>9.889x slower</td>
+ <td>5.86x slower</td>
</tr>
</table>
#### Change priority not required
<table>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -871,22 +762,22 @@
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>1.318x slower</td>
+ <td>1.29x slower</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>1.8x slower</td>
+ <td>1.53x slower</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>2.519x slower</td>
+ <td>2.6x slower</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>2.989x slower</td>
+ <td>4.29x slower</td>
</tr>
<tr>
- <th colspan="4">ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-darwin21]</th>
+ <th colspan="4">ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-darwin23]</th>
</tr>
<tr>
<th>Library</th>
@@ -897,23 +788,23 @@
<td>1</td>
</tr>
<tr>
- <td>pairing_heap (PairingHeap)</td>
- <td>1.348x slower</td>
- </tr>
- <tr>
<td>rb_heap</td>
- <td>1.490x slower</td>
+ <td>1.227x slower</td>
</tr>
<tr>
- <td>Fibonacci</td>
- <td>1.792x slower</td>
+ <td>pairing_heap (PairingHeap)</td>
+ <td>1.316x slower</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>2.492x slower</td>
+ <td>3.094x slower</td>
+ </tr>
+ <tr>
+ <td>Fibonacci</td>
+ <td>3.79x slower</td>
</tr>
<tr>
- <th colspan="4">jruby 9.3.7.0 (2.6.8) 2022-08-16 c79ef237e0 OpenJDK 64-Bit Server VM 17.0.2+8-86 on 17.0.2+8-86 +indy +jit [x86_64-darwin]</th>
+ <th colspan="4">jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -921,26 +812,26 @@
</tr>
<tr>
<td>pairing_heap (SimplePairingHeap)</td>
- <td>1</td>
+ <td>1.033x slower</td>
</tr>
<tr>
<td>rb_heap</td>
- <td>1.292x slower</td>
+ <td>1.133x slower</td>
</tr>
<tr>
<td>pairing_heap (PairingHeap)</td>
- <td>1.359x slower</td>
+ <td>1.302x slower</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>1.824x slower</td>
+ <td>1.602x slower</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>2.115x slower</td>
+ <td>1.777x slower</td>
</tr>
<tr>
- <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th>
+ <th colspan="4">truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-darwin]</th>
</tr>
<tr>
<th>Library</th>
@@ -951,20 +842,20 @@
<td>1</td>
</tr>
<tr>
- <td>pairing_heap (PairingHeap)</td>
- <td>1.865x slower</td>
+ <td>rb_heap</td>
+ <td>1.35x slower</td>
</tr>
<tr>
- <td>rb_heap</td>
- <td>1.915x slower</td>
+ <td>pairing_heap (PairingHeap)</td>
+ <td>1.58x slower</td>
</tr>
<tr>
<td>lazy_priority_queue</td>
- <td>8.791x slower</td>
+ <td>5.46x slower</td>
</tr>
<tr>
<td>Fibonacci</td>
- <td>26.044x slower</td>
+ <td>7.54x slower</td>
</tr>
</table>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile 2023-04-09 15:46:33.000000000 +0200
+++ new/Rakefile 2024-02-11 16:03:25.000000000 +0100
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+ENV["MT_NO_PLUGINS"] = "1" # Disable autoloading of MiniTest plugins.
+
require "bundler/gem_tasks"
require "rake/testtask"
require "standard/rake"
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pairing_heap/version.rb new/lib/pairing_heap/version.rb
--- old/lib/pairing_heap/version.rb 2023-04-09 15:46:33.000000000 +0200
+++ new/lib/pairing_heap/version.rb 2024-02-11 16:03:25.000000000 +0100
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module PairingHeap
- VERSION = "3.0.1"
+ VERSION = "3.1.0"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pairing_heap.rb new/lib/pairing_heap.rb
--- old/lib/pairing_heap.rb 2023-04-09 15:46:33.000000000 +0200
+++ new/lib/pairing_heap.rb 2024-02-11 16:03:25.000000000 +0100
@@ -425,6 +425,27 @@
NodeVisitor.visit_node(@root) { |x| yield [x.elem, x.priority] }
end
+ # Merges provided heap
+ # Time Complexity: O(1)
+ # @param other SimplePairingHeap to be merged
+ # @return [self]
+ # @raise [ArgumentError] if the provided argument is self
+ # @note This method modifies the argument
+ def merge(other)
+ if equal?(other)
+ raise ArgumentError, "Cannot merge with itself"
+ end
+ other_root = other.root
+ @root = if @root
+ other_root ? meld(@root, other_root) : @root
+ else
+ other_root
+ end
+ @size += other.size
+ other.clear!
+ self
+ end
+
private
include MergePairs
@@ -441,6 +462,15 @@
parent.subheaps = child
parent
end
+
+ protected
+
+ attr_reader :root
+
+ def clear!
+ @root = nil
+ @size = 0
+ end
end
# Priority queue where the smallest priority is the most prioritary
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2023-04-09 15:46:33.000000000 +0200
+++ new/metadata 2024-02-11 16:03:25.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: pairing_heap
version: !ruby/object:Gem::Version
- version: 3.0.1
+ version: 3.1.0
platform: ruby
authors:
- Marcin Henryk Bartkowiak
autorequire:
bindir: exe
cert_chain: []
-date: 2023-04-09 00:00:00.000000000 Z
+date: 2024-02-11 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: minitest
@@ -16,14 +16,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '5.0'
+ version: '5.21'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '5.0'
+ version: '5.21'
- !ruby/object:Gem::Dependency
name: rake
requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '1.20'
+ version: '1.31'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '1.20'
+ version: '1.31'
description: Performant priority queue in pure ruby with support for changing priority
using pairing heap data structure
email:
@@ -94,6 +94,7 @@
homepage_uri: https://github.com/mhib/pairing_heap
source_code_uri: https://github.com/mhib/pairing_heap
documentation_uri: https://rubydoc.info/gems/pairing_heap
+ rubygems_mfa_required: 'true'
post_install_message:
rdoc_options: []
require_paths:
@@ -109,7 +110,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.4.1
+rubygems_version: 3.5.3
signing_key:
specification_version: 4
summary: Performant priority queue in pure ruby with support for changing priority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pairing_heap.gemspec new/pairing_heap.gemspec
--- old/pairing_heap.gemspec 2023-04-09 15:46:33.000000000 +0200
+++ new/pairing_heap.gemspec 2024-02-11 16:03:25.000000000 +0100
@@ -17,9 +17,8 @@
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.metadata["documentation_uri"] = "https://rubydoc.info/gems/pairing_heap"
+ spec.metadata["rubygems_mfa_required"] = "true"
- # Specify which files should be added to the gem when it is released.
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
end
@@ -27,14 +26,8 @@
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
- # Uncomment to register a new dependency of your gem
- # spec.add_dependency "example-gem", "~> 1.0"
-
- spec.add_development_dependency "minitest", "~> 5.0"
+ spec.add_development_dependency "minitest", "~> 5.21"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "simplecov", "~> 0.22.0"
- spec.add_development_dependency "standard", "~> 1.20"
-
- # For more information and examples about making a new gem, checkout our
- # guide at: https://bundler.io/guides/creating_gem.html
+ spec.add_development_dependency "standard", "~> 1.31"
end
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-net-ssh for openSUSE:Factory checked in at 2024-06-24 20:51:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-net-ssh (Old)
and /work/SRC/openSUSE:Factory/.rubygem-net-ssh.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-net-ssh"
Mon Jun 24 20:51:16 2024 rev:38 rq:1182814 version:7.2.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-net-ssh/rubygem-net-ssh.changes 2024-02-27 22:45:18.339918312 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-net-ssh.new.18349/rubygem-net-ssh.changes 2024-06-24 20:52:15.398035347 +0200
@@ -1,0 +2,8 @@
+Fri Jun 21 10:18:36 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- === 7.2.2
+
+ * ruby 3.3.0: base64 fix
+
+
+-------------------------------------------------------------------
Old:
----
net-ssh-7.2.1.gem
New:
----
net-ssh-7.2.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-net-ssh.spec ++++++
--- /var/tmp/diff_new_pack.szyU7S/_old 2024-06-24 20:52:15.902053771 +0200
+++ /var/tmp/diff_new_pack.szyU7S/_new 2024-06-24 20:52:15.902053771 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-net-ssh
-Version: 7.2.1
+Version: 7.2.3
Release: 0
%define mod_name net-ssh
%define mod_full_name %{mod_name}-%{version}
++++++ net-ssh-7.2.1.gem -> net-ssh-7.2.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.github/workflows/ci.yml new/.github/workflows/ci.yml
--- old/.github/workflows/ci.yml 2023-12-19 19:42:26.000000000 +0100
+++ new/.github/workflows/ci.yml 2024-04-02 07:46:59.000000000 +0200
@@ -7,7 +7,7 @@
runs-on: ubuntu-22.04
strategy:
matrix:
- ruby-version: [2.6.10, 2.7.7, 3.0.6, 3.1.3, 3.2.1, '3.3.0-rc1']
+ ruby-version: [2.6.10, 2.7.7, 3.0.6, 3.1.3, 3.2.1, 3.3.0]
steps:
- uses: actions/checkout@v3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGES.txt new/CHANGES.txt
--- old/CHANGES.txt 2023-12-19 19:42:26.000000000 +0100
+++ new/CHANGES.txt 2024-04-02 07:46:59.000000000 +0200
@@ -1,3 +1,7 @@
+=== 7.2.2
+
+ * ruby 3.3.0: base64 fix
+
=== 7.2.1 rc1
* feat: allow load of certkey from string [#926]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2023-12-19 19:42:26.000000000 +0100
+++ new/README.md 2024-04-02 07:46:59.000000000 +0200
@@ -248,6 +248,8 @@
gem cert --add net-ssh-public_cert.pem
```
+or `rake cert:update_public_when_expired`
+
## Security contact information
See [SECURITY.md](SECURITY.md)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile 2023-12-19 19:42:26.000000000 +0100
+++ new/Rakefile 2024-04-02 07:46:59.000000000 +0200
@@ -61,7 +61,7 @@
pre = Net::SSH::Version::PRE
tiny = Net::SSH::Version::TINY
result = block[pre: pre, tiny: Net::SSH::Version::TINY]
- raise "Version change logic should always return a pre", ArgumentError unless result.key?(:pre)
+ raise ArgumentError, "Version change logic should always return a pre" unless result.key?(:pre)
new_pre = result[:pre]
new_tiny = result[:tiny] || tiny
@@ -112,9 +112,13 @@
task :final do
change_version do |pre:, tiny:|
_ = tiny
- raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
+ if pre.nil?
+ { tiny: tiny + 1, pre: nil }
+ else
+ raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
- { pre: nil }
+ { pre: nil }
+ end
end
end
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/net/ssh/authentication/ed25519.rb new/lib/net/ssh/authentication/ed25519.rb
--- old/lib/net/ssh/authentication/ed25519.rb 2023-12-19 19:42:26.000000000 +0100
+++ new/lib/net/ssh/authentication/ed25519.rb 2024-04-02 07:46:59.000000000 +0200
@@ -3,8 +3,6 @@
require 'ed25519'
-require 'base64'
-
require 'net/ssh/transport/cipher_factory'
require 'net/ssh/authentication/pub_key_fingerprint'
require 'bcrypt_pbkdf' unless RUBY_PLATFORM == "java"
@@ -46,7 +44,7 @@
raise ArgumentError.new("Expected #{MEND} at end of private key") unless datafull.end_with?(MEND)
datab64 = datafull[MBEGIN.size...-MEND.size]
- data = Base64.decode64(datab64)
+ data = datab64.unpack1("m")
raise ArgumentError.new("Expected #{MAGIC} at start of decoded private key") unless data.start_with?(MAGIC)
buffer = Net::SSH::Buffer.new(data[MAGIC.size + 1..-1])
@@ -134,7 +132,7 @@
def to_pem
# TODO this is not pem
- ssh_type + Base64.encode64((a)verify_key.to_bytes)
+ ssh_type + [@verify_key.to_bytes].pack("m")
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/net/ssh/authentication/pub_key_fingerprint.rb new/lib/net/ssh/authentication/pub_key_fingerprint.rb
--- old/lib/net/ssh/authentication/pub_key_fingerprint.rb 2023-12-19 19:42:26.000000000 +0100
+++ new/lib/net/ssh/authentication/pub_key_fingerprint.rb 2024-04-02 07:46:59.000000000 +0200
@@ -32,7 +32,7 @@
when 'MD5'
OpenSSL::Digest.hexdigest(algorithm, blob).scan(/../).join(":")
when 'SHA256'
- "SHA256:#{Base64.encode64(OpenSSL::Digest.digest(algorithm, blob)).chomp.gsub(/=+\z/, '')}"
+ "SHA256:#{[OpenSSL::Digest.digest(algorithm, blob)].pack('m').chomp.gsub(/=+\z/, '')}"
else
raise OpenSSL::Digest::DigestError, "unsupported ssh key digest #{algorithm}"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/net/ssh/known_hosts.rb new/lib/net/ssh/known_hosts.rb
--- old/lib/net/ssh/known_hosts.rb 2023-12-19 19:42:26.000000000 +0100
+++ new/lib/net/ssh/known_hosts.rb 2024-04-02 07:46:59.000000000 +0200
@@ -1,6 +1,5 @@
require 'strscan'
require 'openssl'
-require 'base64'
require 'delegate'
require 'net/ssh/buffer'
require 'net/ssh/authentication/ed25519_loader'
@@ -241,11 +240,11 @@
def known_host_hash?(hostlist, entries)
if hostlist.size == 1 && hostlist.first =~ /\A\|1(\|.+){2}\z/
chunks = hostlist.first.split(/\|/)
- salt = Base64.decode64(chunks[2])
+ salt = chunks[2].unpack1("m")
digest = OpenSSL::Digest.new('sha1')
entries.each do |entry|
hmac = OpenSSL::HMAC.digest(digest, salt, entry)
- return true if Base64.encode64(hmac).chomp == chunks[3]
+ return true if [hmac].pack("m").chomp == chunks[3]
end
end
false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/net/ssh/version.rb new/lib/net/ssh/version.rb
--- old/lib/net/ssh/version.rb 2023-12-19 19:42:26.000000000 +0100
+++ new/lib/net/ssh/version.rb 2024-04-02 07:46:59.000000000 +0200
@@ -52,7 +52,7 @@
MINOR = 2
# The tiny component of this version of the Net::SSH library
- TINY = 1
+ TINY = 3
# The prerelease component of this version of the Net::SSH library
# nil allowed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2023-12-19 19:42:26.000000000 +0100
+++ new/metadata 2024-04-02 07:46:59.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: net-ssh
version: !ruby/object:Gem::Version
- version: 7.2.1
+ version: 7.2.3
platform: ruby
authors:
- Jamis Buck
@@ -12,26 +12,27 @@
cert_chain:
- |
-----BEGIN CERTIFICATE-----
- MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
- c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMzAxMjQwMzE3NTVaFw0yNDAxMjQw
- MzE3NTVaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
- wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
- x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
- lntgSDNW5+kCS8QaRsmIbzj17GKKkrsw39kiQw7FhWfJFeTjddzoZiWwc59KA/Bx
- fBbmDnsMLAtAtauMOxORrbx3EOY7sHku/kSrMg3FXFay7jc6BkbbUij+MjJ/k82l
- 4o8o0YO4BAnya90xgEmgOG0LCCxRhuXQFnMDuDjK2XnUe0h4/6NCn94C+z9GsQID
- AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
- M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
- HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
- ggEBAHyOSaOUji+EJFWZ46g+2EZ/kG7EFloFtIQUz8jDJIWGE+3NV5po1M0Z6EqH
- XmG3BtMLfgOV9NwMQRqIdKnZDfKsqM/FOu+9IqrP+OieAde5OrXR2pzQls60Xft7
- 3qNVaQS99woQRqiUiDQQ7WagOYrZjuVANqTDNt4myzGSjS5sHcKlz3PRn0LJRMe5
- ouuLwQ7BCXityv5RRXex2ibCOyY7pB5ris6xDnPe1WdlyCfUf1Fb+Yqxpy6a8QmH
- v84waVXQ2i5M7pJaHVBF7DxxeW/q8W3VCnsq8vmmvULSThD18QqYGaFDJeN8sTR4
- 6tfjgZ6OvGSScvbCMHkCE9XjonE=
+ MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZuZXRz
+ c2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZFgNj
+ b20wHhcNMjQwNDAxMDk1NjIxWhcNMjUwNDAxMDk1NjIxWjBBMQ8wDQYDVQQDDAZu
+ ZXRzc2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZ
+ FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGJ4TbZ9H+qZ08
+ pQfJhPJTHaDCyQvCsKTFrL5O9z3tllQ7B/zksMMM+qFBpNYu9HCcg4yBATacE/PB
+ qVVyUrpr6lbH/XwoN5ljXm+bdCfmnjZvTCL2FTE6o+bcnaF0IsJyC0Q2B1fbWdXN
+ 6Off1ZWoUk6We2BIM1bn6QJLxBpGyYhvOPXsYoqSuzDf2SJDDsWFZ8kV5ON13Ohm
+ JbBzn0oD8HF8FuYOewwsC0C1q4w7E5GtvHcQ5juweS7+RKsyDcVcVrLuNzoGRttS
+ KP4yMn+TzaXijyjRg7gECfJr3TGASaA4bQsILFGG5dAWcwO4OMrZedR7SHj/o0Kf
+ 3gL7P0axAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
+ BBQF8qLA7Z4zg0SJGtUbv3eoQ8tjIzAfBgNVHREEGDAWgRRuZXRzc2hAc29sdXRp
+ b3VzLmNvbTAfBgNVHRIEGDAWgRRuZXRzc2hAc29sdXRpb3VzLmNvbTANBgkqhkiG
+ 9w0BAQsFAAOCAQEAfY2WbsBKwRtBep4l+Y2/84H1BKH9UVOsFxqQzYkvM2LFDyup
+ UkjYf8nPSjg3mquhaiA5KSoSVUPpNDfQo+UvY3+mlxRs96ttWiUGwz27fy82rx1B
+ ZnfKjsWOntemNON6asOD0mtv0xsNBfOB2VNIKW/uqHsiPpa0OaVy5uENhX+5OFan
+ 2P1Uy+WcMiv38RlRkn4cdEIZUFupDgKFsguYlaJy473/wsae4exUgc5bvi3Splob
+ 1uE/LmB/qWBVSNW8e9KDtJynhDDZBlpESyQHFQCZj6UapzxlnC46LaDncPoAtJPc
+ MlWxJ8mKghIcyXc5y4cSyGypNG5BralqnvQUyg==
-----END CERTIFICATE-----
-date: 2023-12-19 00:00:00.000000000 Z
+date: 2024-04-02 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: bcrypt_pbkdf
@@ -90,6 +91,20 @@
- !ruby/object:Gem::Version
version: '7.1'
- !ruby/object:Gem::Dependency
+ name: base64
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+ type: :development
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+- !ruby/object:Gem::Dependency
name: bundler
requirement: !ruby/object:Gem::Requirement
requirements:
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/net-ssh-public_cert.pem new/net-ssh-public_cert.pem
--- old/net-ssh-public_cert.pem 2023-12-19 19:42:26.000000000 +0100
+++ new/net-ssh-public_cert.pem 2024-04-02 07:46:59.000000000 +0200
@@ -1,20 +1,21 @@
-----BEGIN CERTIFICATE-----
-MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
-c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMzAxMjQwMzE3NTVaFw0yNDAxMjQw
-MzE3NTVaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
-wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
-x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
-lntgSDNW5+kCS8QaRsmIbzj17GKKkrsw39kiQw7FhWfJFeTjddzoZiWwc59KA/Bx
-fBbmDnsMLAtAtauMOxORrbx3EOY7sHku/kSrMg3FXFay7jc6BkbbUij+MjJ/k82l
-4o8o0YO4BAnya90xgEmgOG0LCCxRhuXQFnMDuDjK2XnUe0h4/6NCn94C+z9GsQID
-AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
-M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
-HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
-ggEBAHyOSaOUji+EJFWZ46g+2EZ/kG7EFloFtIQUz8jDJIWGE+3NV5po1M0Z6EqH
-XmG3BtMLfgOV9NwMQRqIdKnZDfKsqM/FOu+9IqrP+OieAde5OrXR2pzQls60Xft7
-3qNVaQS99woQRqiUiDQQ7WagOYrZjuVANqTDNt4myzGSjS5sHcKlz3PRn0LJRMe5
-ouuLwQ7BCXityv5RRXex2ibCOyY7pB5ris6xDnPe1WdlyCfUf1Fb+Yqxpy6a8QmH
-v84waVXQ2i5M7pJaHVBF7DxxeW/q8W3VCnsq8vmmvULSThD18QqYGaFDJeN8sTR4
-6tfjgZ6OvGSScvbCMHkCE9XjonE=
+MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZuZXRz
+c2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZFgNj
+b20wHhcNMjQwNDAxMDk1NjIxWhcNMjUwNDAxMDk1NjIxWjBBMQ8wDQYDVQQDDAZu
+ZXRzc2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZ
+FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGJ4TbZ9H+qZ08
+pQfJhPJTHaDCyQvCsKTFrL5O9z3tllQ7B/zksMMM+qFBpNYu9HCcg4yBATacE/PB
+qVVyUrpr6lbH/XwoN5ljXm+bdCfmnjZvTCL2FTE6o+bcnaF0IsJyC0Q2B1fbWdXN
+6Off1ZWoUk6We2BIM1bn6QJLxBpGyYhvOPXsYoqSuzDf2SJDDsWFZ8kV5ON13Ohm
+JbBzn0oD8HF8FuYOewwsC0C1q4w7E5GtvHcQ5juweS7+RKsyDcVcVrLuNzoGRttS
+KP4yMn+TzaXijyjRg7gECfJr3TGASaA4bQsILFGG5dAWcwO4OMrZedR7SHj/o0Kf
+3gL7P0axAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
+BBQF8qLA7Z4zg0SJGtUbv3eoQ8tjIzAfBgNVHREEGDAWgRRuZXRzc2hAc29sdXRp
+b3VzLmNvbTAfBgNVHRIEGDAWgRRuZXRzc2hAc29sdXRpb3VzLmNvbTANBgkqhkiG
+9w0BAQsFAAOCAQEAfY2WbsBKwRtBep4l+Y2/84H1BKH9UVOsFxqQzYkvM2LFDyup
+UkjYf8nPSjg3mquhaiA5KSoSVUPpNDfQo+UvY3+mlxRs96ttWiUGwz27fy82rx1B
+ZnfKjsWOntemNON6asOD0mtv0xsNBfOB2VNIKW/uqHsiPpa0OaVy5uENhX+5OFan
+2P1Uy+WcMiv38RlRkn4cdEIZUFupDgKFsguYlaJy473/wsae4exUgc5bvi3Splob
+1uE/LmB/qWBVSNW8e9KDtJynhDDZBlpESyQHFQCZj6UapzxlnC46LaDncPoAtJPc
+MlWxJ8mKghIcyXc5y4cSyGypNG5BralqnvQUyg==
-----END CERTIFICATE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/net-ssh.gemspec new/net-ssh.gemspec
--- old/net-ssh.gemspec 2023-12-19 19:42:26.000000000 +0100
+++ new/net-ssh.gemspec 2024-04-02 07:46:59.000000000 +0200
@@ -38,6 +38,7 @@
spec.add_development_dependency('rbnacl', '~> 7.1') unless ENV['NET_SSH_NO_RBNACL']
+ spec.add_development_dependency "base64"
spec.add_development_dependency "bundler", ">= 1.17"
spec.add_development_dependency "minitest", "~> 5.19"
spec.add_development_dependency "mocha", "~> 2.1.0"
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-mime-types-data for openSUSE:Factory checked in at 2024-06-24 20:51:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mime-types-data (Old)
and /work/SRC/openSUSE:Factory/.rubygem-mime-types-data.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mime-types-data"
Mon Jun 24 20:51:13 2024 rev:15 rq:1182807 version:3.2024.0604
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mime-types-data/rubygem-mime-types-data.changes 2024-02-27 22:45:17.631892634 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-mime-types-data.new.18349/rubygem-mime-types-data.changes 2024-06-24 20:52:13.873979638 +0200
@@ -1,0 +2,5 @@
+Fri Jun 21 10:13:03 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- New upstream release 3.2024.0604, see bundled History.md
+
+-------------------------------------------------------------------
Old:
----
mime-types-data-3.2023.1205.gem
New:
----
mime-types-data-3.2024.0604.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-mime-types-data.spec ++++++
--- /var/tmp/diff_new_pack.LCg6AS/_old 2024-06-24 20:52:14.337996599 +0200
+++ /var/tmp/diff_new_pack.LCg6AS/_new 2024-06-24 20:52:14.341996746 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-mime-types-data
-Version: 3.2023.1205
+Version: 3.2024.0604
Release: 0
%define mod_name mime-types-data
%define mod_full_name %{mod_name}-%{version}
++++++ mime-types-data-3.2023.1205.gem -> mime-types-data-3.2024.0604.gem ++++++
++++ 2655 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-ffi for openSUSE:Factory checked in at 2024-06-24 20:51:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-ffi (Old)
and /work/SRC/openSUSE:Factory/.rubygem-ffi.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-ffi"
Mon Jun 24 20:51:06 2024 rev:44 rq:1182779 version:1.17.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-ffi/rubygem-ffi.changes 2023-11-05 12:18:58.457534103 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-ffi.new.18349/rubygem-ffi.changes 2024-06-24 20:52:01.509527678 +0200
@@ -1,0 +2,43 @@
+Fri Jun 21 09:51:52 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- 1.17.0 / 2024-06-02
+-------------------
+
+Fixed:
+* Add FFI::AbstractMemory#read_array_of_string . It was defined but not exposed to Ruby nor tested. #1070
+
+1.17.0.rc2 / 2024-04-22
+-------------------
+
+Fixed:
+* Add missing write barriers to StructLayout#initialize causing a segfault with GC.stress. #1079
+
+1.17.0.rc1 / 2024-04-08
+-------------------
+
+Fixed:
+* Fix type definitions on `aarch64-linux`. #1067, #1066
+* Use RB_TEST for `Pointer.autorelease=` . #1065
+ So that `false` and `nil` are treated as falsey and anything else as truthy.
+* Replace Fixnum by Integer. #1064
+ Fixnum is no longer present in the ruby language.
+* Update `FFI::NativeType` doc. #1061
+* Store FFI::Type::Mapped of FFI::StrPtrConverter in global instead of custom type map
+* Various documentation fixes. #1042
+* Update `FFI::Pointer#==` to return `false` if a pointer is compared to a non-pointer object, which is the expected behavior. #1083
+* Avoid warning about undefined wariable `@ffi_functions` #1085
+* Fix a very unlikely GC bug when using a callback block. # 1089
+
+Added:
+* Provide binary gems for many platforms. #990
+* Add Windows fat binary gem for Ruby-3.3
+* Add RBS type definitions for many user facing parts of the FFI API. #1042
+* Improve fallback search path logic. #1088
+ Respect LD_LIBRARY_PATH and DYLD_LIBRARY_PATH on Macos.
+* Update libffi to current git master branch.
+
+Removed:
+* Remove `enum CHAR_ARRAY` which is no longer used. #1063
+
+
+-------------------------------------------------------------------
Old:
----
ffi-1.16.3.gem
New:
----
ffi-1.17.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-ffi.spec ++++++
--- /var/tmp/diff_new_pack.jcWqkS/_old 2024-06-24 20:52:03.237590844 +0200
+++ /var/tmp/diff_new_pack.jcWqkS/_new 2024-06-24 20:52:03.265591867 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-ffi
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-ffi
-Version: 1.16.3
+Version: 1.17.0
Release: 0
%define mod_name ffi
%define mod_full_name %{mod_name}-%{version}
++++++ ffi-1.16.3.gem -> ffi-1.17.0.gem ++++++
++++ 4874 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-erubi for openSUSE:Factory checked in at 2024-06-24 20:51:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-erubi (Old)
and /work/SRC/openSUSE:Factory/.rubygem-erubi.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-erubi"
Mon Jun 24 20:51:02 2024 rev:9 rq:1182777 version:1.13.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-erubi/rubygem-erubi.changes 2023-11-05 12:18:35.648697395 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-erubi.new.18349/rubygem-erubi.changes 2024-06-24 20:51:59.065438338 +0200
@@ -1,0 +2,10 @@
+Fri Jun 21 09:48:26 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- === 1.13.0 (2024-06-13)
+
+* Define Erubi.h as a module function (jeremyevans)
+
+* Add erubi/capture_block, supporting capturing block output via standard <%= and <%== tags (jeremyevans)
+
+
+-------------------------------------------------------------------
Old:
----
erubi-1.12.0.gem
New:
----
erubi-1.13.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-erubi.spec ++++++
--- /var/tmp/diff_new_pack.PXnFCR/_old 2024-06-24 20:51:59.789464804 +0200
+++ /var/tmp/diff_new_pack.PXnFCR/_new 2024-06-24 20:51:59.789464804 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-erubi
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-erubi
-Version: 1.12.0
+Version: 1.13.0
Release: 0
%define mod_name erubi
%define mod_full_name %{mod_name}-%{version}
++++++ erubi-1.12.0.gem -> erubi-1.13.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG
--- old/CHANGELOG 2022-12-22 20:28:09.000000000 +0100
+++ new/CHANGELOG 2024-06-13 19:28:03.000000000 +0200
@@ -1,3 +1,9 @@
+=== 1.13.0 (2024-06-13)
+
+* Define Erubi.h as a module function (jeremyevans)
+
+* Add erubi/capture_block, supporting capturing block output via standard <%= and <%== tags (jeremyevans)
+
=== 1.12.0 (2022-12-22)
* Use erb/escape for faster html escaping if available (jeremyevans)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc 2022-12-22 20:28:09.000000000 +0100
+++ new/README.rdoc 2024-06-13 19:28:03.000000000 +0200
@@ -8,7 +8,7 @@
* Works with ruby's <tt>--enable-frozen-string-literal</tt> option
* Automatically freezes strings for template text when ruby optimizes it (on ruby 2.1+)
* Escapes <tt>'</tt> (apostrophe) when escaping for better XSS protection
-* Has 6x faster escaping on ruby 2.3+ by using cgi/escape
+* Has 15x-6x faster escaping by using erb/escape or cgi/escape
* Has 81% smaller memory footprint (calculated using +ObjectSpace.memsize_of_all+)
* Does no monkey patching (Erubis adds a method to Kernel)
* Uses an immutable design (all options passed to the constructor, which returns a frozen object)
@@ -42,33 +42,75 @@
== Capturing
Erubi does not support capturing block output into the template by default.
-However, it comes with an +erubi/capture_end+ file that supports capturing
-via <tt><%|=</tt> and <tt><%|==</tt> tags which are closed with a
-<tt><%|</tt> tag:
+It currently ships with two implementations that allow it.
- <%|= form do %>
+=== Erubi::CaptureBlockEngine
+
+The recommended implementation can be required via +erubi/capture_block+,
+which allows capturing to work with normal <tt><%=</tt> and <tt><%==</tt>
+tags.
+
+ <%= form do %>
<input>
- <%| end %>
+ <% end %>
+
+When using the capture_block support, capture methods should just return
+the text it emit into the template, and call +capture+ on the buffer value.
+Since the buffer variable is a local variable and not an instance variable
+by default, you'll probably want to set the +:bufvar+ variable when using
+the capture_block support to an instance variable, and have any methods
+used call capture on that instance variable. Example:
-This offers similar functionality to that offered by Rails' <tt><%=</tt>
-tags, but without the corner cases with that approach (which are due to
-attempting to parse ruby code via a regexp). Similar to the <tt><%=</tt>
-and <tt><%==</tt> tags, <tt><%|=</tt> captures by default and
-<tt><%|==</tt> captures and escapes by default, but this can be reversed
-via the +:escape_capture+ or +:escape+ options.
+ def form(&block)
+ "<form>#{(a)_buf.capture(&block)}</form>"
+ end
-To use the capture_end support with tilt:
+ puts eval(Erubi::CaptureBlockEngine.new(<<-END, bufvar: '@_buf', trim: false).src)
+ before
+ <%= form do %>
+ inside
+ <% end %>
+ after
+ END
+
+ # Output:
+ # before
+ # <form>
+ # inside
+ # </form>
+ # after
+
+To use the capture_block support with tilt:
require 'tilt'
- require 'erubi/capture_end'
- Tilt.new("filename.erb", :engine_class=>Erubi::CaptureEndEngine).render
+ require 'erubi/capture_block'
+ Tilt.new("filename.erb", :engine_class=>Erubi::CaptureBlockEngine).render
+
+Note that the capture_block support, while very compatible with the default
+support, is not 100% compatible. One area where behavior differs is when
+using multiple statements inside <tt><%=</tt> and <tt><%==</tt> tags:
+
+ <%= 1; 2 %>
+
+The default support will output 2, but the capture_block support will output
+1.
+
+=== Erubi::CaptureEndEngine
+
+An alternative capture implementation can be required via +erubi/capture_end+,
+which supports it via <tt><%|=</tt> and <tt><%|==</tt> tags which are
+closed with a <tt><%|</tt> tag:
+
+ <%|= form do %>
+ <input>
+ <%| end %>
+
+It is only recommended to use +erubi/capture_end+ for backwards
+compatibilty.
-When using the capture_end support, any methods (such as +form+ in the example
-above) should return the (potentially modified) buffer. Since the buffer
-variable is a local variable and not an instance variable by default, you'll
-probably want to set the +:bufvar+ variable when using the capture_end
-support to an instance variable, and have any methods used access that
-instance variable. Example:
+When using the capture_end support, capture methods (such as +form+ in the example
+above) should return the (potentially modified) buffer. Similar to the
+capture_block support, using an instance variable is recommended. Example:
def form
@_buf << "<form>"
@@ -77,7 +119,7 @@
@_buf
end
- puts eval(Erubi::CaptureEndEngine.new(<<-END, :bufvar=>:@_buf).src)
+ puts eval(Erubi::CaptureEndEngine.new(<<-END, bufvar: '@_buf').src)
before
<%|= form do %>
inside
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile 2022-12-22 20:28:09.000000000 +0100
+++ new/Rakefile 2024-06-13 19:28:03.000000000 +0200
@@ -16,7 +16,7 @@
RDOC_DEFAULT_OPTS = ["--line-numbers", "--inline-source", '--title', 'Erubi: Small ERB Implementation']
begin
- gem 'hanna-nouveau'
+ gem 'hanna'
RDOC_DEFAULT_OPTS.concat(['-f', 'hanna'])
rescue Gem::LoadError
end
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/erubi/capture_block.rb new/lib/erubi/capture_block.rb
--- old/lib/erubi/capture_block.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/erubi/capture_block.rb 2024-06-13 19:28:03.000000000 +0200
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+require 'erubi'
+
+module Erubi
+ # An engine class that supports capturing blocks via the <tt><%=</tt> and <tt><%==</tt> tags:
+ #
+ # <%= upcase_form do %>
+ # <%= 'foo' %>
+ # <% end %>
+ #
+ # Where +upcase_form+ is defined like:
+ #
+ # def upcase_form(&block)
+ # "<form>#{(a)bufvar.capture(&block).upcase}</form>"
+ # end
+ #
+ # With output being:
+ #
+ # <form>
+ # FOO
+ # </form>
+ #
+ # This requires using a string subclass as the buffer value, provided by the
+ # CaptureBlockEngine::Buffer class.
+ #
+ # This engine does not support the :escapefunc option. To change the escaping function,
+ # use a subclass of CaptureBlockEngine::Buffer and override the #| method.
+ #
+ # This engine does not support the :chain_appends option, and ignores it if present.
+ class CaptureBlockEngine < Engine
+ class Buffer < ::String
+
+ # Convert argument to string when concatening
+ def <<(v)
+ concat(v.to_s)
+ end
+
+ # Escape argument using Erubi.h then then concatenate it to the receiver.
+ def |(v)
+ concat(h(v))
+ end
+
+ # Temporarily clear the receiver before yielding to the block, yield the
+ # given args to the block, return any data captured by the receiver, and
+ # restore the original data the receiver contained before returning.
+ def capture(*args)
+ prev = dup
+ replace("") # 1.8 support!
+ yield(*args)
+ dup
+ ensure
+ replace(prev)
+ end
+
+ private
+
+ if RUBY_VERSION >= '2'
+ define_method(:h, ::Erubi.instance_method(:h))
+ # :nocov:
+ else
+ def h(v)
+ ::Erubi.h(v)
+ end
+ end
+ # :nocov:
+ end
+
+ def initialize(input, properties={})
+ properties = Hash[properties]
+ properties[:bufval] ||= '::Erubi::CaptureBlockEngine::Buffer.new'
+ properties[:chain_appends] = false
+ super
+ end
+
+ private
+
+ def add_expression_result(code)
+ add_expression_op(' <<= ', code)
+ end
+
+ def add_expression_result_escaped(code)
+ add_expression_op(' |= ', code)
+ end
+
+ def add_expression_op(op, code)
+ check = /\A\s*\z/.send(MATCH_METHOD, code) ? "''" : ''
+ with_buffer{@src << op << check << code}
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/erubi.rb new/lib/erubi.rb
--- old/lib/erubi.rb 2022-12-22 20:28:09.000000000 +0100
+++ new/lib/erubi.rb 2024-06-13 19:28:03.000000000 +0200
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Erubi
- VERSION = '1.12.0'
+ VERSION = '1.13.0'
# :nocov:
if RUBY_VERSION >= '1.9'
@@ -19,37 +19,34 @@
begin
require 'erb/escape'
- # :nocov:
- define_singleton_method(:h, ERB::Escape.instance_method(:html_escape))
- # :nocov:
+ define_method(:h, ERB::Escape.instance_method(:html_escape))
+ # :nocov:
rescue LoadError
begin
require 'cgi/escape'
- # :nocov:
unless CGI.respond_to?(:escapeHTML) # work around for JRuby 9.1
CGI = Object.new
CGI.extend(defined?(::CGI::Escape) ? ::CGI::Escape : ::CGI::Util)
end
- # :nocov:
# Escape characters with their HTML/XML equivalents.
- def self.h(value)
+ def h(value)
CGI.escapeHTML(value.to_s)
end
rescue LoadError
- # :nocov:
ESCAPE_TABLE = {'&' => '&'.freeze, '<' => '<'.freeze, '>' => '>'.freeze, '"' => '"'.freeze, "'" => '''.freeze}.freeze
if RUBY_VERSION >= '1.9'
- def self.h(value)
+ def h(value)
value.to_s.gsub(/[&<>"']/, ESCAPE_TABLE)
end
else
- def self.h(value)
+ def h(value)
value.to_s.gsub(/[&<>"']/){|s| ESCAPE_TABLE[s]}
end
end
- # :nocov:
end
end
+ # :nocov:
+ module_function :h
class Engine
# The default regular expression used for scanning.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2022-12-22 20:28:09.000000000 +0100
+++ new/metadata 2024-06-13 19:28:03.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: erubi
version: !ruby/object:Gem::Version
- version: 1.12.0
+ version: 1.13.0
platform: ruby
authors:
- Jeremy Evans
@@ -9,7 +9,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2022-12-22 00:00:00.000000000 Z
+date: 2024-06-13 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: minitest
@@ -53,6 +53,7 @@
- README.rdoc
- Rakefile
- lib/erubi.rb
+- lib/erubi/capture_block.rb
- lib/erubi/capture_end.rb
homepage: https://github.com/jeremyevans/erubi
licenses:
@@ -84,7 +85,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.3.26
+rubygems_version: 3.5.9
signing_key:
specification_version: 4
summary: Small ERB Implementation
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-concurrent-ruby for openSUSE:Factory checked in at 2024-06-24 20:51:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-concurrent-ruby (Old)
and /work/SRC/openSUSE:Factory/.rubygem-concurrent-ruby.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-concurrent-ruby"
Mon Jun 24 20:51:00 2024 rev:17 rq:1182769 version:1.3.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-concurrent-ruby/rubygem-concurrent-ruby.changes 2024-02-27 22:45:12.627711140 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-concurrent-ruby.new.18349/rubygem-concurrent-ruby.changes 2024-06-24 20:51:58.049401199 +0200
@@ -1,0 +2,27 @@
+Fri Jun 21 09:41:38 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- ## Release v1.3.3 (9 June 2024)
+
+* (#1053) Improve the speed of `Concurrent.physical_processor_count` on Windows.
+
+## Release v1.3.2, edge v0.7.1 (7 June 2024)
+
+concurrent-ruby:
+
+* (#1051) Remove dependency on `win32ole`.
+
+concurrent-ruby-edge:
+
+* (#1052) Fix dependency on `concurrent-ruby` to allow the latest release.
+
+## Release v1.3.1 (29 May 2024)
+
+* Release 1.3.0 was broken when pushed to RubyGems. 1.3.1 is a packaging fix.
+
+## Release v1.3.0 (28 May 2024)
+
+* (#1042) Align Java Executor Service behavior for `shuttingdown?`, `shutdown?`
+* (#1038) Add `Concurrent.available_processor_count` that is cgroups aware.
+
+
+-------------------------------------------------------------------
Old:
----
concurrent-ruby-1.2.3.gem
New:
----
concurrent-ruby-1.3.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-concurrent-ruby.spec ++++++
--- /var/tmp/diff_new_pack.buKsF1/_old 2024-06-24 20:51:58.645422986 +0200
+++ /var/tmp/diff_new_pack.buKsF1/_new 2024-06-24 20:51:58.649423131 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-concurrent-ruby
-Version: 1.2.3
+Version: 1.3.3
Release: 0
%define mod_name concurrent-ruby
%define mod_full_name %{mod_name}-%{version}
++++++ concurrent-ruby-1.2.3.gem -> concurrent-ruby-1.3.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2024-01-16 10:56:40.000000000 +0100
+++ new/CHANGELOG.md 2024-06-09 16:34:46.000000000 +0200
@@ -1,5 +1,28 @@
## Current
+## Release v1.3.3 (9 June 2024)
+
+* (#1053) Improve the speed of `Concurrent.physical_processor_count` on Windows.
+
+## Release v1.3.2, edge v0.7.1 (7 June 2024)
+
+concurrent-ruby:
+
+* (#1051) Remove dependency on `win32ole`.
+
+concurrent-ruby-edge:
+
+* (#1052) Fix dependency on `concurrent-ruby` to allow the latest release.
+
+## Release v1.3.1 (29 May 2024)
+
+* Release 1.3.0 was broken when pushed to RubyGems. 1.3.1 is a packaging fix.
+
+## Release v1.3.0 (28 May 2024)
+
+* (#1042) Align Java Executor Service behavior for `shuttingdown?`, `shutdown?`
+* (#1038) Add `Concurrent.available_processor_count` that is cgroups aware.
+
## Release v1.2.3 (16 Jan 2024)
* See [the GitHub release](https://github.com/ruby-concurrency/concurrent-ruby/releases/tag/v… for details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile 2024-01-16 10:56:40.000000000 +0100
+++ new/Rakefile 2024-06-09 16:34:46.000000000 +0200
@@ -28,6 +28,10 @@
end
end
+def which?(executable)
+ !`which #{executable} 2>/dev/null`.empty?
+end
+
require 'rake_compiler_dock'
namespace :repackage do
desc '* with Windows fat distributions'
@@ -42,12 +46,19 @@
Rake::Task['lib/concurrent-ruby/concurrent/concurrent_ruby.jar'].invoke
# build all gem files
+ rack_compiler_dock_kwargs = {}
+ if which?('podman') and (!which?('docker') || `docker --version`.include?('podman'))
+ # podman and only podman available, so RakeCompilerDock will use podman, otherwise it uses docker
+ rack_compiler_dock_kwargs = {
+ options: ['--privileged'], # otherwise the directory in the image is empty
+ runas: false
+ }
+ end
%w[x86-mingw32 x64-mingw32].each do |plat|
RakeCompilerDock.sh(
"bundle install --local && bundle exec rake native:#{plat} gem --trace",
platform: plat,
- options: ['--privileged'], # otherwise the directory in the image is empty
- runas: false)
+ **rack_compiler_dock_kwargs)
end
end
end
@@ -256,10 +267,12 @@
Bundler.with_original_env do
sh 'ruby -v'
+ sh 'bundle install'
sh 'bundle exec rake spec:installed'
- env = { "PATH" => "#{ENV['CONCURRENT_JRUBY_HOME']}/bin:#{ENV['PATH']}" }
+ env = { "PATH" => "#{ENV.fetch('CONCURRENT_JRUBY_HOME')}/bin:#{ENV['PATH']}" }
sh env, 'ruby -v'
+ sh env, 'bundle install'
sh env, 'bundle exec rake spec:installed'
end
@@ -271,8 +284,8 @@
task :publish => ['publish:ask', 'publish:tag', 'publish:rubygems', 'publish:post_steps']
namespace :publish do
- publish_base = true
- publish_edge = false
+ publish_base = nil
+ publish_edge = nil
task :ask do
begin
@@ -280,8 +293,15 @@
input = STDIN.gets.strip.downcase
end until %w(y n).include?(input)
exit 1 if input == 'n'
+
+ begin
+ STDOUT.puts 'Do you want to publish `concurrent-ruby`? (y/n)'
+ input = STDIN.gets.strip.downcase
+ end until %w(y n).include?(input)
+ publish_base = input == 'y'
+
begin
- STDOUT.puts 'It will publish `concurrent-ruby`. Do you want to publish `concurrent-ruby-edge`? (y/n)'
+ STDOUT.puts 'Do you want to publish `concurrent-ruby-edge`? (y/n)'
input = STDIN.gets.strip.downcase
end until %w(y n).include?(input)
publish_edge = input == 'y'
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Binary files old/lib/concurrent-ruby/concurrent/concurrent_ruby.jar and new/lib/concurrent-ruby/concurrent/concurrent_ruby.jar differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb new/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb
--- old/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb 2024-01-16 10:56:40.000000000 +0100
+++ new/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb 2024-06-09 16:34:46.000000000 +0200
@@ -57,15 +57,11 @@
end
def ns_shuttingdown?
- if @executor.respond_to? :isTerminating
- @executor.isTerminating
- else
- false
- end
+ @executor.isShutdown && !(a)executor.isTerminated
end
def ns_shutdown?
- @executor.isShutdown || @executor.isTerminated
+ @executor.isTerminated
end
class Job
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/utility/processor_counter.rb new/lib/concurrent-ruby/concurrent/utility/processor_counter.rb
--- old/lib/concurrent-ruby/concurrent/utility/processor_counter.rb 2024-01-16 10:56:40.000000000 +0100
+++ new/lib/concurrent-ruby/concurrent/utility/processor_counter.rb 2024-06-09 16:34:46.000000000 +0200
@@ -11,6 +11,7 @@
def initialize
@processor_count = Delay.new { compute_processor_count }
@physical_processor_count = Delay.new { compute_physical_processor_count }
+ @cpu_quota = Delay.new { compute_cpu_quota }
end
def processor_count
@@ -21,6 +22,25 @@
@physical_processor_count.value
end
+ def available_processor_count
+ cpu_count = processor_count.to_f
+ quota = cpu_quota
+
+ return cpu_count if quota.nil?
+
+ # cgroup cpus quotas have no limits, so they can be set to higher than the
+ # real count of cores.
+ if quota > cpu_count
+ cpu_count
+ else
+ quota
+ end
+ end
+
+ def cpu_quota
+ @cpu_quota.value
+ end
+
private
def compute_processor_count
@@ -48,10 +68,20 @@
end
cores.count
when /mswin|mingw/
- require 'win32ole'
- result_set = WIN32OLE.connect("winmgmts://").ExecQuery(
- "select NumberOfCores from Win32_Processor")
- result_set.to_enum.collect(&:NumberOfCores).reduce(:+)
+ # Get-CimInstance introduced in PowerShell 3 or earlier: https://learn.microsoft.com/en-us/previous-versions/powershell/module/cimcm…
+ result = run('powershell -command "Get-CimInstance -ClassName Win32_Processor -Property NumberOfCores | Select-Object -Property NumberOfCores"')
+ if !result || $?.exitstatus != 0
+ # fallback to deprecated wmic for older systems
+ result = run("wmic cpu get NumberOfCores")
+ end
+ if !result || $?.exitstatus != 0
+ # Bail out if both commands returned something unexpected
+ processor_count
+ else
+ # powershell: "\nNumberOfCores\n-------------\n 4\n\n\n"
+ # wmic: "NumberOfCores \n\n4 \n\n\n\n"
+ result.scan(/\d+/).map(&:to_i).reduce(:+)
+ end
else
processor_count
end
@@ -60,6 +90,29 @@
rescue
return 1
end
+
+ def run(command)
+ IO.popen(command, &:read)
+ rescue Errno::ENOENT
+ end
+
+ def compute_cpu_quota
+ if RbConfig::CONFIG["target_os"].include?("linux")
+ if File.exist?("/sys/fs/cgroup/cpu.max")
+ # cgroups v2: https://docs.kernel.org/admin-guide/cgroup-v2.html#cpu-interface-files
+ cpu_max = File.read("/sys/fs/cgroup/cpu.max")
+ return nil if cpu_max.start_with?("max ") # no limit
+ max, period = cpu_max.split.map(&:to_f)
+ max / period
+ elsif File.exist?("/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us")
+ # cgroups v1: https://kernel.googlesource.com/pub/scm/linux/kernel/git/glommer/memcg/+/cp…
+ max = File.read("/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us").to_i
+ return nil if max == 0
+ period = File.read("/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us").to_f
+ max / period
+ end
+ end
+ end
end
end
@@ -107,4 +160,31 @@
def self.physical_processor_count
processor_counter.physical_processor_count
end
+
+ # Number of processors cores available for process scheduling.
+ # Returns `nil` if there is no #cpu_quota, or a `Float` if the
+ # process is inside a cgroup with a dedicated CPU quota (typically Docker).
+ #
+ # For performance reasons the calculated value will be memoized on the first
+ # call.
+ #
+ # @return [nil, Float] number of available processors
+ def self.available_processor_count
+ processor_counter.available_processor_count
+ end
+
+ # The maximum number of processors cores available for process scheduling.
+ # Returns `nil` if there is no enforced limit, or a `Float` if the
+ # process is inside a cgroup with a dedicated CPU quota (typically Docker).
+ #
+ # Note that nothing prevents setting a CPU quota higher than the actual number of
+ # cores on the system.
+ #
+ # For performance reasons the calculated value will be memoized on the first
+ # call.
+ #
+ # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set
+ def self.cpu_quota
+ processor_counter.cpu_quota
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/version.rb new/lib/concurrent-ruby/concurrent/version.rb
--- old/lib/concurrent-ruby/concurrent/version.rb 2024-01-16 10:56:40.000000000 +0100
+++ new/lib/concurrent-ruby/concurrent/version.rb 2024-06-09 16:34:46.000000000 +0200
@@ -1,3 +1,3 @@
module Concurrent
- VERSION = '1.2.3'
+ VERSION = '1.3.3'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2024-01-16 10:56:40.000000000 +0100
+++ new/metadata 2024-06-09 16:34:46.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: concurrent-ruby
version: !ruby/object:Gem::Version
- version: 1.2.3
+ version: 1.3.3
platform: ruby
authors:
- Jerry D'Antonio
@@ -10,7 +10,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2024-01-16 00:00:00.000000000 Z
+date: 2024-06-09 00:00:00.000000000 Z
dependencies: []
description: |
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more.
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-asciidoctor for openSUSE:Factory checked in at 2024-06-24 20:50:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-asciidoctor (Old)
and /work/SRC/openSUSE:Factory/.rubygem-asciidoctor.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-asciidoctor"
Mon Jun 24 20:50:57 2024 rev:12 rq:1182762 version:2.0.23
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-asciidoctor/rubygem-asciidoctor.changes 2023-06-27 23:15:41.175045431 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-asciidoctor.new.18349/rubygem-asciidoctor.changes 2024-06-24 20:51:55.061291974 +0200
@@ -1,0 +2,152 @@
+Fri Jun 21 09:18:33 UTC 2024 - Dan Čermák <dan.cermak(a)posteo.net>
+
+- 2.0.23:
+
+This is a patch release in the 2.0.x release line to fix bugs and deal with compliance issues.
+
+The primary bug fix in this release is to not duplicate the block attribute line above a detached block that breaks a dlist, which fixes the duplicate role warning on that detached block.
+The main compliance improvement is to encode spaces in mailto links using %20, in accordance with RFC 3986, instead of +.
+
+This release introduces several fixes and improvements related to parsing a table that has jagged rows.
+If the colspan of the last cell in a row, including the last row, exceeds the specified number of columns, only that row is dropped.
+On the other hand, if the last row is missing cells, an error message is logged to notify the author.
+
+If a URL is used as the target of an xref shorthand, the processor now treats the URL as a fragment identifier instead of crashing.
+
+Finally, repeating spaces in verbatim content in the manpage output are preserved.
+
+## Distribution
+
+- [RubyGem (asciidoctor)](https://rubygems.org/gems/asciidoctor)
+
+Asciidoctor is also packaged for [Fedora](https://apps.fedoraproject.org/packages/rubygem-asciidoctor), [Debian](https://packages.debian.org/sid/asciidoctor), [Ubuntu](https://packages.ubuntu.com/search?keywords=asciidoctor), [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=asciidoctor), [OpenSUSE](https://software.opensuse.org/package/rubygem-asciidoctor), and [Homebrew](https://formulae.brew.sh/formula/asciidoctor). You can use the system's package manager to install the package named **asciidoctor**.
+
+## Changelog
+
+### Compliance
+
+* Encode spaces in mailto links as %20, in accordance with RFC 3986, instead of + (#4576)
+
+### Improvements
+
+* Log error when an incomplete row is detected at the end of a table (#4573)
+
+### Bug Fixes
+
+* Don't leave behind empty line inside skipped preprocessor conditional (#4580)
+* Don't duplicate block attribute line above detached block that breaks a dlist; fixes duplicate role on detached block (#4565)
+* Don't crash when parsing xref shorthand if target starts with URL protocol and text is offset by space (#4570)
+* Only drop current row if colspan of last cell exceeds specified number of columns (#4587)
+* Drop last row if colspan of last cell in table exceeds specified number of columns (#4587)
+* Preserve repeating spaces in verbatim content in manpage output (#3583)
+
+## Release meta
+
+Released on: 2024-05-17
+Released by: @mojavelinux
+Release beer: Marmot Passage by Two 22 Brew
+
+Logs: [resolved issues](https://github.com/asciidoctor/asciidoctor/issues?q=is%3Aissue+labe… | [source diff](https://github.com/asciidoctor/asciidoctor/compare/v2.0.22...v2.0.23) | [gem diff](https://my.diffend.io/gems/asciidoctor/v2.0.22/v2.0.23)
+
+## Credits
+
+A very special thanks to all the **awesome** [supporters of the Asciidoctor OpenCollective campaign](https://opencollective.com/asciidoctor), who provide critical funding for the ongoing development of this project.
+
+2.0.22:
+
+This is a patch release in the 2.0.x release line to further compatibility with Ruby 3.3.
+
+The most critical fix in this release is to remove use of the base64 library since it will no longer being provided as part of the Ruby language starting with Ruby 3.4. When using Ruby 3.3, users would see a warning if this library is used, which happens when the data-uri attribute is set. The functionality has been replaced with a lower-level method on the String object (String#pack), which the base64 library delegates to anyway.
+
+This release also sets the cloaked-context attribute on a source block that is defined using either a styled paragraph or a literal or fenced code structural container. This matches the functionality used for custom block extensions (when the source context does not match the final parsed context).
+
+## Distribution
+
+- [RubyGem (asciidoctor)](https://rubygems.org/gems/asciidoctor)
+
+Asciidoctor is also packaged for [Fedora](https://apps.fedoraproject.org/packages/rubygem-asciidoctor), [Debian](https://packages.debian.org/sid/asciidoctor), [Ubuntu](https://packages.ubuntu.com/search?keywords=asciidoctor), [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=asciidoctor), [OpenSUSE](https://software.opensuse.org/package/rubygem-asciidoctor), and [Homebrew](https://formulae.brew.sh/formula/asciidoctor). You can use the system's package manager to install the package named **asciidoctor**.
+
+## Changelog
+
+### Improvements
+
+* Set `cloaked-context` attribute on source block when context is not `:listing` (#4556)
+
+### Compliance
+
+* Remove use of base64 library to prevent warning in Ruby >= 3.3 (#4561)
+
+## Release meta
+
+Released on: 2024-03-08
+Released by: @mojavelinux
+Release beer: Turbo Laser by Resolute Brewing Company
+
+Logs: [resolved issues](https://github.com/asciidoctor/asciidoctor/issues?q=is%3Aissue+labe… | [source diff](https://github.com/asciidoctor/asciidoctor/compare/v2.0.21...v2.0.22) | [gem diff](https://my.diffend.io/gems/asciidoctor/v2.0.21/v2.0.22)
+
+## Credits
+
+A very special thanks to all the **awesome** [supporters of the Asciidoctor OpenCollective campaign](https://opencollective.com/asciidoctor), who provide critical funding for the ongoing development of this project.
+
+2.0.21:
+
+This is a patch release in the 2.0.x release line, primarily to address compatibility with Ruby 3.3. While development of Asciidoctor 2.1 is beginning to pick up again, we extracted several other important improvements and bug fixes from main to include in this patch release.
+
+The most critical fix in this release is to make Asciidoctor's logger compatible with the logger API in Ruby 3.3. The code is now tested against Ruby 3.3 on each change. Nearly as important, this release also turns off Ruby's system-dependent newline conversion when writing files so that Asciidoctor's output is consistent between *nix and Windows.
+
+Numerous changes were made to correct AsciiDoc parsing. A nested dlist attached using a list continuation no longer consumes a detached paragraph. And an attached block is correctly attached to a nested dlist when that dlist is offset from its parent by an empty line. The secondary and tertiary terms on the `indexterm` macro are preserved when the primary term is quoted and contains an equals sign. And a bare URL enclosed in angle brackets acts as unconstrained syntax that stops at the first occurrence of a closing angle bracket. When includes are not enabled, any spaces in the include target are preserved when generating the fallback link.
+
+Several changes were made to the DocBook output to address compliance. The abstract is moved inside the `<info>` tag (applies to both the abstract in the preamble as well an an abstract for a book part). The `scaledwidth` and `scale` attributes are now supported on an inline macro, like with a block image macro.
+
+A few changes to the manpage output were made. Cells in the head row are styled as bold. Paragraph breaks in a normal table cell are preserved.
+
+Finally, a few refinements to the default stylesheet were applied. The extra border below the doctitle when the sidebar toc is collapsed into main content area was removed. And a text decoration was added to the active footnote number link in the footnotes list.
+
+## Distribution
+
+- [RubyGem (asciidoctor)](https://rubygems.org/gems/asciidoctor)
+
+Asciidoctor is also packaged for [Fedora](https://apps.fedoraproject.org/packages/rubygem-asciidoctor), [Debian](https://packages.debian.org/sid/asciidoctor), [Ubuntu](https://packages.ubuntu.com/search?keywords=asciidoctor), [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=asciidoctor), [OpenSUSE](https://software.opensuse.org/package/rubygem-asciidoctor), and [Homebrew](https://formulae.brew.sh/formula/asciidoctor). You can use the system's package manager to install the package named **asciidoctor**.
+
+## Changelog
+
+### Compliance
+
+* Turn off system-dependent newline conversion when writing files; don't convert line feeds to system-dependent newline (#4550)
+* Support logger in Ruby 3.3 by instantiating super class (#4493) (*@mtasaka*)
+* Add support for `scaledwidth` and `scale` attributes on inline image macro in DocBook output (#4552)
+* Update latest Ruby to 3.3 in CI workflows
+
+### Improvements
+
+* Change title to doctitle in warning message about use of abstract to make subject more clear
+* Modify default stylesheet to add text decoration to active footnote number link in footnotes list (#4530) (@Larhzu)
+
+### Bug Fixes
+
+* Nested dlist attached using list continuation should not consume detached paragraph (#3535)
+* Don't break nested dlist with attached block if offset from parent list by empty line (#3693)
+* Preserve paragraph breaks in normal table cell in manpage output (#4481)
+* Style cells in head row as bold in manpage output (#4490)
+* Escape spaces in include target (using inline passthrough) when generating link from include directive (#4461)
+* Move abstract inside info tag in DocBook output (#3602)
+* Honor secondary and tertiary terms on `indexterm` macro when primary term is quoted and contains an equals sign (#3652)
+* Remove extra border below doctitle when sidebar toc is collapsed into main content area (#4523)
+* Treat bare URL enclosed in angle brackets as unconstrained syntax; only match until closing angled bracket (#4468)
+* Allow URL enclosed in angled brackets syntax to be escaped using backslash (#4468)
+
+## Release meta
+
+Released on: 2024-02-20
+Released by: @mojavelinux
+Release beer: Lunch by Maine Beer Company
+
+Logs: [resolved issues](https://github.com/asciidoctor/asciidoctor/issues?q=is%3Aissue+labe… | [source diff](https://github.com/asciidoctor/asciidoctor/compare/v2.0.20...v2.0.21) | [gem diff](https://my.diffend.io/gems/asciidoctor/v2.0.20/v2.0.21)
+
+## Credits
+
+A very special thanks to all the **awesome** [supporters of the Asciidoctor OpenCollective campaign](https://opencollective.com/asciidoctor), who provide critical funding for the ongoing development of this project.
+
+
+
+-------------------------------------------------------------------
Old:
----
asciidoctor-2.0.20.gem
New:
----
asciidoctor-2.0.23.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-asciidoctor.spec ++++++
--- /var/tmp/diff_new_pack.8mzTM8/_old 2024-06-24 20:51:55.729316392 +0200
+++ /var/tmp/diff_new_pack.8mzTM8/_new 2024-06-24 20:51:55.729316392 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-asciidoctor
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,11 +24,10 @@
#
Name: rubygem-asciidoctor
-Version: 2.0.20
+Version: 2.0.23
Release: 0
%define mod_name asciidoctor
%define mod_full_name %{mod_name}-%{version}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{rubygem gem2rpm}
BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
@@ -38,7 +37,6 @@
Source1: gem2rpm.yml
Summary: An implementation of the AsciiDoc text processor and publishing
License: MIT
-Group: Development/Languages/Ruby
PreReq: update-alternatives
%description
++++++ asciidoctor-2.0.20.gem -> asciidoctor-2.0.23.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.adoc new/CHANGELOG.adoc
--- old/CHANGELOG.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/CHANGELOG.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -16,6 +16,75 @@
This project utilizes semantic versioning.
// tag::compact[]
+== 2.0.23 (2024-05-17) - @mojavelinux
+
+Compliance::
+
+ * Encode spaces in mailto links as %20, in accordance with RFC 3986, instead of + (#4576)
+
+Improvements::
+
+ * Log error when an incomplete row is detected at the end of a table (#4573)
+
+Bug Fixes::
+
+ * Don't leave behind empty line inside skipped preprocessor conditional (#4580)
+ * Don't duplicate block attribute line above detached block that breaks a dlist; fixes duplicate role on detached block (#4565)
+ * Don't crash when parsing xref shorthand if target starts with URL protocol and text is offset by space (#4570)
+ * Only drop current row if colspan of last cell exceeds specified number of columns (#4587)
+ * Drop last row if colspan of last cell in table exceeds specified number of columns (#4587)
+ * Preserve repeating spaces in verbatim content in manpage output (#3583)
+
+=== Details
+
+{url-repo}/releases/tag/v2.0.23[git tag] | {url-repo}/compare/v2.0.22\...v2.0.23[full diff]
+// end::compact[]
+
+== 2.0.22 (2024-03-08) - @mojavelinux
+
+Improvements::
+
+ * Set `cloaked-context` attribute on source block when context is not `:listing` (#4556)
+
+Compliance::
+
+ * Remove use of base64 library to prevent warning in Ruby >= 3.3 (#4561)
+
+=== Details
+
+{url-repo}/releases/tag/v2.0.22[git tag] | {url-repo}/compare/v2.0.21\...v2.0.22[full diff]
+
+== 2.0.21 (2024-02-20) - @mojavelinux
+
+Compliance::
+
+ * Turn off system-dependent newline conversion when writing files; don't convert line feeds to system-dependent newline (#4550)
+ * Support logger in Ruby 3.3 by instantiating super class (#4493) (*@mtasaka*)
+ * Add support for `scaledwidth` and `scale` attributes on inline image macro in DocBook output (#4552)
+ * Update latest Ruby to 3.3 in CI workflows
+
+Improvements::
+
+ * Change title to doctitle in warning message about use of abstract to make subject more clear
+ * Modify default stylesheet to add text decoration to active footnote number link in footnotes list (#4530) (@Larhzu)
+
+Bug Fixes::
+
+ * Nested dlist attached using list continuation should not consume detached paragraph (#3535)
+ * Don't break nested dlist with attached block if offset from parent list by empty line (#3693)
+ * Preserve paragraph breaks in normal table cell in manpage output (#4481)
+ * Style cells in head row as bold in manpage output (#4490)
+ * Escape spaces in include target (using inline passthrough) when generating link from include directive (#4461)
+ * Move abstract inside info tag in DocBook output (#3602)
+ * Honor secondary and tertiary terms on `indexterm` macro when primary term is quoted and contains an equals sign (#3652)
+ * Remove extra border below doctitle when sidebar toc is collapsed into main content area (#4523)
+ * Treat bare URL enclosed in angle brackets as unconstrained syntax; only match until closing angled bracket (#4468)
+ * Allow URL enclosed in angled brackets syntax to be escaped using backslash (#4468)
+
+=== Details
+
+{url-repo}/releases/tag/v2.0.21[git tag] | {url-repo}/compare/v2.0.20\...v2.0.21[full diff]
+
== 2.0.20 (2023-05-18) - @mojavelinux
Bug Fixes::
@@ -26,7 +95,6 @@
=== Details
{url-repo}/releases/tag/v2.0.20[git tag] | {url-repo}/compare/v2.0.19\...v2.0.20[full diff]
-// end::compact[]
== 2.0.19 (2023-05-17) - @mojavelinux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README-de.adoc new/README-de.adoc
--- old/README-de.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-de.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
-v2.0.20, 2023-05-18
+v2.0.23, 2024-05-17
// settings:
:idprefix:
:idseparator: -
@@ -16,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.20
+:release-version: 2.0.23
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README-fr.adoc new/README-fr.adoc
--- old/README-fr.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-fr.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
-v2.0.20, 2023-05-18
+v2.0.23, 2024-05-17
// settings:
:idprefix:
:idseparator: -
@@ -16,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.20
+:release-version: 2.0.23
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README-jp.adoc new/README-jp.adoc
--- old/README-jp.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-jp.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
-v2.0.20, 2023-05-18
+v2.0.23, 2024-05-17
// settings:
:idprefix:
:idseparator: -
@@ -16,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.20
+:release-version: 2.0.23
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README-zh_CN.adoc new/README-zh_CN.adoc
--- old/README-zh_CN.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-zh_CN.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
-v2.0.20, 2023-05-18
+v2.0.23, 2024-05-17
// settings:
:page-layout: base
:idprefix:
@@ -17,7 +17,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.20
+:release-version: 2.0.23
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.adoc new/README.adoc
--- old/README.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
-v2.0.20, 2023-05-18
+v2.0.23, 2024-05-17
// settings:
:idprefix:
:idseparator: -
@@ -16,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.20
+:release-version: 2.0.23
// URLs:
:url-org: https://github.com/asciidoctor
:url-repo: {url-org}/asciidoctor
@@ -130,7 +130,7 @@
Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {url-ruby}[Ruby]:
-* CRuby (aka MRI) 2.3 - 3.2
+* CRuby (aka MRI) 2.3 - 3.3
* JRuby 9.1 - 9.4
* TruffleRuby (GraalVM)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asciidoctor.gemspec new/asciidoctor.gemspec
--- old/asciidoctor.gemspec 2018-03-20 01:00:00.000000000 +0100
+++ new/asciidoctor.gemspec 2018-03-20 01:00:00.000000000 +0100
@@ -39,7 +39,7 @@
# erubi is needed for testing alternate eRuby impls
s.add_development_dependency 'erubi', '~> 1.10.0'
s.add_development_dependency 'haml', '~> 6.1.0'
- s.add_development_dependency 'minitest', '~> 5.14.0'
+ s.add_development_dependency 'minitest', '~> 5.22.0'
s.add_development_dependency 'nokogiri', '~> 1.13.0'
s.add_development_dependency 'rake', '~> 12.3.0'
s.add_development_dependency 'slim', '~> 4.1.0'
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/data/reference/syntax.adoc new/data/reference/syntax.adoc
--- old/data/reference/syntax.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/data/reference/syntax.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -112,7 +112,7 @@
.Some Authors
[circle]
-- Edgar Allen Poe
+- Edgar Allan Poe
- Sheri S. Tepper
- Bill Bryson
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/data/stylesheets/asciidoctor-default.css new/data/stylesheets/asciidoctor-default.css
--- old/data/stylesheets/asciidoctor-default.css 2018-03-20 01:00:00.000000000 +0100
+++ new/data/stylesheets/asciidoctor-default.css 2018-03-20 01:00:00.000000000 +0100
@@ -130,7 +130,7 @@
#content::before{content:none}
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
-#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
+#header>h1:only-child{border-bottom:1px solid #dddddf;padding-bottom:8px}
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
#header .details span:first-child{margin-left:-.125em}
#header .details span.email a{color:rgba(0,0,0,.85)}
@@ -152,6 +152,7 @@
#toctitle{color:#7a2518;font-size:1.2em}
@media screen and (min-width:768px){#toctitle{font-size:1.375em}
body.toc2{padding-left:15em;padding-right:0}
+body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
@@ -317,7 +318,7 @@
a.image object{pointer-events:none}
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
sup.footnote a,sup.footnoteref a{text-decoration:none}
-sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
+sup.footnote a:active,sup.footnoteref a:active,#footnotes .footnote a:first-of-type:active{text-decoration:underline}
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/abstract_node.rb new/lib/asciidoctor/abstract_node.rb
--- old/lib/asciidoctor/abstract_node.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/abstract_node.rb 2018-03-20 01:00:00.000000000 +0100
@@ -354,8 +354,8 @@
#
# 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
@@ -376,8 +376,8 @@
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,)
@@ -410,8 +410,8 @@
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/converter/docbook5.rb new/lib/asciidoctor/converter/docbook5.rb
--- old/lib/asciidoctor/converter/docbook5.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/converter/docbook5.rb 2018-03-20 01:00:00.000000000 +0100
@@ -44,7 +44,8 @@
end
root_tag_idx = result.size
id = node.id
- result << (document_info_tag node) unless node.noheader
+ abstract = find_root_abstract node
+ result << (document_info_tag node, abstract) unless node.noheader
if manpage
result << '<refentry>'
result << '<refmeta>'
@@ -61,7 +62,9 @@
unless (docinfo_content = node.docinfo :header).empty?
result << docinfo_content
end
- result << node.content if node.blocks?
+ abstract = extract_abstract node, abstract if abstract
+ result << (node.blocks.map {|block| block.convert }.compact.join LF) if node.blocks?
+ restore_abstract abstract if abstract
unless (docinfo_content = node.docinfo :footer).empty?
result << docinfo_content
end
@@ -73,7 +76,15 @@
result.join LF
end
- alias convert_embedded content_only
+ def convert_embedded node
+ # NOTE in DocBook 5, the root abstract must be in the info tag and is thus not part of the body
+ if @backend == 'docbook5' && (abstract = find_root_abstract node)
+ abstract = extract_abstract node, abstract
+ end
+ result = node.blocks.map {|block| block.convert }.compact.join LF
+ restore_abstract abstract if abstract
+ result
+ end
def convert_section node
if node.document.doctype == 'manpage'
@@ -183,27 +194,11 @@
end
def convert_image node
- # NOTE according to the DocBook spec, content area, scaling, and scaling to fit are mutually exclusive
- # See http://tdg.docbook.org/tdg/4.5/imagedata-x.html#d0e79635
- if node.attr? 'scaledwidth'
- width_attribute = %( width="#{node.attr 'scaledwidth'}")
- depth_attribute = ''
- scale_attribute = ''
- elsif node.attr? 'scale'
- # QUESTION should we set the viewport using width and depth? (the scaled image would be contained within this box)
- #width_attribute = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
- #depth_attribute = (node.attr? 'height') ? %( depth="#{node.attr 'height'}") : ''
- scale_attribute = %( scale="#{node.attr 'scale'}")
- else
- width_attribute = (node.attr? 'width') ? %( contentwidth="#{node.attr 'width'}") : ''
- depth_attribute = (node.attr? 'height') ? %( contentdepth="#{node.attr 'height'}") : ''
- scale_attribute = ''
- end
align_attribute = (node.attr? 'align') ? %( align="#{node.attr 'align'}") : ''
mediaobject = %(<mediaobject>
<imageobject>
-<imagedata fileref="#{node.image_uri(node.attr 'target')}"#{width_attribute}#{depth_attribute}#{scale_attribute}#{align_attribute}/>
+<imagedata fileref="#{node.image_uri node.attr 'target'}"#{image_size_attributes node.attributes}#{align_attribute}/>
</imageobject>
<textobject><phrase>#{node.alt}</phrase></textobject>
</mediaobject>)
@@ -308,13 +303,17 @@
def convert_open node
case node.style
when 'abstract'
- if node.parent == node.document && node.document.doctype == 'book'
- logger.warn 'abstract block cannot be used in a document without a title when doctype is book. Excluding block content.'
+ if (parent = node.parent) == node.document && node.document.doctype == 'book'
+ logger.warn 'abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content.'
''
else
- %(<abstract>
+ result = %(<abstract>
#{title_tag node}#{enclose_content node}
</abstract>)
+ if @backend == 'docbook5' && !(node.option? 'root') && (parent.context == :open ? parent.style == 'partintro' : parent.context == :section && parent.sectname == 'partintro') && node == parent.blocks[0]
+ result = %(<info>\n#{result}\n</info>)
+ end
+ result
end
when 'partintro'
if node.level == 0 && node.parent.context == :section && node.document.doctype == 'book'
@@ -536,11 +535,9 @@
end
def convert_inline_image node
- width_attribute = (node.attr? 'width') ? %( contentwidth="#{node.attr 'width'}") : ''
- depth_attribute = (node.attr? 'height') ? %( contentdepth="#{node.attr 'height'}") : ''
%(<inlinemediaobject#{common_attributes nil, node.role}>
<imageobject>
-<imagedata fileref="#{node.type == 'icon' ? (node.icon_uri node.target) : (node.image_uri node.target)}"#{width_attribute}#{depth_attribute}/>
+<imagedata fileref="#{node.type == 'icon' ? (node.icon_uri node.target) : (node.image_uri node.target)}"#{image_size_attributes node.attributes}/>
</imageobject>
<textobject><phrase>#{node.alt}</phrase></textobject>
</inlinemediaobject>)
@@ -648,6 +645,23 @@
end
end
+ def image_size_attributes attributes
+ # NOTE according to the DocBook spec, content area, scaling, and scaling to fit are mutually exclusive
+ # See http://tdg.docbook.org/tdg/4.5/imagedata-x.html#d0e79635
+ if attributes.key? 'scaledwidth'
+ %( width="#{attributes['scaledwidth']}")
+ elsif attributes.key? 'scale'
+ # QUESTION should we set the viewport using width and depth? (the scaled image would be contained within this box)
+ #width_attribute = (attributes.key? 'width') ? %( width="#{attributes['width']}") : ''
+ #depth_attribute = (attributes.key? 'height') ? %( depth="#{attributes['height']}") : ''
+ %( scale="#{attributes['scale']}")
+ else
+ width_attribute = (attributes.key? 'width') ? %( contentwidth="#{attributes['width']}") : ''
+ depth_attribute = (attributes.key? 'height') ? %( contentdepth="#{attributes['height']}") : ''
+ %(#{width_attribute}#{depth_attribute})
+ end
+ end
+
def author_tag doc, author
result = []
result << '<author>'
@@ -661,7 +675,7 @@
result.join LF
end
- def document_info_tag doc
+ def document_info_tag doc, abstract
result = ['<info>']
unless doc.notitle
if (title = doc.doctitle partition: true, use_fallback: true).subtitle?
@@ -715,11 +729,37 @@
result << docinfo_content
end
end
+ if abstract
+ abstract.set_option 'root'
+ result << (convert abstract, abstract.node_name)
+ abstract.remove_attr 'root-option'
+ end
result << '</info>'
result.join LF
end
+ def find_root_abstract doc
+ return unless doc.blocks?
+ if (first_block = doc.blocks[0]).context == :preamble
+ return unless (first_block = first_block.blocks[0])
+ elsif first_block.context == :section
+ return first_block if first_block.sectname == 'abstract'
+ return unless first_block.sectname == 'preface' && (first_block = first_block.blocks[0])
+ end
+ return first_block if first_block.style == 'abstract' && first_block.context == :open
+ end
+
+ def extract_abstract document, abstract
+ parent = abstract.parent
+ parent = parent.parent while parent != document && parent.blocks.length == 1
+ parent.blocks.delete_at 0
+ end
+
+ def restore_abstract abstract
+ abstract.parent.blocks.insert 0, abstract
+ end
+
def get_root_document node
while (node = node.document).nested?
node = node.parent_document
@@ -742,26 +782,18 @@
def cover_tag doc, face, use_placeholder = false
if (cover_image = doc.attr %(#{face}-cover-image))
- width_attr = ''
- depth_attr = ''
if (cover_image.include? ':') && ImageMacroRx =~ cover_image
- attrlist = $2
- cover_image = doc.image_uri $1
- if attrlist
- attrs = (AttributeList.new attrlist).parse ['alt', 'width', 'height']
- if attrs.key? 'scaledwidth'
- # NOTE scalefit="1" is the default in this case
- width_attr = %( width="#{attrs['scaledwidth']}")
- else
- width_attr = %( contentwidth="#{attrs['width']}") if attrs.key? 'width'
- depth_attr = %( contentdepth="#{attrs['height']}") if attrs.key? 'height'
- end
- end
+ target, attrlist = $1, $2
+ cover_image = doc.image_uri target
+ # NOTE scalefit="1" is the default for a cover image
+ size_attrs = image_size_attributes (AttributeList.new attrlist).parse %w(alt width height) if attrlist
+ else
+ size_attrs = ''
end
%(<cover role="#{face}">
<mediaobject>
<imageobject>
-<imagedata fileref="#{cover_image}"#{width_attr}#{depth_attr}/>
+<imagedata fileref="#{cover_image}"#{size_attrs}/>
</imageobject>
</mediaobject>
</cover>)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/converter/html5.rb new/lib/asciidoctor/converter/html5.rb
--- old/lib/asciidoctor/converter/html5.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/converter/html5.rb 2018-03-20 01:00:00.000000000 +0100
@@ -748,7 +748,7 @@
def convert_open node
if (style = node.style) == 'abstract'
if node.parent == node.document && node.document.doctype == 'book'
- logger.warn 'abstract block cannot be used in a document without a title when doctype is book. Excluding block content.'
+ logger.warn 'abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content.'
''
else
id_attr = node.id ? %( id="#{node.id}") : ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/converter/manpage.rb new/lib/asciidoctor/converter/manpage.rb
--- old/lib/asciidoctor/converter/manpage.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/converter/manpage.rb 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
# frozen_string_literal: true
module Asciidoctor
-# A built-in {Converter} implementation that generates the man page (troff) format.
+# A built-in {Converter} implementation that generates the man page (groff) format.
#
# The output of this converter adheres to the man definition as defined by
# groff and uses the manpage output of the DocBook toolchain as a foundation.
@@ -432,7 +432,7 @@
when :literal
cell_content = %(.nf#{LF}#{manify cell.text, whitespace: :preserve}#{LF}.fi)
else
- cell_content = manify cell.content.join, whitespace: :normalize
+ cell_content = cell.content.map {|p| manify p, whitespace: :normalize }.join %(#{LF}.sp#{LF})
end
row_text[row_index] << %(#{cell_content}#{LF})
else # tsec == :head || tsec == :foot
@@ -476,21 +476,14 @@
end unless rows.empty?
end
- #row_header.each do |row|
- # result << LF
- # row.each_with_index do |cell, i|
- # result << (cell.join ' ')
- # result << ' ' if row.size > i + 1
- # end
- #end
- # FIXME temporary fix to get basic table to display
- result << LF
- result << ('lt ' * row_header[0].size).chop
-
- result << %(.#{LF})
- row_text.each do |row|
- result << row.join
+ if node.has_header_option && (header_row_text = row_text[0])
+ result << %(#{LF}#{row_header[0].join ' '}.)
+ result << %(#{LF}#{header_row_text.join})
+ result << '.T&'
+ row_text = row_text.slice 1, row_text.length
end
+ result << %(#{LF}#{row_header[0].map { 'lt' }.join ' '}.#{LF})
+ row_text.each {|row| result << row.join }
result << %(.TE#{LF}.sp)
result.join
end
@@ -706,46 +699,44 @@
def manify str, opts = {}
case opts.fetch :whitespace, :collapse
when :preserve
- str = str.gsub TAB, ET
+ str = (str.gsub TAB, ET).gsub(/(^)? +/) { $1 ? $& : %(#{ESC_BS}&#{$&}) }
when :normalize
str = str.gsub WrappedIndentRx, LF
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) 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('-', '\-')
- .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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/helpers.rb new/lib/asciidoctor/helpers.rb
--- old/lib/asciidoctor/helpers.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/helpers.rb 2018-03-20 01:00:00.000000000 +0100
@@ -145,10 +145,13 @@
})
)
end
+ elsif (CGI = ::CGI).respond_to? :escapeURIComponent
+ def encode_uri_component str
+ CGI.escapeURIComponent str
+ end
else
- CGI = ::CGI
def encode_uri_component str
- CGI.escape str
+ (CGI.escape str).gsub '+', '%20'
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/logging.rb new/lib/asciidoctor/logging.rb
--- old/lib/asciidoctor/logging.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/logging.rb 2018-03-20 01:00:00.000000000 +0100
@@ -40,6 +40,7 @@
attr_reader :messages
def initialize
+ super nil
self.level = WARN
@messages = []
end
@@ -67,6 +68,7 @@
attr_reader :max_severity
def initialize
+ super nil
self.level = WARN
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/parser.rb new/lib/asciidoctor/parser.rb
--- old/lib/asciidoctor/parser.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/parser.rb 2018-03-20 01:00:00.000000000 +0100
@@ -43,6 +43,12 @@
AuthorKeys = ['author', 'authorinitials', 'firstname', 'middlename', 'lastname', 'email']
+ ListContinuationMarker = ::Module.new
+
+ ListContinuationPlaceholder = ::String.new.extend ListContinuationMarker
+
+ ListContinuationString = (::String.new LIST_CONTINUATION).extend ListContinuationMarker
+
# Internal: A Hash mapping horizontal alignment abbreviations to alignments
# that can be applied to a table cell (or to all cells in a column)
TableCellHorzAlignments = {
@@ -555,6 +561,7 @@
# process lines verbatim
if style && Compliance.strict_verbatim_paragraphs && (VERBATIM_STYLES.include? style)
block_context = style.to_sym
+ cloaked_context = :paragraph
reader.unshift_line this_line
# advance to block parsing =>
break
@@ -812,16 +819,17 @@
unless block
case block_context
when :listing, :source
- if block_context == :source || (!attributes[1] && (language = attributes[2] || doc_attrs['source-language']))
- if language
+ if block_context == :source || (language = attributes[1] ? nil : attributes[2] || doc_attrs['source-language'])
+ if language # :listing
attributes['style'] = 'source'
attributes['language'] = language
AttributeList.rekey attributes, [nil, nil, 'linenums']
- else
+ else # :source
AttributeList.rekey attributes, [nil, 'language', 'linenums']
if doc_attrs.key? 'source-language'
attributes['language'] = doc_attrs['source-language']
end unless attributes.key? 'language'
+ attributes['cloaked-context'] = cloaked_context unless cloaked_context == :listing
end
if attributes['linenums-option'] || doc_attrs['source-linenums-option']
attributes['linenums'] = ''
@@ -850,6 +858,7 @@
else
attributes['language'] = language
end
+ attributes['cloaked-context'] = cloaked_context
if attributes['linenums-option'] || doc_attrs['source-linenums-option']
attributes['linenums'] = ''
end unless attributes.key? 'linenums'
@@ -1420,17 +1429,18 @@
# the termination of the list
break if is_sibling_list_item?(this_line, list_type, sibling_trait)
+ this_line = ListContinuationString if this_line == LIST_CONTINUATION
prev_line = buffer.empty? ? nil : buffer[-1]
- if prev_line == LIST_CONTINUATION
+ if ListContinuationMarker === prev_line
if continuation == :inactive
continuation = :active
has_text = true
- buffer[-1] = '' unless within_nested_list
+ buffer[-1] = ListContinuationPlaceholder unless within_nested_list
end
# dealing with adjacent list continuations (which is really a syntax error)
- if this_line == LIST_CONTINUATION
+ if ListContinuationMarker === this_line
if continuation != :frozen
continuation = :frozen
buffer << this_line
@@ -1466,6 +1476,7 @@
break
end
if interrupt
+ this_line = nil
reader.unshift_lines block_attribute_lines
break
end
@@ -1489,7 +1500,7 @@
(ch0 == '[' && (BlockAttributeLineRx.match? this_line)) || (ch0 == ':' && (AttributeEntryRx.match? this_line))
buffer << this_line
else
- if (nested_list_type = (within_nested_list ? [:dlist] : NESTABLE_LIST_CONTEXTS).find {|ctx| ListRxMap[ctx].match? this_line })
+ if (nested_list_type = (within_nested_list ? [:dlist] : NESTABLE_LIST_CONTEXTS).find {|ctx| ListRxMap[ctx] =~ this_line })
within_nested_list = true
if nested_list_type == :dlist && $3.nil_or_empty?
# get greedy again
@@ -1510,7 +1521,7 @@
if this_line == LIST_CONTINUATION
detached_continuation = buffer.size
- buffer << this_line
+ buffer << ListContinuationString
elsif has_text # has_text only relevant for dlist, which is more greedy until it has text for an item; has_text is always true for all other lists
# in this block, we have to see whether we stay in the list
# TODO any way to combine this with the check after skipping blank lines?
@@ -1543,6 +1554,9 @@
buffer << this_line
has_text = true
end
+ elsif ListContinuationMarker === this_line
+ has_text = true
+ buffer << this_line
else
has_text = true unless this_line.empty?
if (nested_list_type = (within_nested_list ? [:dlist] : NESTABLE_LIST_CONTEXTS).find {|ctx| ListRxMap[ctx] =~ this_line })
@@ -1559,16 +1573,17 @@
reader.unshift_line this_line if this_line
- buffer[detached_continuation] = '' if detached_continuation
+ buffer[detached_continuation] = ListContinuationPlaceholder if detached_continuation
until buffer.empty?
+ # drop optional trailing continuation
+ if ListContinuationMarker === (last_line = buffer[-1])
+ buffer.pop
+ break
# strip trailing blank lines to prevent empty blocks
- if (last_line = buffer[-1]).empty?
+ elsif last_line.empty?
buffer.pop
else
- # drop optional trailing continuation
- # (a blank line would have served the same purpose in the document)
- buffer.pop if last_line == LIST_CONTINUATION
break
end
end
@@ -2399,6 +2414,7 @@
end
end
+ parser_ctx.close_table
table.assign_column_widths unless (table.attributes['colcount'] ||= table.columns.size) == 0 || explicit_colspecs
table.has_header_option = true if implicit_header
table.partition_header_footer attributes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/reader.rb new/lib/asciidoctor/reader.rb
--- old/lib/asciidoctor/reader.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/reader.rb 2018-03-20 01:00:00.000000000 +0100
@@ -820,6 +820,10 @@
return line unless @process_lines
if line.empty?
+ if @skipping
+ shift
+ return
+ end
@look_ahead += 1
return line
end
@@ -1039,6 +1043,7 @@
# if running in SafeMode::SECURE or greater, don't process this directive
# however, be friendly and at least make it a link to the source document
elsif doc.safe >= SafeMode::SECURE
+ expanded_target = %(pass:c[#{expanded_target}]) if expanded_target.include? ' '
# FIXME we don't want to use a link macro if we are in a verbatim context
replace_next_line %(link:#{expanded_target}[role=include])
elsif @maxdepth
@@ -1238,7 +1243,10 @@
def resolve_include_path target, attrlist, attributes
doc = @document
if (Helpers.uriish? target) || (::String === @dir ? nil : (target = %(#{@dir}/#{target})))
- return replace_next_line %(link:#{target}[role=include]) unless doc.attr? 'allow-uri-read'
+ unless doc.attr? 'allow-uri-read'
+ target = %(pass:c[#{target}]) if target.include? ' '
+ return replace_next_line %(link:#{target}[role=include])
+ end
if doc.attr? 'cache-uri'
# caching requires the open-uri-cached gem to be installed
# processing will be automatically aborted if these libraries can't be opened
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/rx.rb new/lib/asciidoctor/rx.rb
--- old/lib/asciidoctor/rx.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/rx.rb 2018-03-20 01:00:00.000000000 +0100
@@ -103,6 +103,7 @@
# }
# // end::try-catch[]
# NOTE m flag is required for Asciidoctor.js
+ # NOTE the regex checks for \r to account of include files that use Windows newlines
TagDirectiveRx = /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m
## Attribute entries and references
@@ -513,12 +514,17 @@
#
# https://github.com
# https://github.com[GitHub]
- # <https://github.com>
+ # <https://github.com> <= angle brackets not included in autolink
# link:https://github.com[]
# "https://github.com[]"
# (https://github.com) <= parenthesis not included in autolink
#
- InlineLinkRx = %r((^|link:|#{CG_BLANK}|<|[>\(\)\[\];"'])(\\?(?:https?|file|ftp|irc)://)(?:([^\s\[\]]+)\[(|#{CC_ALL}*?[^\\])\]|([^\s\[\]<]*([^\s,.?!\[\]<\)]))))m
+ if RUBY_ENGINE == 'opal'
+ # NOTE In JavaScript, a back reference succeeds if not set; invert the logic to give it a match to refute
+ InlineLinkRx = %r((^|link:|#{CG_BLANK}|\\?<(?=\\?(?:https?|file|ftp|irc)(:))|[>\(\)\[\];"'])(\\?(?:https?|file|ftp|irc)://)(?:([^\s\[\]]+)\[(|#{CC_ALL}*?[^\\])\]|(?!\2)([^\s]+?)>|([^\s\[\]<]*([^\s,.?!\[\]<\)]))))
+ else
+ InlineLinkRx = %r((^|link:|#{CG_BLANK}|\\?<()|[>\(\)\[\];"'])(\\?(?:https?|file|ftp|irc)://)(?:([^\s\[\]]+)\[(|#{CC_ALL}*?[^\\])\]|\2([^\s]+?)>|([^\s\[\]<]*([^\s,.?!\[\]<\)]))))m
+ end
# Match a link or e-mail inline macro.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/substitutors.rb new/lib/asciidoctor/substitutors.rb
--- old/lib/asciidoctor/substitutors.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/substitutors.rb 2018-03-20 01:00:00.000000000 +0100
@@ -445,7 +445,14 @@
# indexterm:[Tigers,Big cats]
if (attrlist = normalize_text $2, true, true).include? '='
if (primary = (attrs = (AttributeList.new attrlist, self).parse)[1])
- attrs['terms'] = [primary]
+ terms = [primary]
+ if (secondary = attrs[2])
+ terms << secondary
+ if (tertiary = attrs[3])
+ terms << tertiary
+ end
+ end
+ attrs['terms'] = terms
if (see_also = attrs['see-also'])
attrs['see-also'] = (see_also.include? ',') ? (see_also.split ',').map {|it| it.lstrip } : [see_also]
end
@@ -524,97 +531,100 @@
end
if found_colon && (text.include? '://')
- # inline urls, target[text] (optionally prefixed with link: and optionally surrounded by <>)
+ # inline urls, target[text] (optionally prefixed with link: or enclosed in <>)
text = text.gsub InlineLinkRx do
- if (target = $2 + ($3 || $5)).start_with? RS
- # honor the escape
- next ($&.slice 0, (rs_idx = $1.length)) + ($&.slice rs_idx + 1, $&.length)
- end
-
- prefix, suffix = $1, ''
- # NOTE if $4 is set, we're looking at a formal macro (e.g., https://example.org[])
- if $4
- prefix = '' if prefix == 'link:'
- link_text = nil if (link_text = $4).empty?
+ if $2 && !$5
+ # honor the escapes
+ next $&.slice 1, $&.length if $1.start_with? RS
+ next %(#{$1}#{$&.slice $1.length + 1, $&.length}) if $3.start_with? RS
+ next $& unless $6
+ doc.register :links, (target = $3 + $6)
+ link_text = (doc_attrs.key? 'hide-uri-scheme') ? (target.sub UriSniffRx, '') : target
+ (Inline.new self, :anchor, link_text, type: :link, target: target, attributes: { 'role' => 'bare' }).convert
else
- # invalid macro syntax (link: prefix w/o trailing square brackets or enclosed in double quotes)
- # FIXME we probably shouldn't even get here when the link: prefix is present; the regex is doing too much
- case prefix
- when 'link:', ?", ?'
- next $&
- end
- case $6
- when ';'
- if (prefix.start_with? '<') && (target.end_with? '>')
- # move surrounding <> out of URL
- prefix = prefix.slice 4, prefix.length
- target = target.slice 0, target.length - 4
- elsif (target = target.chop).end_with? ')'
- # move trailing ); out of URL
- target = target.chop
- suffix = ');'
- else
- # move trailing ; out of URL
- suffix = ';'
- end
- # NOTE handle case when modified target is a URI scheme (e.g., http://)
- next $& if target.end_with? '://'
- when ':'
- if (target = target.chop).end_with? ')'
- # move trailing ): out of URL
- target = target.chop
- suffix = '):'
- else
- # move trailing : out of URL
- suffix = ':'
+ # honor the escape
+ next %(#{$1}#{$&.slice $1.length + 1, $&.length}) if $3.start_with? RS
+ prefix, target, suffix = $1, $3 + ($4 || $7), ''
+ # NOTE if $5 is set (the attrlist), we're looking at a formal macro (e.g., https://example.org[])
+ if $5
+ prefix = '' if prefix == 'link:'
+ link_text = nil if (link_text = $5).empty?
+ else
+ case prefix
+ # invalid macro syntax (link: prefix w/o trailing square brackets or URL enclosed in quotes)
+ # FIXME we probably shouldn't even get here when the link: prefix is present; the regex is doing too much
+ when 'link:', ?", ?'
+ next $&
+ end
+ case $8
+ when ';'
+ if (target = target.chop).end_with? ')'
+ # move trailing ); out of URL
+ target = target.chop
+ suffix = ');'
+ else
+ # move trailing ; out of URL
+ suffix = ';'
+ end
+ # NOTE handle case when modified target is a bare URI scheme (e.g., http://)
+ next $& if target == $3
+ when ':'
+ if (target = target.chop).end_with? ')'
+ # move trailing ): out of URL
+ target = target.chop
+ suffix = '):'
+ else
+ # move trailing : out of URL
+ suffix = ':'
+ end
+ # NOTE handle case when modified target is a bare URI scheme (e.g., http://)
+ next $& if target == $3
end
- # NOTE handle case when modified target is a URI scheme (e.g., http://)
- next $& if target.end_with? '://'
end
- end
- attrs, link_opts = nil, { type: :link }
+ link_opts = { type: :link }
- if link_text
- new_link_text = link_text = link_text.gsub ESC_R_SB, R_SB if link_text.include? R_SB
- if !doc.compat_mode && (link_text.include? '=')
- # NOTE if an equals sign (=) is present, extract attributes from link text
- link_text, attrs = extract_attributes_from_text link_text, ''
- new_link_text = link_text
- link_opts[:id] = attrs['id']
- end
+ if link_text
+ new_link_text = link_text = link_text.gsub ESC_R_SB, R_SB if link_text.include? R_SB
+ if !doc.compat_mode && (link_text.include? '=')
+ # NOTE if an equals sign (=) is present, extract attributes from link text
+ link_text, attrs = extract_attributes_from_text link_text, ''
+ new_link_text = link_text
+ link_opts[:id] = attrs['id']
+ end
- if link_text.end_with? '^'
- new_link_text = link_text = link_text.chop
- if attrs
- attrs['window'] ||= '_blank'
- else
- attrs = { 'window' => '_blank' }
+ if link_text.end_with? '^'
+ new_link_text = link_text = link_text.chop
+ if attrs
+ attrs['window'] ||= '_blank'
+ else
+ attrs = { 'window' => '_blank' }
+ end
end
- end
- if new_link_text && new_link_text.empty?
- # NOTE it's not possible for the URI scheme to be bare in this case
+ if new_link_text && new_link_text.empty?
+ # NOTE the modified target will not be a bare URI scheme (e.g., http://) in this case
+ link_text = (doc_attrs.key? 'hide-uri-scheme') ? (target.sub UriSniffRx, '') : target
+ bare = true
+ end
+ else
+ # NOTE the modified target will not be a bare URI scheme (e.g., http://) in this case
link_text = (doc_attrs.key? 'hide-uri-scheme') ? (target.sub UriSniffRx, '') : target
bare = true
end
- else
- # NOTE it's not possible for the URI scheme to be bare in this case
- link_text = (doc_attrs.key? 'hide-uri-scheme') ? (target.sub UriSniffRx, '') : target
- bare = true
- end
- if bare
- if attrs
- attrs['role'] = (attrs.key? 'role') ? %(bare #{attrs['role']}) : 'bare'
- else
- attrs = { 'role' => 'bare' }
+ if bare
+ if attrs
+ attrs['role'] = (attrs.key? 'role') ? %(bare #{attrs['role']}) : 'bare'
+ else
+ attrs = { 'role' => 'bare' }
+ end
end
- end
- doc.register :links, (link_opts[:target] = target)
- link_opts[:attributes] = attrs if attrs
- %(#{prefix}#{(Inline.new self, :anchor, link_text, link_opts).convert}#{suffix})
+ doc.register :links, (link_opts[:target] = target)
+ link_opts[:attributes] = attrs if attrs
+ %(#{prefix}#{(Inline.new self, :anchor, link_text, link_opts).convert}#{suffix})
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/table.rb new/lib/asciidoctor/table.rb
--- old/lib/asciidoctor/table.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/table.rb 2018-03-20 01:00:00.000000000 +0100
@@ -300,7 +300,7 @@
# QUESTION is is faster to check for :: before splitting?
inner_document_lines = cell_text.split LF, -1
if (unprocessed_line1 = inner_document_lines[0]).include? '::'
- preprocessed_lines = (PreprocessorReader.new @document, [unprocessed_line1]).readlines
+ preprocessed_lines = (PreprocessorReader.new @document, [unprocessed_line1], inner_document_cursor).readlines
unless unprocessed_line1 == preprocessed_lines[0] && preprocessed_lines.size < 2
inner_document_lines.shift
inner_document_lines.unshift(*preprocessed_lines) unless preprocessed_lines.empty?
@@ -659,36 +659,43 @@
end
end
else
- # QUESTION is this right for cells that span columns?
- unless (column = @table.columns[@current_row.size])
- logger.error message_with_context 'dropping cell because it exceeds specified number of columns', source_location: @reader.cursor_before_mark
- return nil
- end
+ column = @table.columns[@current_row.size]
end
- cell = Table::Cell.new(column, cell_text, cellspec, cursor: @reader.cursor_before_mark)
+ cell = Table::Cell.new column, cell_text, cellspec, cursor: (cursor_before_mark = @reader.cursor_before_mark)
@reader.mark
unless !cell.rowspan || cell.rowspan == 1
activate_rowspan(cell.rowspan, (cell.colspan || 1))
end
@column_visits += (cell.colspan || 1)
@current_row << cell
- # don't close the row if we're on the first line and the column count has not been set explicitly
- # TODO perhaps the colcount/linenum logic should be in end_of_row? (or a should_end_row? method)
- close_row if end_of_row? && (@colcount != -1 || @linenum > 0 || (eol && i == repeat))
+ if (row_status = end_of_row?) > -1 && (@colcount != -1 || @linenum > 0 || (eol && i == repeat))
+ if row_status > 0
+ logger.error message_with_context 'dropping cell because it exceeds specified number of columns', source_location: cursor_before_mark
+ close_row true
+ else
+ close_row
+ end
+ end
end
@cell_open = false
nil
end
+ def close_table
+ return if @column_visits == 0
+ logger.error message_with_context 'dropping cells from incomplete row detected end of table', source_location: @reader.cursor_before_mark
+ nil
+ end
+
private
# Internal: Close the row by adding it to the Table and resetting the row
# Array and counter variables.
#
# returns nothing
- def close_row
- @table.rows.body << @current_row
+ def close_row drop = false
+ @table.rows.body << @current_row unless drop
# don't have to account for active rowspans here
# since we know this is first row
@colcount = @column_visits if @colcount == -1
@@ -709,8 +716,10 @@
end
# Internal: Check whether we've met the number of effective columns for the current row.
+ #
+ # returns -1 if not at end of row, 0 if exactly at end of row, and 1 if overruns end of row
def end_of_row?
- @colcount == -1 || effective_column_visits == @colcount
+ @colcount == -1 ? 0 : effective_column_visits <=> @colcount
end
# Internal: Calculate the effective column visits, which consists of the number of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor/version.rb new/lib/asciidoctor/version.rb
--- old/lib/asciidoctor/version.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/version.rb 2018-03-20 01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Asciidoctor
- VERSION = '2.0.20'
+ VERSION = '2.0.23'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/asciidoctor.rb new/lib/asciidoctor.rb
--- old/lib/asciidoctor.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor.rb 2018-03-20 01:00:00.000000000 +0100
@@ -6,7 +6,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'
@@ -209,13 +208,13 @@
BOM_BYTES_UTF_16BE = [0xfe, 0xff]
# The mode to use when opening a file for reading
- FILE_READ_MODE = RUBY_ENGINE_OPAL ? 'r' : 'rb:utf-8:utf-8'
+ FILE_READ_MODE = RUBY_ENGINE_OPAL ? 'r' : 'rb:UTF-8:UTF-8'
# The mode to use when opening a URI for reading
URI_READ_MODE = FILE_READ_MODE
# The mode to use when opening a file for writing
- FILE_WRITE_MODE = RUBY_ENGINE_OPAL ? 'w' : 'w:utf-8'
+ FILE_WRITE_MODE = RUBY_ENGINE_OPAL ? 'w' : 'wb:UTF-8'
# The default document type
# Can influence markup generated by the converters
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/asciidoctor.1 new/man/asciidoctor.1
--- old/man/asciidoctor.1 2018-03-20 01:00:00.000000000 +0100
+++ new/man/asciidoctor.1 2018-03-20 01:00:00.000000000 +0100
@@ -1,13 +1,13 @@
'\" t
.\" Title: asciidoctor
.\" Author: Dan Allen, Sarah White
-.\" Generator: Asciidoctor 2.0.19
+.\" Generator: Asciidoctor 2.0.22
.\" Date: 2018-03-20
.\" Manual: Asciidoctor Manual
-.\" Source: Asciidoctor 2.0.20
+.\" Source: Asciidoctor 2.0.23
.\" Language: English
.\"
-.TH "ASCIIDOCTOR" "1" "2018-03-20" "Asciidoctor 2.0.20" "Asciidoctor Manual"
+.TH "ASCIIDOCTOR" "1" "2018-03-20" "Asciidoctor 2.0.23" "Asciidoctor Manual"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/asciidoctor.adoc new/man/asciidoctor.adoc
--- old/man/asciidoctor.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/man/asciidoctor.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
= asciidoctor(1)
Dan Allen; Sarah White
:doctype: manpage
-:release-version: 2.0.20
+:release-version: 2.0.23
:man manual: Asciidoctor Manual
:man source: Asciidoctor {release-version}
ifdef::backend-manpage[:!author:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-03-20 01:00:00.000000000 +0100
+++ new/metadata 2018-03-20 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: asciidoctor
version: !ruby/object:Gem::Version
- version: 2.0.20
+ version: 2.0.23
platform: ruby
authors:
- Dan Allen
@@ -77,14 +77,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 5.14.0
+ version: 5.22.0
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 5.14.0
+ version: 5.22.0
- !ruby/object:Gem::Dependency
name: nokogiri
requirement: !ruby/object:Gem::Requirement
@@ -272,7 +272,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.4.10
+rubygems_version: 3.5.9
signing_key:
specification_version: 4
summary: An implementation of the AsciiDoc text processor and publishing toolchain
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package emacs for openSUSE:Factory checked in at 2024-06-24 20:50:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/emacs (Old)
and /work/SRC/openSUSE:Factory/.emacs.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "emacs"
Mon Jun 24 20:50:54 2024 rev:186 rq:1182997 version:29.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/emacs/emacs.changes 2024-04-11 19:40:43.820822218 +0200
+++ /work/SRC/openSUSE:Factory/.emacs.new.18349/emacs.changes 2024-06-24 20:51:52.605202196 +0200
@@ -1,0 +2,10 @@
+Mon Jun 24 09:34:03 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- Update to GNU Emacs version 29.4
+ * Emacs 29.4 is an emergency bugfix release intended to fix the
+ security vulnerability described below.
+ ** Arbitrary shell commands are no longer run when turning oncw
+ Org mode. This is for security reasons, to avoid running
+ malicious commands.
+
+-------------------------------------------------------------------
Old:
----
emacs-29.3-pdf.tar.xz
emacs-29.3.tar.xz
emacs-29.3.tar.xz.sig
New:
----
emacs-29.4-pdf.tar.xz
emacs-29.4.tar.xz
emacs-29.4.tar.xz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ emacs.spec ++++++
--- /var/tmp/diff_new_pack.ypKL0Q/_old 2024-06-24 20:51:53.925250448 +0200
+++ /var/tmp/diff_new_pack.ypKL0Q/_new 2024-06-24 20:51:53.925250448 +0200
@@ -154,7 +154,7 @@
BuildRequires: pkgconfig(xwayland)
BuildRequires: pkgconfig(xxf86vm)
URL: http://www.gnu.org/software/emacs/
-Version: 29.3
+Version: 29.4
Release: 0
Summary: GNU Emacs Base Package
License: GPL-3.0-or-later
++++++ emacs-29.3-pdf.tar.xz -> emacs-29.4-pdf.tar.xz ++++++
Binary files old/calccard.pdf and new/calccard.pdf differ
Binary files old/cs-dired-ref.pdf and new/cs-dired-ref.pdf differ
Binary files old/cs-refcard.pdf and new/cs-refcard.pdf differ
Binary files old/cs-survival.pdf and new/cs-survival.pdf differ
Binary files old/de-refcard.pdf and new/de-refcard.pdf differ
Binary files old/dired-ref.pdf and new/dired-ref.pdf differ
Binary files old/fr-dired-ref.pdf and new/fr-dired-ref.pdf differ
Binary files old/fr-refcard.pdf and new/fr-refcard.pdf differ
Binary files old/fr-survival.pdf and new/fr-survival.pdf differ
Binary files old/gnus-booklet.pdf and new/gnus-booklet.pdf differ
Binary files old/gnus-refcard.pdf and new/gnus-refcard.pdf differ
Binary files old/orgcard.pdf and new/orgcard.pdf differ
Binary files old/pl-refcard.pdf and new/pl-refcard.pdf differ
Binary files old/pt-br-refcard.pdf and new/pt-br-refcard.pdf differ
Binary files old/refcard.pdf and new/refcard.pdf differ
Binary files old/ru-refcard.pdf and new/ru-refcard.pdf differ
Binary files old/sk-dired-ref.pdf and new/sk-dired-ref.pdf differ
Binary files old/sk-refcard.pdf and new/sk-refcard.pdf differ
Binary files old/sk-survival.pdf and new/sk-survival.pdf differ
Binary files old/survival.pdf and new/survival.pdf differ
Binary files old/vipcard.pdf and new/vipcard.pdf differ
Binary files old/viperCard.pdf and new/viperCard.pdf differ
++++++ emacs-29.3-pdf.tar.xz -> emacs-29.4.tar.xz ++++++
/work/SRC/openSUSE:Factory/emacs/emacs-29.3-pdf.tar.xz /work/SRC/openSUSE:Factory/.emacs.new.18349/emacs-29.4.tar.xz differ: char 13, line 1
1
0