Compare commits

..

2 commits

Author SHA1 Message Date
Pavel Valena
202466882b Update to activesupport 6.0.3.4.
Resolves: rhbz#1886136
2020-10-13 16:03:57 +02:00
Pavel Valena
5627aa7ab6 Update to activesupport 6.0.3.3.
Disable test_filename_max_size

which is failing in koji.

Properly fix flaky `FileStoreTest#test_filename_max_size` test case.

Fix evaluator test from web-console.

https://github.com/rails/rails/issues/40196
https://github.com/rails/web-console/issues/301

Resolves: rhbz#1877502
2020-09-29 12:42:03 +02:00
12 changed files with 307 additions and 401 deletions

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
/activesupport-*.gem
/activesupport-*-tests.tar.gz
/activesupport-*-tests.txz
/rails-*-tools.txz

View file

@ -0,0 +1,42 @@
From 3fed62cfb1f43d8df5a5ff31229a5ad03264186e Mon Sep 17 00:00:00 2001
From: John Hawthorn <john@hawthorn.email>
Date: Fri, 17 Jan 2020 11:12:32 -0800
Subject: [PATCH] Reduce FILENAME_MAX_SIZE to accomodate large PIDs
The max size here is designed around Ruby's Dir::Tmpname.create which
creates temporary filenames in the format
$TIMESTAMP-$PID-$RANDOM
I believe the previous value of this field was based on the assumption
that PIDs are 1-65535, which isn't necessarily the case on 64 bit Linux
systems, which can be up to 2**22.
$ uname -a
Linux zergling 5.4.11-arch1-1 #1 SMP PREEMPT Sun, 12 Jan 2020 12:15:27 +0000 x86_64 GNU/Linux
$ cat /proc/sys/kernel/pid_max
4194304
I've chosen a new value based on what I believe the largest possible
tempname is:
255 - "20200117-4194304-#{0x100000000.to_s(36)}.lock".length #=> 226
(cherry picked from commit a98f330fb138fe4a78c270788218309849440026)
---
activesupport/lib/active_support/cache/file_store.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb
index cbce9d891533..8b248efd14de 100644
--- a/activesupport/lib/active_support/cache/file_store.rb
+++ b/activesupport/lib/active_support/cache/file_store.rb
@@ -16,7 +16,7 @@ class FileStore < Store
attr_reader :cache_path
DIR_FORMATTER = "%03X"
- FILENAME_MAX_SIZE = 228 # max filename size on file system is 255, minus room for timestamp and random characters appended by Tempfile (used by atomic write)
+ FILENAME_MAX_SIZE = 226 # max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write)
FILEPATH_MAX_SIZE = 900 # max is 1024, plus some room
GITKEEP_FILES = [".gitkeep", ".keep"].freeze

View file

@ -0,0 +1,28 @@
From 5611f4b430881bcfa788044ff3f42118370c61a2 Mon Sep 17 00:00:00 2001
From: Jonathan Hefner <jonathan@hefner.pro>
Date: Mon, 7 Sep 2020 16:44:21 -0500
Subject: [PATCH] Anchor BacktraceCleaner gem filter regexp
This ensures the default gem filter does not affect backtrace lines that
have a subpath incidentally matching a gem path.
Fixes #40196.
---
activesupport/test/clean_backtrace_test.rb | 6 ++++++
1 files changed, 6 insertions(+)
diff --git a/activesupport/test/clean_backtrace_test.rb b/activesupport/test/clean_backtrace_test.rb
index a846312d68f2..dd62ef359b73 100644
--- a/activesupport/test/clean_backtrace_test.rb
+++ b/activesupport/test/clean_backtrace_test.rb
@@ -124,4 +124,10 @@ def setup
result = @bc.clean(backtrace)
assert_empty result
end
+
+ test "should preserve lines that have a subpath matching a gem path" do
+ backtrace = [Gem.default_dir, *Gem.path].map { |path| "/parent#{path}/gems/nosuchgem-1.2.3/lib/foo.rb" }
+
+ assert_equal backtrace, @bc.clean(backtrace)
+ end
end

View file

@ -0,0 +1,26 @@
From 5611f4b430881bcfa788044ff3f42118370c61a2 Mon Sep 17 00:00:00 2001
From: Jonathan Hefner <jonathan@hefner.pro>
Date: Mon, 7 Sep 2020 16:44:21 -0500
Subject: [PATCH] Anchor BacktraceCleaner gem filter regexp
This ensures the default gem filter does not affect backtrace lines that
have a subpath incidentally matching a gem path.
Fixes #40196.
---
activesupport/lib/active_support/backtrace_cleaner.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletion(-)
diff --git a/activesupport/lib/active_support/backtrace_cleaner.rb b/activesupport/lib/active_support/backtrace_cleaner.rb
index ad80b8855f3f..405db9a6fe6c 100644
--- a/activesupport/lib/active_support/backtrace_cleaner.rb
+++ b/activesupport/lib/active_support/backtrace_cleaner.rb
@@ -91,7 +91,7 @@ def add_gem_filter
gems_paths = (Gem.path | [Gem.default_dir]).map { |p| Regexp.escape(p) }
return if gems_paths.empty?
- gems_regexp = %r{(#{gems_paths.join('|')})/(bundler/)?gems/([^/]+)-([\w.]+)/(.*)}
+ gems_regexp = %r{\A(#{gems_paths.join('|')})/(bundler/)?gems/([^/]+)-([\w.]+)/(.*)}
gems_result = '\3 (\4) \5'
add_filter { |line| line.sub(gems_regexp, gems_result) }
end

View file

@ -0,0 +1,24 @@
From e9425abe33924623b1dce62bd817eace757c2b4e Mon Sep 17 00:00:00 2001
From: Phil Ross <phil.ross@gmail.com>
Date: Fri, 29 Dec 2017 12:47:10 +0000
Subject: [PATCH] Update to TZInfo v2.0.0
Co-authored-by: Jared Beck <jared@jaredbeck.com>
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
---
time_zone_test.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 4b5f3dceee6f..646b9e1d3199 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -22,7 +29,7 @@ def test_local_to_utc
def test_period_for_local
zone = ActiveSupport::TimeZone["Eastern Time (US & Canada)"]
- assert_instance_of TZInfo::TimezonePeriod, zone.period_for_local(Time.utc(2000))
+ assert_kind_of TZInfo::TimezonePeriod, zone.period_for_local(Time.utc(2000))
end
ActiveSupport::TimeZone::MAPPING.each_key do |name|

View file

@ -0,0 +1,119 @@
From e9425abe33924623b1dce62bd817eace757c2b4e Mon Sep 17 00:00:00 2001
From: Phil Ross <phil.ross@gmail.com>
Date: Fri, 29 Dec 2017 12:47:10 +0000
Subject: [PATCH] Update to TZInfo v2.0.0
Co-authored-by: Jared Beck <jared@jaredbeck.com>
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
---
time_with_zone.rb | 20 +++++++++++++++-----
values/time_zone.rb | 14 ++++++--------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 3be5f6f7b595..9a4c33ab0f19 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -57,12 +57,12 @@ def initialize(utc_time, time_zone, local_time = nil, period = nil)
# Returns a <tt>Time</tt> instance that represents the time in +time_zone+.
def time
- @time ||= period.to_local(@utc)
+ @time ||= incorporate_utc_offset(@utc, utc_offset)
end
# Returns a <tt>Time</tt> instance of the simultaneous time in the UTC timezone.
def utc
- @utc ||= period.to_utc(@time)
+ @utc ||= incorporate_utc_offset(@time, -utc_offset)
end
alias_method :comparable_time, :utc
alias_method :getgm, :utc
@@ -104,13 +104,13 @@ def dst?
# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
# Time.zone.now.utc? # => false
def utc?
- period.offset.abbreviation == :UTC || period.offset.abbreviation == :UCT
+ zone == "UTC" || zone == "UCT"
end
alias_method :gmt?, :utc?
# Returns the offset from current time to UTC time in seconds.
def utc_offset
- period.utc_total_offset
+ period.observed_utc_offset
end
alias_method :gmt_offset, :utc_offset
alias_method :gmtoff, :utc_offset
@@ -132,7 +132,7 @@ def formatted_offset(colon = true, alternate_utc_string = nil)
# Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)"
# Time.zone.now.zone # => "EST"
def zone
- period.zone_identifier.to_s
+ period.abbreviation
end
# Returns a string of the object's date, time, zone, and offset from UTC.
@@ -524,6 +524,16 @@ def method_missing(sym, *args, &block)
end
private
+ SECONDS_PER_DAY = 86400
+
+ def incorporate_utc_offset(time, offset)
+ if time.kind_of?(Date)
+ time + Rational(offset, SECONDS_PER_DAY)
+ else
+ time + offset
+ end
+ end
+
def get_period_and_ensure_valid_local_time(period)
# we don't want a Time.local instance enforcing its own DST rules as well,
# so transfer time values to a utc constructor if necessary
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index 90830b89bda3..2e5d9d3e9d4c 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -203,7 +203,7 @@ def seconds_to_utc_offset(seconds, colon = true)
end
def find_tzinfo(name)
- TZInfo::Timezone.new(MAPPING[name] || name)
+ TZInfo::Timezone.get(MAPPING[name] || name)
end
alias_method :create, :new
@@ -273,7 +273,7 @@ def load_country_zones(code)
memo
end
else
- create(tz_id, nil, TZInfo::Timezone.new(tz_id))
+ create(tz_id, nil, TZInfo::Timezone.get(tz_id))
end
end.sort!
end
@@ -302,11 +302,7 @@ def initialize(name, utc_offset = nil, tzinfo = nil)
# Returns the offset of this time zone from UTC in seconds.
def utc_offset
- if @utc_offset
- @utc_offset
- else
- tzinfo.current_period.utc_offset if tzinfo && tzinfo.current_period
- end
+ @utc_offset || tzinfo&.current_period&.base_utc_offset
end
# Returns a formatted string of the offset from UTC, or an alternative
@@ -503,7 +499,9 @@ def yesterday
# represented by +self+. Returns a Time.utc() instance -- if you want an
# ActiveSupport::TimeWithZone instance, use Time#in_time_zone() instead.
def utc_to_local(time)
- tzinfo.utc_to_local(time)
+ tzinfo.utc_to_local(time).yield_self do |t|
+ Time.utc(t.year, t.month, t.day, t.hour, t.min, t.sec, t.sec_fraction)
+ end
end
# Adjust the given time to the simultaneous time in UTC. Returns a

View file

@ -1,24 +0,0 @@
From 283d96ea53f45eedf09a31bef739575df96e87df Mon Sep 17 00:00:00 2001
From: zzak <zzak@hey.com>
Date: Sun, 5 Oct 2025 10:31:09 +0900
Subject: [PATCH] Always pass default precision to BigDecimal when parsing
Float in XmlMini
https://github.com/ruby/bigdecimal/blob/cb2458bde33bf90a8364b58d53e8948a7ba555ea/ext/bigdecimal/bigdecimal.c#L2747-L2749
---
activesupport/lib/active_support/xml_mini.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb
index 2c2b8185b1b80..c6d7ce5b7c251 100644
--- a/activesupport/lib/active_support/xml_mini.rb
+++ b/activesupport/lib/active_support/xml_mini.rb
@@ -74,6 +74,8 @@ def content_type
"decimal" => Proc.new do |number|
if String === number
number.to_d
+ elsif Float === number
+ BigDecimal(number, 0)
else
BigDecimal(number)
end

View file

@ -1,12 +0,0 @@
--- activesupport-8.0.3/lib/active_support/testing/autorun.rb.orig 2025-12-30 16:47:16.780346179 +0900
+++ activesupport-8.0.3/lib/active_support/testing/autorun.rb 2025-12-30 16:52:01.482400639 +0900
@@ -8,5 +8,8 @@ require "minitest"
# used in some cases. This conditional can probably go after the bump
# is complete? ... but could still fail for developers working w/
# multiple versions installed.
-Minitest.load :rails if Minitest.respond_to? :load
+begin
+ Minitest.load :rails if Minitest.respond_to? :load
+rescue LoadError
+end
Minitest.autorun

View file

@ -1,129 +0,0 @@
From 9da4460ad0e71e5c3de32566ffbc302674b1f76e Mon Sep 17 00:00:00 2001
From: Ryan Davis <ryand-ruby@zenspider.com>
Date: Thu, 20 Nov 2025 12:50:33 -0800
Subject: [PATCH 1/5] MT6: Load rails plugin
---
activesupport/lib/active_support/testing/autorun.rb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/activesupport/lib/active_support/testing/autorun.rb b/activesupport/lib/active_support/testing/autorun.rb
index d5d5fc7ae8e45..068aac0b487e0 100644
--- a/activesupport/lib/active_support/testing/autorun.rb
+++ b/activesupport/lib/active_support/testing/autorun.rb
@@ -2,4 +2,11 @@
require "minitest"
+##
+# I shouldn't need this respond_to check but some tests are running
+# sub-process tests in an unbundled environment, causing MT5 to be
+# used in some cases. This conditional can probably go after the bump
+# is complete? ... but could still fail for developers working w/
+# multiple versions installed.
+Minitest.load :rails if Minitest.respond_to? :load
Minitest.autorun
From 831f0f96d0f9c132b28d3fa22ab82806115747b0 Mon Sep 17 00:00:00 2001
From: Ryan Davis <ryand-ruby@zenspider.com>
Date: Thu, 20 Nov 2025 14:16:51 -0800
Subject: [PATCH 3/5] MT6: implementation fixes
MT6 changes the way assertion messages work. Now, if a proc is passed
in for the message, it wins untouched. So for the rails assertions
that want to have diffs shown while calling assert_equal with a
message proc, the proc needs to call diff itself. This feels redundant
to me, but not my call.
And since the procs win now, they need to provide their own periods at
the end of the text.
---
activesupport/lib/active_support/testing/assertions.rb | 8 +++++---
.../lib/active_support/testing/parallelization/worker.rb | 6 +++++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb
index 178b5b350abba..4f2c6b105bc19 100644
--- a/activesupport/lib/active_support/testing/assertions.rb
+++ b/activesupport/lib/active_support/testing/assertions.rb
@@ -124,7 +124,8 @@ def assert_difference(expression, *args, &block)
actual = exp.call
rich_message = -> do
code_string = code.respond_to?(:call) ? _callable_to_source_string(code) : code
- error = "`#{code_string}` didn't change by #{diff}, but by #{actual - before_value}"
+ error = "`#{code_string}` didn't change by #{diff}, but by #{actual - before_value}."
+ error = "#{error}\n#{diff before_value + diff, actual}" if Minitest::VERSION > "6"
error = "#{message}.\n#{error}" if message
error
end
@@ -228,7 +229,7 @@ def assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &b
rich_message = -> do
code_string = expression.respond_to?(:call) ? _callable_to_source_string(expression) : expression
error = "`#{code_string}` didn't change"
- error = "#{error}. It was already #{to.inspect}" if before == to
+ error = "#{error}. It was already #{to.inspect}." if before == to
error = "#{message}.\n#{error}" if message
error
end
@@ -296,8 +297,9 @@ def assert_no_changes(expression, message = nil, from: UNTRACKED, &block)
rich_message = -> do
code_string = expression.respond_to?(:call) ? _callable_to_source_string(expression) : expression
- error = "`#{code_string}` changed"
+ error = "`#{code_string}` changed."
error = "#{message}.\n#{error}" if message
+ error = "#{error}\n#{diff before, after}" if Minitest::VERSION > "6"
error
end
diff --git a/activesupport/lib/active_support/testing/parallelization/worker.rb b/activesupport/lib/active_support/testing/parallelization/worker.rb
index d008277f8924c..daad6ce659103 100644
--- a/activesupport/lib/active_support/testing/parallelization/worker.rb
+++ b/activesupport/lib/active_support/testing/parallelization/worker.rb
@@ -49,7 +49,11 @@ def perform_job(job)
set_process_title("#{klass}##{method}")
result = klass.with_info_handler reporter do
- Minitest.run_one_method(klass, method)
+ if Minitest.respond_to?(:run_one_method) then
+ Minitest.run_one_method(klass, method)
+ else
+ klass.new(method).run
+ end
end
safe_record(reporter, result)
From 2c1ca03402de9a5bc4e482da739e39f5bd47f0b3 Mon Sep 17 00:00:00 2001
From: Ryan Davis <ryand-ruby@zenspider.com>
Date: Thu, 20 Nov 2025 15:34:55 -0800
Subject: [PATCH 4/5] MT6: test fixes
Mostly minor and mostly centered around whether there are diffs.
---
actionpack/test/dispatch/routing/route_set_test.rb | 4 ++--
activesupport/test/test_case_test.rb | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb
index 7e5084e4b041c..05ed8f2ae629d 100644
--- a/activesupport/test/test_case_test.rb
+++ b/activesupport/test/test_case_test.rb
@@ -243,7 +243,7 @@ def test_assert_changes_with_to_option_but_no_change_has_special_message
end
end
- assert_equal "`@object.num` didn't change. It was already 0.\nExpected 0 to not be equal to 0.", error.message
+ assert_match "`@object.num` didn't change. It was already 0.", error.message
end
def test_assert_changes_message_with_lambda
@@ -255,7 +255,7 @@ def test_assert_changes_message_with_lambda
end
end
- assert_equal "`@object.num` didn't change. It was already 0.\nExpected 0 to not be equal to 0.", error.message
+ assert_match "`@object.num` didn't change. It was already 0.", error.message
end
def test_assert_changes_with_wrong_to_option

View file

@ -1,70 +1,67 @@
%global gem_name activesupport
#%%global prerelease
#%%global prerelease .rc1
Name: rubygem-%{gem_name}
Epoch: 1
Version: 8.0.3
Release: 4%{?dist}
Version: 6.0.3.4
Release: 1%{?dist}
Summary: A support libraries and Ruby core extensions extracted from the Rails framework
License: MIT
URL: https://rubyonrails.org
URL: http://rubyonrails.org
Source0: https://rubygems.org/gems/%{gem_name}-%{version}%{?prerelease}.gem
# git clone http://github.com/rails/rails.git && cd rails/activesupport
# git archive -v -o activesupport-8.0.3-tests.tar.gz v8.0.3 test/
Source1: %{gem_name}-%{version}%{?prerelease}-tests.tar.gz
# This is needed due to `force_skip` alias.
# https://github.com/rails/rails/blob/main/tools/test_common.rb
Source2: https://raw.githubusercontent.com/rails/rails/e25d738430bdc6bdd04cd28be705484ea953e74e/tools/test_common.rb
# Fix XmlMiniTest::ParsingTest#test_decimal test failure with BigDecimal 3.2.3+
# https://github.com/rails/rails/pull/55840
Patch1: rubygem-activesupport-8.0.3-Always-pass-default-precision-to-BigDecimal-when-parsing.patch
# Support minitest 6
# https://github.com/rails/rails/pull/56202/
Patch2: rubygem-activesupport-pr56202-minitest6.patch
# We don't always install railties with activesupport, so rescue this
Patch3: rubygem-activesupport-pr56202-minitest6-rescue-loaderror.patch
# The activesupport gem doesn't ship with the test suite.
# You may check it out like so
# git clone http://github.com/rails/rails.git
# cd rails/activesupport && git archive -v -o activesupport-6.0.3.4-tests.txz v6.0.3.4 test/
Source1: %{gem_name}-%{version}%{?prerelease}-tests.txz
# The tools are needed for the test suite, are however unpackaged in gem file.
# You may get them like so
# git clone http://github.com/rails/rails.git --no-checkout
# cd rails && git archive -v -o rails-6.0.3.4-tools.txz v6.0.3.4 tools/
Source2: rails-%{version}%{?prerelease}-tools.txz
# Fix TZInfo 2.0 compatibility.
# https://github.com/rails/rails/pull/34799
# https://github.com/rails/rails/pull/38081
Patch1: rubygem-activesupport-6.1.0-Update-to-TZInfo-v2.0.0.patch
Patch2: rubygem-activesupport-6.1.0-Update-to-TZInfo-v2.0.0-tests.patch
# Fix flaky `FileStoreTest#test_filename_max_size` test.
# https://github.com/rails/rails/pull/40085
Patch3: rubygem-activesupport-6.0.4-Reduce-FILENAME_MAX_SIZE-to-accomodate-large-PIDs.patch
# Fix evaluator test from web-console.
# https://github.com/rails/rails/pull/40198
Patch4: rubygem-activesupport-6.1.0-Anchor-BacktraceCleaner-gem-filter-regexp.patch
Patch5: rubygem-activesupport-6.1.0-Anchor-BacktraceCleaner-gem-filter-regexp-test.patch
# Ruby package has just soft dependency on rubygem(json), while
# ActiveSupport always requires it.
# ruby package has just soft dependency on rubygem({bigdecimal,json}), while
# ActiveSupport always requires them.
Requires: rubygem(bigdecimal)
Requires: rubygem(json)
# Runtime dependency, lot of build failures in other packages.
# https://fedoraproject.org/wiki/Changes/AllowRemovalOfTzdata
Requires: tzdata
# Let's keep Requires and BuildRequires sorted alphabeticaly
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 3.2.0
BuildRequires: ruby >= 2.2.2
BuildRequires: rubygem(bigdecimal)
BuildRequires: rubygem(builder)
BuildRequires: rubygem(concurrent-ruby)
BuildRequires: rubygem(connection_pool)
BuildRequires: rubygem(dalli)
BuildRequires: rubygem(drb)
BuildRequires: rubygem(i18n) >= 0.7
BuildRequires: rubygem(listen)
BuildRequires: (rubygem(i18n) >= 0.7 with rubygem(i18n) < 2)
BuildRequires: rubygem(minitest) >= 5.0.0
BuildRequires: rubygem(minitest-mock)
BuildRequires: rubygem(msgpack)
BuildRequires: rubygem(rack)
BuildRequires: rubygem(tzinfo) >= 1.1
BuildRequires: rubygem(listen)
BuildRequires: rubygem(redis)
BuildRequires: rubygem(rexml)
BuildRequires: rubygem(tzinfo) >= 2.0
BuildRequires: memcached
%ifnarch %{ix86}
BuildRequires: %{_bindir}/valkey-server
%endif
BuildRequires: tzdata
BuildArch: noarch
%description
A toolkit of support libraries and Ruby core extensions extracted from the
Rails framework. Rich support for multibyte strings, internationalization,
time zones, and testing.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
@ -74,15 +71,19 @@ BuildArch: noarch
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}%{?prerelease} -a 1
%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2
%patch 1 -p2
%patch 2 -p2
%patch 3 -p1
%patch1 -p2
%patch3 -p2
%patch4 -p2
# lib/active_support/testing/method_call_assertions.rb
# always needs minitest/mock
%gemspec_add_dep -g minitest-mock
pushd %{_builddir}
%patch2 -p2
%patch5 -p2
popd
%gemspec_remove_dep -g tzinfo "~> 1.1"
%gemspec_add_dep -g tzinfo [">= 1.1", "< 3"]
%build
gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
@ -94,43 +95,34 @@ cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
# Move the tests into place
cp -a test .%{gem_instdir}
ln -s %{_builddir}/tools ..
mv %{_builddir}/test .
cd .%{gem_instdir}
# These tests are really unstable, but they seems to be passing upstream :/
for f in \
test/evented_file_update_checker_test.rb \
test/cache/stores/redis_cache_store_test.rb # failed to require "redis/connection/hiredis"
do
mv $f{,.disable}
done
mkdir ../tools
ln -s %{SOURCE2} ../tools/
touch ../tools/strict_warnings.rb
# This seems to be unstable as well ...
# https://github.com/rails/rails/issues/25682
sed -i '/def test_iso8601_output_and_reparsing$/,/^ end$/ s/^/#/' test/core_ext/duration_test.rb
sed -i '/require .bundler./ s/^/#/' test/abstract_unit.rb
# Workaround TransformValuesTest#test_default_procs_do_not_persist_*_mapping
# test failures due to bug in Ruby 2.7.{0,1}.
# https://bugs.ruby-lang.org/issues/16498
sed -i '/assert_nil mapped\[:b\]/ s/^/#/' test/core_ext/hash/transform_values_test.rb
# backported from:
# https://github.com/rails/rails/commit/632b2c5128581731c2451459081176a43f474f74
# benchmark 0.5.0 in ruby4_0 defines Benchmark.ms{}, so the following
# test is no longer needed
sed -i test/core_ext/benchmark_test.rb -e '\@test_is_deprecated@s@$@ ; skip ""@'
# Start a testing Valkey (Redis) server instance
%ifnarch %{ix86}
VALKEY_DIR=$(mktemp -d)
valkey-server --dir $VALKEY_DIR --pidfile $VALKEY_DIR/valkey.pid --daemonize yes
%endif
# Start Memcached server
memcached &
mPID=$!
sleep 1
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' -- -v
# Shutdown Memcached
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
kill -15 $mPID
# Shutdown Valkey.
%ifnarch %{ix86}
kill -INT $(cat $VALKEY_DIR/valkey.pid)
%endif
popd
%files
%dir %{gem_instdir}
@ -145,139 +137,6 @@ kill -INT $(cat $VALKEY_DIR/valkey.pid)
%doc %{gem_instdir}/README.rdoc
%changelog
* Tue Dec 30 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:8.0.3-4
- Update minitest 6 patch, and rescue when railties is not installed
* Mon Dec 29 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:8.0.3-3
- Backport upstream fix to support minitest 6
* Sun Nov 09 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:8.0.3-2
- Backport upstream change for testsuite removal for new benchmark gem in
ruby4_0
* Mon Oct 06 2025 Vít Ondruch <vondruch@redhat.com> - 1:8.0.3-1
- Update to Active Support 8.0.3.
Related: rhzb#2388437
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:8.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Jul 02 2025 Vít Ondruch <vondruch@redhat.com> - 1:8.0.2-1
- Update to Active Support 8.0.2.
Related: rhbz#2238177
* Thu Jan 23 2025 Vít Ondruch <vondruch@redhat.com> - 1:7.0.8-11
- Fix compatibility with concurrent-ruby 1.3.5+
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.8-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Nov 26 2024 Vít Ondruch <vondruch@redhat.com> - 1:7.0.8-9
- Add extracted standard gems dependencies.
* Mon Nov 04 2024 Vít Ondruch <vondruch@redhat.com> - 1:7.0.8-8
- Ruby 3.4 compatibility fixes.
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri May 24 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:7.0.8-6
- Backport upstream fix for test failure wrt ruby side
Object#dup behavior change
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Dec 15 2023 Vít Ondruch <vondruch@redhat.com> - 1:7.0.8-3
- Add explicit dependencies to avoid Ruby 3.3 warnings.
* Sun Sep 24 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.8-2
- Add tzdata as a runtime dependency.
* Sun Sep 10 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.8-1
- Update to activesupport 7.0.8.
* Mon Aug 28 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.7.2-1
- Update to activesupport 7.0.7.2.
* Thu Aug 10 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.7-1
- Update to activesupport 7.0.7.
* Sun Jul 23 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.6-1
- Update to activesupport 7.0.6.
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue May 30 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.5-1
- Update to activesupport 7.0.5.
* Tue Mar 14 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.4.3-1
- Update to activesupport 7.0.4.3.
* Wed Jan 25 2023 Pavel Valena <pvalena@redhat.com> - 1:7.0.4.2-1
- Update to activesupport 7.0.4.2.
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Dec 21 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:7.0.4-2
- Backport upstream fix for test failure with ruby3.2 wrt class_serial removal
* Thu Sep 15 2022 Pavel Valena <pvalena@redhat.com> - 1:7.0.4-1
- Update to activesupport 7.0.4.
* Tue Aug 02 2022 Vít Ondruch <vondruch@redhat.com> - 1:7.0.2.3-3
- Fix Minitest 5.16+ compatibility.
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.0.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Mar 14 2022 Pavel Valena <pvalena@redhat.com> - 1:7.0.2.3-1
- Update to activesupport 7.0.2.3.
* Wed Feb 09 2022 Pavel Valena <pvalena@redhat.com> - 1:7.0.2-1
- Update to activesupport 7.0.2.
* Thu Feb 03 2022 Pavel Valena <pvalena@redhat.com> - 1:7.0.1-1
- Update to activesupport 7.0.1.
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Sep 17 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.4.1-1
- Update to activesupport 6.1.4.1.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 30 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.4-1
- Update to activesupport 6.1.4.
* Tue May 18 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.3.2-1
- Update to activesupport 6.1.3.2.
* Fri Apr 09 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.3.1-1
- Update to activesupport 6.1.3.1.
* Thu Feb 18 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.3-1
- Update to activesupport 6.1.3.
* Mon Feb 15 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.2.1-1
- Update to activesupport 6.1.2.1.
* Wed Jan 27 2021 Pavel Valena <pvalena@redhat.com> - 1:6.1.1-1
- Update to activesupport 6.1.1.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.0.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 20 2021 Vít Ondruch <vondruch@redhat.com> - 1:6.0.3.4-2
- Fix FTBFS due to Ruby 3.0 update.
* Thu Oct 8 10:45:37 CEST 2020 Pavel Valena <pvalena@redhat.com> - 1:6.0.3.4-1
- Update to activesupport 6.0.3.4.
Resolves: rhbz#1886136
@ -285,17 +144,9 @@ kill -INT $(cat $VALKEY_DIR/valkey.pid)
* Fri Sep 18 17:58:30 CEST 2020 Pavel Valena <pvalena@redhat.com> - 1:6.0.3.3-1
- Update to activesupport 6.0.3.3.
Resolves: rhbz#1877502
* Thu Sep 10 08:42:03 GMT 2020 Vít Ondruch <vondruch@redhat.com> - 1:6.0.3.2-3
- Fix evaluator test from web-console.
* Tue Sep 01 2020 Vít Ondruch <vondruch@redhat.com> - 1:6.0.3.2-2
- Properly fix flaky `FileStoreTest#test_filename_max_size` test case.
* Mon Aug 17 04:41:17 GMT 2020 Pavel Valena <pvalena@redhat.com> - 1:6.0.3.2-1
- Update to activesupport 6.0.3.2.
Resolves: rhbz#1742797
* Mon Aug 03 07:01:37 GMT 2020 Pavel Valena <pvalena@redhat.com> - 6.0.3.1-1
- Update to ActiveSupport 6.0.3.1.
Resolves: rhbz#1742797

View file

@ -1,2 +1,3 @@
SHA512 (activesupport-8.0.3-tests.tar.gz) = d11560cc2246aaa16fcb7f213061cb6a355bd2e4bbc0cd3e0541db979aa90d28b738ceaf36935f49688953faf94314e2ae8da3e2f88436ac31c0a77a5804a91e
SHA512 (activesupport-8.0.3.gem) = f46b6710c65d7b59e0c7f1eb48641aa4ef0568b2d64147866e1dfa699c0b4c068bf443cc9967190ed47c2f6ea98137668a300455792982061e280a7df605bb4f
SHA512 (activesupport-6.0.3.4.gem) = 98668d420f2b3d207ae1513bf9736089b51becb3e9272d5f30e2ca616ee69ee47ce91e30f5e76ada7e9711f08d0acb513697686a7b83fa9582064c280c634117
SHA512 (activesupport-6.0.3.4-tests.txz) = 483cdb18696eb8e5a4a65e31e98256f0add1081800c8f7a85dede2a96ec8e42b5f6a5bf89e238cf46cc68435ec8e26031e364e13086ff9a1578d15b0eba08890
SHA512 (rails-6.0.3.4-tools.txz) = b40d90e55da9c31462bd21c62394198900aa42f161d30f8edd32f7217d904fbdd98d2cfba7c5d542d5b89578424669fcaffbe0006f6efd62cc676065100daac3

View file

@ -1,20 +0,0 @@
# frozen_string_literal: true
ActiveSupport::TestCase.alias_method :force_skip, :skip
if ENV["BUILDKITE"]
require "minitest-ci"
ENV.delete("CI") # CI has affect on the applications, and we don't want it applied to the apps.
Minitest::Ci.report_dir = File.join(__dir__, "../test-reports/#{ENV['BUILDKITE_JOB_ID']}")
module DisableSkipping # :nodoc:
private
def skip(message = nil, *)
flunk "Skipping tests is not allowed in this environment (#{message})\n" \
"Tests should only be skipped when the environment is missing a required dependency.\n" \
"This should never happen on CI."
end
end
ActiveSupport::TestCase.include(DisableSkipping)
end