Compare commits
No commits in common. "6751d9c6de171fa489d0ef5901dab9340a522582" and "d8ed297f23db3f04834640af54f2108c3e15a4a9" have entirely different histories.
6751d9c6de
...
d8ed297f23
@ -1,40 +0,0 @@
|
||||
From 770060d93a897cb5fb5108bb828b927fe6bb5353 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Boussier <jean.boussier@gmail.com>
|
||||
Date: Mon, 14 Aug 2023 11:20:43 +0200
|
||||
Subject: [PATCH] Handle non-string partial body in
|
||||
ActionView::CollectionCaching
|
||||
|
||||
Followup: https://github.com/rails/rails/pull/48645
|
||||
|
||||
Some template engines such as `jbuilder` use these Action View primitives
|
||||
with types other than strings, which breaks a bunch of assumptions.
|
||||
|
||||
I wish I could add a test for this, but this is deep in private methods
|
||||
I don't see a way to cover this.
|
||||
---
|
||||
.../renderer/partial_renderer/collection_caching.rb | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
|
||||
index d65d4c0cafaba..6ee720aa4896b 100644
|
||||
--- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
|
||||
+++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
|
||||
@@ -96,9 +96,16 @@ def fetch_or_cache_partial(cached_partials, template, order_by:)
|
||||
build_rendered_template(content, template)
|
||||
else
|
||||
rendered_partial = yield
|
||||
- if fragment = rendered_partial.body&.to_str
|
||||
- entries_to_write[cache_key] = fragment
|
||||
+ body = rendered_partial.body
|
||||
+
|
||||
+ # We want to cache buffers as raw strings. This both improve performance and
|
||||
+ # avoid creating forward compatibility issues with the internal representation
|
||||
+ # of these two types.
|
||||
+ if body.is_a?(ActionView::OutputBuffer) || body.is_a?(ActiveSupport::SafeBuffer)
|
||||
+ body = body.to_str
|
||||
end
|
||||
+
|
||||
+ entries_to_write[cache_key] = body
|
||||
rendered_partial
|
||||
end
|
||||
end
|
||||
BIN
actionview-5.2.4.4.gem
Normal file
BIN
actionview-5.2.4.4.gem
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
From 5bbce6fccc541b9941628cda4eda1f84c5a909ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 27 Apr 2017 15:18:56 +0200
|
||||
Subject: [PATCH] Prevent negative IDs in output of #inspect.
|
||||
|
||||
https://bugs.ruby-lang.org/issues/13397
|
||||
---
|
||||
actionview/lib/action_view/template/resolver.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb
|
||||
index d3905b5f23d5..7fdf04009a27 100644
|
||||
--- a/actionview/lib/action_view/template/resolver.rb
|
||||
+++ b/actionview/lib/action_view/template/resolver.rb
|
||||
@@ -56,7 +56,7 @@ def initialize
|
||||
end
|
||||
|
||||
def inspect
|
||||
- "#<#{self.class.name}:0x#{(object_id << 1).to_s(16)} keys=#{@data.size} queries=#{@query_cache.size}>"
|
||||
+ "#{to_s[0..-2]} keys=#{@data.size} queries=#{@query_cache.size}>"
|
||||
end
|
||||
|
||||
# Cache the templates returned by the block
|
||||
@ -1,156 +0,0 @@
|
||||
From 9766eb4a833c26c64012230b96dd1157ebb8e8a2 Mon Sep 17 00:00:00 2001
|
||||
From: eileencodes <eileencodes@gmail.com>
|
||||
Date: Wed, 15 Jun 2022 12:44:11 -0400
|
||||
Subject: [PATCH] Fix tests for minitest 5.16
|
||||
|
||||
In minitest/minitest@6e06ac9 minitest changed such that it now accepts
|
||||
`kwargs` instead of requiring kwargs to be shoved into the args array.
|
||||
This is a good change but required some updates to our test code to get
|
||||
the new version of minitest passing.
|
||||
|
||||
Changes are as follows:
|
||||
|
||||
1) Lock minitest to 5.15 for Ruby 2.7. We don't love this change but
|
||||
it's pretty difficult to get 2.7 and 3.0 to play nicely together with
|
||||
the new kwargs changes. Dropping 2.7 support isn't an option right
|
||||
now for Rails. This is safe because all of the code changes here are
|
||||
internal methods to Rails like assert_called_with. Applications
|
||||
shouldn't be consuming them as they are no-doc'd.
|
||||
2) Update the `assert_called_with` method to take any kwargs but also
|
||||
the returns kwarg.
|
||||
3) Update callers of `assert_called_with` to move the kwargs outside the
|
||||
args array.
|
||||
4) Update the message from marshaled exceptions. In 5.16 the exception
|
||||
message is "result not reported" instead of "Wrapped undumpable
|
||||
exception".
|
||||
|
||||
Co-authored-by: Matthew Draper <matthew@trebex.net>
|
||||
---
|
||||
.../test/template/date_helper_i18n_test.rb | 18 +--
|
||||
.../template/form_helper/form_with_test.rb | 2 +-
|
||||
actionview/test/template/form_helper_test.rb | 2 +-
|
||||
.../template/form_options_helper_i18n_test.rb | 2 +-
|
||||
.../test/template/translation_helper_test.rb | 2 +-
|
||||
16 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/actionview/test/template/date_helper_i18n_test.rb b/actionview/test/template/date_helper_i18n_test.rb
|
||||
index 2f098e2f5158f..819d0d0ac206b 100644
|
||||
--- a/actionview/test/template/date_helper_i18n_test.rb
|
||||
+++ b/actionview/test/template/date_helper_i18n_test.rb
|
||||
@@ -49,7 +49,7 @@ def test_distance_of_time_in_words_calls_i18n_with_custom_scope
|
||||
end
|
||||
|
||||
def test_time_ago_in_words_passes_locale
|
||||
- assert_called_with(I18n, :t, [:less_than_x_minutes, scope: :'datetime.distance_in_words', count: 1, locale: "ru"]) do
|
||||
+ assert_called_with(I18n, :t, [:less_than_x_minutes], scope: :'datetime.distance_in_words', count: 1, locale: "ru") do
|
||||
time_ago_in_words(15.seconds.ago, locale: "ru")
|
||||
end
|
||||
end
|
||||
@@ -84,7 +84,7 @@ def assert_distance_of_time_in_words_translates_key(passed, expected, expected_o
|
||||
options = { locale: "en", scope: :'datetime.distance_in_words' }.merge!(expected_options)
|
||||
options[:count] = count if count
|
||||
|
||||
- assert_called_with(I18n, :t, [key, options]) do
|
||||
+ assert_called_with(I18n, :t, [key], **options) do
|
||||
distance_of_time_in_words(@from, to, passed_options.merge(locale: "en"))
|
||||
end
|
||||
end
|
||||
@@ -103,13 +103,13 @@ def test_select_month_given_use_month_names_option_does_not_translate_monthnames
|
||||
end
|
||||
|
||||
def test_select_month_translates_monthnames
|
||||
- assert_called_with(I18n, :translate, [:'date.month_names', locale: "en"], returns: Date::MONTHNAMES) do
|
||||
+ assert_called_with(I18n, :translate, [:'date.month_names'], returns: Date::MONTHNAMES, locale: "en") do
|
||||
select_month(8, locale: "en")
|
||||
end
|
||||
end
|
||||
|
||||
def test_select_month_given_use_short_month_option_translates_abbr_monthnames
|
||||
- assert_called_with(I18n, :translate, [:'date.abbr_month_names', locale: "en"], returns: Date::ABBR_MONTHNAMES) do
|
||||
+ assert_called_with(I18n, :translate, [:'date.abbr_month_names'], returns: Date::ABBR_MONTHNAMES, locale: "en") do
|
||||
select_month(8, locale: "en", use_short_month: true)
|
||||
end
|
||||
end
|
||||
@@ -147,8 +147,8 @@ def test_date_or_time_select_given_an_order_options_does_not_translate_order
|
||||
|
||||
def test_date_or_time_select_given_no_order_options_translates_order
|
||||
mock = Minitest::Mock.new
|
||||
- mock.expect(:call, ["year", "month", "day"], [:'date.order', { locale: "en", default: [] }])
|
||||
- mock.expect(:call, [], [:'date.month_names', { locale: "en" }])
|
||||
+ expect_called_with(mock, [:'date.order'], locale: "en", default: [], returns: ["year", "month", "day"])
|
||||
+ expect_called_with(mock, [:'date.month_names'], locale: "en", returns: [])
|
||||
|
||||
I18n.stub(:translate, mock) do
|
||||
datetime_select("post", "updated_at", locale: "en")
|
||||
@@ -158,7 +158,7 @@ def test_date_or_time_select_given_no_order_options_translates_order
|
||||
end
|
||||
|
||||
def test_date_or_time_select_given_invalid_order
|
||||
- assert_called_with(I18n, :translate, [:'date.order', locale: "en", default: []], returns: %w(invalid month day)) do
|
||||
+ assert_called_with(I18n, :translate, [:'date.order'], returns: %w(invalid month day), locale: "en", default: []) do
|
||||
assert_raise StandardError do
|
||||
datetime_select("post", "updated_at", locale: "en")
|
||||
end
|
||||
@@ -167,8 +167,8 @@ def test_date_or_time_select_given_invalid_order
|
||||
|
||||
def test_date_or_time_select_given_symbol_keys
|
||||
mock = Minitest::Mock.new
|
||||
- mock.expect(:call, [:year, :month, :day], [:'date.order', { locale: "en", default: [] }])
|
||||
- mock.expect(:call, [], [:'date.month_names', { locale: "en" }])
|
||||
+ expect_called_with(mock, [:'date.order'], locale: "en", default: [], returns: [:year, :month, :day])
|
||||
+ expect_called_with(mock, [:'date.month_names'], locale: "en", returns: [])
|
||||
|
||||
I18n.stub(:translate, mock) do
|
||||
datetime_select("post", "updated_at", locale: "en")
|
||||
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb
|
||||
index 00e6ca42ea473..b3d6d59cd3afa 100644
|
||||
--- a/actionview/test/template/form_helper/form_with_test.rb
|
||||
+++ b/actionview/test/template/form_helper/form_with_test.rb
|
||||
@@ -1747,7 +1747,7 @@ def test_nested_fields_label_translation_with_more_than_10_records
|
||||
|
||||
mock = Minitest::Mock.new
|
||||
@post.comments.each do
|
||||
- mock.expect(:call, "body", ["post.comments.body", default: [:"comment.body", ""], scope: "helpers.label"])
|
||||
+ expect_called_with(mock, ["post.comments.body"], default: [:"comment.body", ""], scope: "helpers.label", returns: "body")
|
||||
end
|
||||
|
||||
I18n.stub(:t, mock) do
|
||||
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
|
||||
index 8560be2770ca4..d8924d3e65004 100644
|
||||
--- a/actionview/test/template/form_helper_test.rb
|
||||
+++ b/actionview/test/template/form_helper_test.rb
|
||||
@@ -3269,7 +3269,7 @@ def test_nested_fields_label_translation_with_more_than_10_records
|
||||
|
||||
mock = Minitest::Mock.new
|
||||
@post.comments.each do
|
||||
- mock.expect(:call, "body", ["post.comments.body", default: [:"comment.body", ""], scope: "helpers.label"])
|
||||
+ expect_called_with(mock, ["post.comments.body"], default: [:"comment.body", ""], scope: "helpers.label", returns: "body")
|
||||
end
|
||||
|
||||
I18n.stub(:t, mock) do
|
||||
diff --git a/actionview/test/template/form_options_helper_i18n_test.rb b/actionview/test/template/form_options_helper_i18n_test.rb
|
||||
index 21295fa547d8e..3dc625b8ac1df 100644
|
||||
--- a/actionview/test/template/form_options_helper_i18n_test.rb
|
||||
+++ b/actionview/test/template/form_options_helper_i18n_test.rb
|
||||
@@ -16,7 +16,7 @@ def teardown
|
||||
end
|
||||
|
||||
def test_select_with_prompt_true_translates_prompt_message
|
||||
- assert_called_with(I18n, :translate, ["helpers.select.prompt", { default: "Please select" }]) do
|
||||
+ assert_called_with(I18n, :translate, ["helpers.select.prompt"], default: "Please select") do
|
||||
select("post", "category", [], prompt: true)
|
||||
end
|
||||
end
|
||||
diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb
|
||||
index 9ed034113d0fb..b9da9174a517a 100644
|
||||
--- a/actionview/test/template/translation_helper_test.rb
|
||||
+++ b/actionview/test/template/translation_helper_test.rb
|
||||
@@ -65,7 +65,7 @@ def test_delegates_setting_to_i18n
|
||||
|
||||
def test_delegates_localize_to_i18n
|
||||
@time = Time.utc(2008, 7, 8, 12, 18, 38)
|
||||
- assert_called_with(I18n, :localize, [@time, locale: "en"]) do
|
||||
+ assert_called_with(I18n, :localize, [@time], locale: "en") do
|
||||
localize @time, locale: "en"
|
||||
end
|
||||
assert_equal "Tue, 08 Jul 2008 12:18:38 +0000", localize(@time, locale: "en")
|
||||
@ -1,114 +0,0 @@
|
||||
From df0de681dc1873534ecd2fc8371e1f2562984b68 Mon Sep 17 00:00:00 2001
|
||||
From: John Crepezzi <john.crepezzi@gmail.com>
|
||||
Date: Thu, 16 Jun 2022 08:34:05 -0400
|
||||
Subject: [PATCH] Remove the multi-call form of assert_called_with
|
||||
|
||||
The `assert_called_with` helper allows passing a multi-dimensional array to
|
||||
mock multiple calls to the same method for a given block. This works
|
||||
fine now, but when adding support for real kwargs arguments to line up with
|
||||
recent upgrades in Minitest, this approach is no longer workable because
|
||||
we can't pass multiple sets of differing kwargs.
|
||||
|
||||
Rather than complicated this method further, this commit removes the
|
||||
multi-call form of `assert_called_with` and modifies the tests that
|
||||
currently make use of that functionality to just use the underlying
|
||||
`Minitest::Mock` calls.
|
||||
|
||||
Co-authored-by: Eileen M. Uchitelle <eileencodes@gmail.com>
|
||||
---
|
||||
.../test/template/date_helper_i18n_test.rb | 16 +++-
|
||||
.../template/form_helper/form_with_test.rb | 10 ++-
|
||||
actionview/test/template/form_helper_test.rb | 10 ++-
|
||||
3 files changed, 30 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/actionview/test/template/date_helper_i18n_test.rb b/actionview/test/template/date_helper_i18n_test.rb
|
||||
index f100a011a83f7..2f098e2f5158f 100644
|
||||
--- a/actionview/test/template/date_helper_i18n_test.rb
|
||||
+++ b/actionview/test/template/date_helper_i18n_test.rb
|
||||
@@ -146,9 +146,15 @@ def test_date_or_time_select_given_an_order_options_does_not_translate_order
|
||||
end
|
||||
|
||||
def test_date_or_time_select_given_no_order_options_translates_order
|
||||
- assert_called_with(I18n, :translate, [ [:'date.order', locale: "en", default: []], [:"date.month_names", { locale: "en" }] ], returns: %w(year month day)) do
|
||||
+ mock = Minitest::Mock.new
|
||||
+ mock.expect(:call, ["year", "month", "day"], [:'date.order', { locale: "en", default: [] }])
|
||||
+ mock.expect(:call, [], [:'date.month_names', { locale: "en" }])
|
||||
+
|
||||
+ I18n.stub(:translate, mock) do
|
||||
datetime_select("post", "updated_at", locale: "en")
|
||||
end
|
||||
+
|
||||
+ assert_mock(mock)
|
||||
end
|
||||
|
||||
def test_date_or_time_select_given_invalid_order
|
||||
@@ -160,8 +166,14 @@ def test_date_or_time_select_given_invalid_order
|
||||
end
|
||||
|
||||
def test_date_or_time_select_given_symbol_keys
|
||||
- assert_called_with(I18n, :translate, [ [:'date.order', locale: "en", default: []], [:"date.month_names", { locale: "en" }] ], returns: [:year, :month, :day]) do
|
||||
+ mock = Minitest::Mock.new
|
||||
+ mock.expect(:call, [:year, :month, :day], [:'date.order', { locale: "en", default: [] }])
|
||||
+ mock.expect(:call, [], [:'date.month_names', { locale: "en" }])
|
||||
+
|
||||
+ I18n.stub(:translate, mock) do
|
||||
datetime_select("post", "updated_at", locale: "en")
|
||||
end
|
||||
+
|
||||
+ assert_mock(mock)
|
||||
end
|
||||
end
|
||||
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb
|
||||
index eadddc15002ee..00e6ca42ea473 100644
|
||||
--- a/actionview/test/template/form_helper/form_with_test.rb
|
||||
+++ b/actionview/test/template/form_helper/form_with_test.rb
|
||||
@@ -1745,14 +1745,20 @@ def test_nested_fields_arel_like
|
||||
def test_nested_fields_label_translation_with_more_than_10_records
|
||||
@post.comments = Array.new(11) { |id| Comment.new(id + 1) }
|
||||
|
||||
- params = 11.times.map { ["post.comments.body", default: [:"comment.body", ""], scope: "helpers.label"] }
|
||||
- assert_called_with(I18n, :t, params, returns: "Write body here") do
|
||||
+ mock = Minitest::Mock.new
|
||||
+ @post.comments.each do
|
||||
+ mock.expect(:call, "body", ["post.comments.body", default: [:"comment.body", ""], scope: "helpers.label"])
|
||||
+ end
|
||||
+
|
||||
+ I18n.stub(:t, mock) do
|
||||
form_with(model: @post) do |f|
|
||||
f.fields(:comments) do |cf|
|
||||
concat cf.label(:body)
|
||||
end
|
||||
end
|
||||
end
|
||||
+
|
||||
+ assert_mock(mock)
|
||||
end
|
||||
|
||||
def test_nested_fields_with_existing_records_on_a_supplied_nested_attributes_collection_different_from_record_one
|
||||
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
|
||||
index d08f00cd36c35..8560be2770ca4 100644
|
||||
--- a/actionview/test/template/form_helper_test.rb
|
||||
+++ b/actionview/test/template/form_helper_test.rb
|
||||
@@ -3267,14 +3267,20 @@ def test_nested_fields_for_arel_like
|
||||
def test_nested_fields_label_translation_with_more_than_10_records
|
||||
@post.comments = Array.new(11) { |id| Comment.new(id + 1) }
|
||||
|
||||
- params = 11.times.map { ["post.comments.body", default: [:"comment.body", ""], scope: "helpers.label"] }
|
||||
- assert_called_with(I18n, :t, params, returns: "Write body here") do
|
||||
+ mock = Minitest::Mock.new
|
||||
+ @post.comments.each do
|
||||
+ mock.expect(:call, "body", ["post.comments.body", default: [:"comment.body", ""], scope: "helpers.label"])
|
||||
+ end
|
||||
+
|
||||
+ I18n.stub(:t, mock) do
|
||||
form_for(@post) do |f|
|
||||
f.fields_for(:comments) do |cf|
|
||||
concat cf.label(:body)
|
||||
end
|
||||
end
|
||||
end
|
||||
+
|
||||
+ assert_mock(mock)
|
||||
end
|
||||
|
||||
def test_nested_fields_for_with_existing_records_on_a_supplied_nested_attributes_collection_different_from_record_one
|
||||
@ -1,88 +1,55 @@
|
||||
%global gem_name actionview
|
||||
%bcond_with bootstrap
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 7.0.7
|
||||
Release: 1
|
||||
Summary: Rendering framework putting the V in MVC (part of Rails)
|
||||
License: MIT
|
||||
URL: http://rubyonrails.org
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
# The 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/actionview && git archive -v -o actionview-7.0.7-tests.txz v7.0.7 test/
|
||||
Source1: %{gem_name}-%{version}-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-7.0.7-tools.txz v7.0.7 tools/
|
||||
Source2: rails-%{version}-tools.txz
|
||||
# Fixes for Minitest 5.16+
|
||||
# https://github.com/rails/rails/pull/45380
|
||||
Patch0: rubygem-actionview-7.0.2.3-Remove-the-multi-call-form-of-assert_called_with.patch
|
||||
# https://github.com/rails/rails/pull/45370
|
||||
Patch1: rubygem-actionview-7.0.2.3-Fix-tests-for-minitest-5.16.patch
|
||||
# https://github.com/rails/rails/commit/770060d93a897cb5fb5108bb828b927fe6bb5353
|
||||
Patch2: Handle-non-string-partial-body-in-ActionView-Collect.patch
|
||||
|
||||
BuildRequires: ruby(release)
|
||||
BuildRequires: rubygems-devel rubygem(did_you_mean)
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: rubygem(activesupport) = %{version}
|
||||
BuildRequires: rubygem(activerecord) = %{version}
|
||||
BuildRequires: rubygem(actionpack) = %{version}
|
||||
BuildRequires: rubygem(railties) = %{version}
|
||||
BuildRequires: rubygem(sqlite3)
|
||||
%global gem_name actionview
|
||||
%{?_with_bootstrap: %global bootstrap 1}
|
||||
%global bootstrap 1
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 5.2.4.4
|
||||
Release: 2
|
||||
Summary: Rendering framework putting the V in MVC (part of Rails)
|
||||
License: MIT
|
||||
URL: http://rubyonrails.org
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: https://github.com/rails/rails/archive/v5.2.4.4.tar.gz
|
||||
Patch0: rubygem-actionview-5.1.2-Prevent-negative-IDs-in-output-of-inspect.patch
|
||||
BuildRequires: ruby(release) rubygems-devel
|
||||
%if ! 0%{?bootstrap}
|
||||
BuildRequires: rubygem(activesupport) = %{version} rubygem(activerecord) = %{version}
|
||||
BuildRequires: rubygem(actionpack) = %{version} rubygem(railties) = %{version}
|
||||
BuildRequires: rubygem(sqlite3)
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
BuildArch: noarch
|
||||
%description
|
||||
Simple, battle-tested conventions and helpers for building web pages.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{gem_name}-%{version} -b1 -b2
|
||||
%patch2 -p2
|
||||
|
||||
pushd %{_builddir}
|
||||
%setup -q -c -T
|
||||
%gem_install -n %{SOURCE0}
|
||||
pushd .%{gem_instdir}
|
||||
%patch0 -p2
|
||||
%patch1 -p2
|
||||
popd
|
||||
|
||||
%build
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -pa .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
%if ! 0%{?bootstrap}
|
||||
|
||||
%if %{without bootstrap}
|
||||
%check
|
||||
ln -s %{gem_dir}/gems/activerecord-%{version}/ .%{gem_dir}/gems/activerecord
|
||||
|
||||
pushd .%{gem_instdir}
|
||||
ln -s %{_builddir}/tools ..
|
||||
mv %{_builddir}/test .
|
||||
|
||||
# Test failure
|
||||
# https://github.com/rails/rails/issues/46130
|
||||
mv test/template/date_helper_i18n_test.rb{,.disable}
|
||||
|
||||
find test -type f -name '*_test.rb' -print0 | \
|
||||
sort -z | \
|
||||
xargs -0 -n1 -i sh -c "echo '* Test file: {}'; ruby -Itest -- '{}' || exit 255"
|
||||
|
||||
tar xzvf %{SOURCE1} -C .
|
||||
cd rails-%{version}/%{gem_name}
|
||||
for t in {actionpack,activerecord,template}; do
|
||||
ruby -Ilib:test -e "Dir.glob('./test/$t/**/*_test.rb').each {|t| require t}"
|
||||
done
|
||||
popd
|
||||
%endif
|
||||
|
||||
@ -99,15 +66,6 @@ popd
|
||||
%doc %{gem_instdir}/CHANGELOG.md
|
||||
|
||||
%changelog
|
||||
* Thu Aug 17 2023 wulei <wu_lei@hoperun.com> - 7.0.7-1
|
||||
- Upgrade to version 7.0.7
|
||||
|
||||
* Thu Jan 19 2023 yanxiaobing <yanxiaobing@huawei.com> - 7.0.4-1
|
||||
- Upgrade to version 7.0.4
|
||||
|
||||
* Mon May 02 2022 wangkerong <wangkerong@h-partners.com>- 6.1.4.1-1
|
||||
- Upgrade to 6.1.4.1
|
||||
|
||||
* Wed Aug 04 2021 wangyue <wangyue92@huawei.com> - 5.2.4.4-2
|
||||
- revert to 5.2.4.4
|
||||
|
||||
@ -117,7 +75,7 @@ popd
|
||||
* Mon Jun 07 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 6.0.3.4-1
|
||||
- Update to 6.0.3.4
|
||||
|
||||
* Mon Feb 8 2021 sunguoshuai<sunguoshuai@huawei.com>- 5.2.4.4-1
|
||||
* Mon Feb 8 2021sunguoshuai<sunguoshuai@huawei.com>- 5.2.4.4-1
|
||||
- Upgrade to 5.2.4.4
|
||||
|
||||
* Sat Aug 8 2020 chengzihan <chengzihan2@huawei.com> - 5.2.3-1
|
||||
|
||||
BIN
v5.2.4.4.tar.gz
Normal file
BIN
v5.2.4.4.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user