diff --git a/Fix-Action-View-deprecation-warning.patch b/Fix-Action-View-deprecation-warning.patch deleted file mode 100644 index a39430357d0b353fafd2c89ad5cd332ad3868b65..0000000000000000000000000000000000000000 --- a/Fix-Action-View-deprecation-warning.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fc1badb817ef9191efb7c26c606a6a8fb66c540b Mon Sep 17 00:00:00 2001 -From: Andrew White -Date: Sat, 12 Sep 2020 06:47:40 +0100 -Subject: [PATCH] Fix Action View deprecation warning - -Rails 6.0+ prints a deprecation warning when calling -ActionView::Base.new without a lookup context. ---- - test/test_helper.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/test_helper.rb b/test/test_helper.rb -index 4422e4c..82876ec 100644 ---- a/test/test_helper.rb -+++ b/test/test_helper.rb -@@ -20,7 +20,7 @@ class HelperTest < ActionView::TestCase - tmp = File.expand_path("../../tmp", __FILE__) - @manifest = Sprockets::Manifest.new(@assets, tmp) - -- @view = ActionView::Base.new -+ @view = ActionView::Base.new(ActionView::LookupContext.new([])) - @view.extend ::Sprockets::Rails::Helper - @view.assets_environment = @assets - @view.assets_manifest = @manifest --- -2.33.0 - diff --git a/Fix-extending-ActionView-Base-instances.patch b/Fix-extending-ActionView-Base-instances.patch deleted file mode 100644 index 4494e6b3e76437076894cd2f0d4c18aa5f75439f..0000000000000000000000000000000000000000 --- a/Fix-extending-ActionView-Base-instances.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 66fd4ab6f2bd7b8e6a34331460fe2e8dc46143d7 Mon Sep 17 00:00:00 2001 -From: Andrew White -Date: Sat, 12 Sep 2020 06:50:53 +0100 -Subject: [PATCH] Fix extending ActionView::Base instances - -In rails/rails@1165401 the Active Support core extension for -Kernel#class_eval was removed so we need to call it on the -singleton_klass ourselves. ---- - lib/sprockets/rails/helper.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/sprockets/rails/helper.rb b/lib/sprockets/rails/helper.rb -index 20cc4d3..ee7c5f3 100644 ---- a/lib/sprockets/rails/helper.rb -+++ b/lib/sprockets/rails/helper.rb -@@ -58,7 +58,7 @@ module Sprockets - end - - def self.extended(obj) -- obj.class_eval do -+ obj.singleton_class.class_eval do - attr_accessor(*VIEW_ACCESSORS) - - remove_method :assets_environment --- -2.33.0 - diff --git a/Fixes-build-for-Gemfile-rails-7-by-adding-a-new-meth.patch b/Fixes-build-for-Gemfile-rails-7-by-adding-a-new-meth.patch deleted file mode 100644 index ecc214de32bb71d250f513dcbf2e5e42f3ef3bc1..0000000000000000000000000000000000000000 --- a/Fixes-build-for-Gemfile-rails-7-by-adding-a-new-meth.patch +++ /dev/null @@ -1,376 +0,0 @@ -From 5fb466da6421daef086f1720e7961e348f5ce7c1 Mon Sep 17 00:00:00 2001 -From: Haroon Ahmed -Date: Sat, 19 Jun 2021 13:22:38 +0100 -Subject: [PATCH] Fixes build for Gemfile, rails 7 by adding a new method that - checks the rails version and appends media="screen" to the assertions. The - setting config.action_view.apply_stylesheet_media_default = true was added in - rails 7. - -The method signature for ActionView::Base.new requires a couple of extra params which was also needed to get the build to pass. ---- - Gemfile | 2 +- - test/test_helper.rb | 121 ++++++++++++++++++++++--------------------- - test/test_railtie.rb | 13 +++-- - 3 files changed, 73 insertions(+), 63 deletions(-) - -diff --git a/Gemfile b/Gemfile -index ac05301..113771b 100644 ---- a/Gemfile -+++ b/Gemfile -@@ -3,5 +3,5 @@ gemspec - - gem 'actionpack', github: 'rails/rails', branch: 'master' - gem 'railties', github: 'rails/rails', branch: 'master' --gem 'rack', github: 'rack/rack', branch: 'master' -+gem 'rack', github: 'rack/rack', branch: 'master', ref: "e84bb296d1a16b32159608596f1f5a23b2016633" - gem 'sprockets', github: 'rails/sprockets', branch: '3.x' -diff --git a/test/test_helper.rb b/test/test_helper.rb -index 138a527..9845f25 100644 ---- a/test/test_helper.rb -+++ b/test/test_helper.rb -@@ -7,6 +7,12 @@ require 'sprockets/rails/helper' - - ActiveSupport::TestCase.test_order = :random if ActiveSupport::TestCase.respond_to?(:test_order=) - -+def append_media_attribute -+ if ::Rails::VERSION::MAJOR < 7 -+ "media=\"screen\"" -+ end -+end -+ - class HelperTest < ActionView::TestCase - FIXTURES_PATH = File.expand_path("../fixtures", __FILE__) - -@@ -19,7 +25,7 @@ class HelperTest < ActionView::TestCase - tmp = File.expand_path("../../tmp", __FILE__) - @manifest = Sprockets::Manifest.new(@assets, tmp) - -- @view = ActionView::Base.new(ActionView::LookupContext.new([])) -+ @view = ActionView::Base.new(ActionView::LookupContext.new([]), {}, nil) - @view.extend ::Sprockets::Rails::Helper - @view.assets_environment = @assets - @view.assets_manifest = @manifest -@@ -135,23 +141,23 @@ class NoHostHelperTest < HelperTest - - def test_stylesheet_link_tag - ActiveSupport::Deprecation.silence do -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static.css") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:static) - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("/elsewhere.css") -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag("/style1.css", "style2.css") - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("http://www.example.com/styles/style") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("http://www.example.com/styles/style.css") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("//www.example.com/styles/style.css") - - assert_dom_equal %(), -@@ -177,12 +183,12 @@ class NoHostHelperTest < HelperTest - - def test_stylesheet_link_tag_integrity - ActiveSupport::Deprecation.silence do -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: "sha-256-5YzTQPuOJz/EpeXfN/+v1sxsjAj/dw8q26abiHZM3A4=") - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: false) - end - end -@@ -244,18 +250,18 @@ class NoSSLHelperTest < NoHostHelperTest - - def test_stylesheet_link_tag_integrity - ActiveSupport::Deprecation.silence do -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: false) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: nil) - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("static", integrity: "sha-256-5YzTQPuOJz/EpeXfN/+v1sxsjAj/dw8q26abiHZM3A4=") - end - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: true) - end - end -@@ -292,19 +298,19 @@ class LocalhostHelperTest < NoHostHelperTest - def test_stylesheet_link_tag_integrity - super - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: false) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: nil) - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo, integrity: true) - -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:foo, :bar, integrity: true) - end - end -@@ -352,11 +358,11 @@ class RelativeHostHelperTest < HelperTest - assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1#hash", @view.stylesheet_path("bank.css?foo=1#hash") - end - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) - end - -@@ -366,7 +372,6 @@ class RelativeHostHelperTest < HelperTest - end - end - -- - class NoDigestHelperTest < NoHostHelperTest - def setup - super -@@ -390,11 +395,11 @@ class NoDigestHelperTest < NoHostHelperTest - def test_stylesheet_link_tag - super - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) - - assert_servable_asset_url "/assets/foo.css" -@@ -446,14 +451,14 @@ class DigestHelperTest < NoHostHelperTest - def test_stylesheet_link_tag - super - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) - -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:foo, :bar) - - assert_servable_asset_url "/assets/foo-#{@foo_css_digest}.css" -@@ -481,19 +486,19 @@ class DigestHelperTest < NoHostHelperTest - def test_stylesheet_link_tag_integrity - super - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: false) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: nil) - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo, integrity: true) - -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:foo, :bar, integrity: true) - end - -@@ -564,11 +569,11 @@ class DebugHelperTest < NoHostHelperTest - super - - if using_sprockets4? -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:bar) -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:file1, :file2) - - assert_servable_asset_url "/assets/foo.self.css" -@@ -577,11 +582,11 @@ class DebugHelperTest < NoHostHelperTest - assert_servable_asset_url "/assets/file1.self.css" - assert_servable_asset_url "/assets/file2.self.css" - else -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:bar) -- assert_dom_equal %(\n\n), -+ assert_dom_equal %(\n\n), - @view.stylesheet_link_tag(:file1, :file2) - - assert_servable_asset_url "/assets/foo.self.css?body=1" -@@ -651,11 +656,11 @@ class DebugDigestHelperTest < NoHostHelperTest - super - - if using_sprockets4? -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:bar) -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:file1, :file2) - - assert_servable_asset_url "/assets/foo.self-#{@foo_self_css_digest}.css" -@@ -664,11 +669,11 @@ class DebugDigestHelperTest < NoHostHelperTest - assert_servable_asset_url "/assets/file1.self-#{@file1_self_css_digest}.css" - assert_servable_asset_url "/assets/file2.self-#{@file2_self_css_digest}.css" - else -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) -- assert_dom_equal %(\n), -+ assert_dom_equal %(\n), - @view.stylesheet_link_tag(:bar) -- assert_dom_equal %(\n\n), -+ assert_dom_equal %(\n\n), - @view.stylesheet_link_tag(:file1, :file2) - - assert_servable_asset_url "/assets/foo.self-#{@foo_self_css_digest}.css?body=1" -@@ -735,11 +740,11 @@ class ManifestHelperTest < NoHostHelperTest - def test_stylesheet_link_tag - super - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css") -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo) - end - -@@ -757,11 +762,11 @@ class ManifestHelperTest < NoHostHelperTest - def test_stylesheet_link_tag_integrity - super - -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag("foo.css", integrity: true) -- assert_dom_equal %(), -+ assert_dom_equal %(), - @view.stylesheet_link_tag(:foo, integrity: true) - end - -diff --git a/test/test_railtie.rb b/test/test_railtie.rb -index 8e964ee..8d9c3b4 100644 ---- a/test/test_railtie.rb -+++ b/test/test_railtie.rb -@@ -187,7 +187,7 @@ class TestRailtie < TestBoot - def test_default_check_precompiled_assets - assert app.config.assets.check_precompiled_asset - app.initialize! -- @view = ActionView::Base.new -+ @view = action_view - assert @view.check_precompiled_asset - end - -@@ -196,7 +196,7 @@ class TestRailtie < TestBoot - config.assets.check_precompiled_asset = false - end - app.initialize! -- @view = ActionView::Base.new -+ @view = action_view - refute @view.check_precompiled_asset - end - -@@ -254,7 +254,7 @@ class TestRailtie < TestBoot - assert_equal app.assets_manifest, ActionView::Base.assets_manifest - assert_kind_of Sprockets::Environment, ActionView::Base.assets_environment - -- @view = ActionView::Base.new -+ @view = action_view - assert_equal "/javascripts/xmlhr.js", @view.javascript_path("xmlhr") - assert_equal "/assets/foo-4ef5541f349f7ed5a0d6b71f2fa4c82745ca106ae02f212aea5129726ac6f6ab.js", @view.javascript_path("foo") - -@@ -275,7 +275,7 @@ class TestRailtie < TestBoot - refute ActionView::Base.assets_environment - assert_equal app.assets_manifest, ActionView::Base.assets_manifest - -- @view = ActionView::Base.new -+ @view = action_view - refute @view.assets_environment - assert_equal app.assets_manifest, @view.assets_manifest - end -@@ -410,4 +410,9 @@ class TestRailtie < TestBoot - assert middleware.include?(Sprockets::Rails::QuietAssets) - assert middleware.each_cons(2).include?([Sprockets::Rails::QuietAssets, Rails::Rack::Logger]) - end -+ -+ private -+ def action_view -+ ActionView::Base.new(ActionView::LookupContext.new([]), {}, nil) -+ end - end --- -2.33.0 - diff --git a/Silence-warnings-about-static-path-fallback.patch b/Silence-warnings-about-static-path-fallback.patch deleted file mode 100644 index 4b210ee824dfc6fa1d969b35cf8413f8b419762f..0000000000000000000000000000000000000000 --- a/Silence-warnings-about-static-path-fallback.patch +++ /dev/null @@ -1,326 +0,0 @@ -From 3ad8f0d7bf1a4e4ce5fedc1e4ffe0b22399d4822 Mon Sep 17 00:00:00 2001 -From: Andrew White -Date: Sat, 12 Sep 2020 06:49:10 +0100 -Subject: [PATCH] Silence warnings about static path fallback - -We know they're going away but they still need testing for now. ---- - test/test_helper.rb | 260 ++++++++++++++++++++++++-------------------- - 1 file changed, 140 insertions(+), 120 deletions(-) - -diff --git a/test/test_helper.rb b/test/test_helper.rb -index 82876ec..1ed323d 100644 ---- a/test/test_helper.rb -+++ b/test/test_helper.rb -@@ -107,103 +107,115 @@ end - - class NoHostHelperTest < HelperTest - def test_javascript_include_tag -- assert_dom_equal %(), -- @view.javascript_include_tag("static") -- assert_dom_equal %(), -- @view.javascript_include_tag("static.js") -- assert_dom_equal %(), -- @view.javascript_include_tag(:static) -- -- assert_dom_equal %(), -- @view.javascript_include_tag("/elsewhere.js") -- assert_dom_equal %(\n), -- @view.javascript_include_tag("/script1.js", "script2.js") -- -- assert_dom_equal %(), -- @view.javascript_include_tag("http://example.com/script") -- assert_dom_equal %(), -- @view.javascript_include_tag("http://example.com/script.js") -- assert_dom_equal %(), -- @view.javascript_include_tag("//example.com/script.js") -- -- assert_dom_equal %(), -- @view.javascript_include_tag("static", :defer => "defer") -- assert_dom_equal %(), -- @view.javascript_include_tag("static", :async => "async") -+ ActiveSupport::Deprecation.silence do -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static") -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static.js") -+ assert_dom_equal %(), -+ @view.javascript_include_tag(:static) -+ -+ assert_dom_equal %(), -+ @view.javascript_include_tag("/elsewhere.js") -+ assert_dom_equal %(\n), -+ @view.javascript_include_tag("/script1.js", "script2.js") -+ -+ assert_dom_equal %(), -+ @view.javascript_include_tag("http://example.com/script") -+ assert_dom_equal %(), -+ @view.javascript_include_tag("http://example.com/script.js") -+ assert_dom_equal %(), -+ @view.javascript_include_tag("//example.com/script.js") -+ -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", :defer => "defer") -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", :async => "async") -+ end - end - - def test_stylesheet_link_tag -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static") -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static.css") -- assert_dom_equal %(), -- @view.stylesheet_link_tag(:static) -- -- assert_dom_equal %(), -- @view.stylesheet_link_tag("/elsewhere.css") -- assert_dom_equal %(\n), -- @view.stylesheet_link_tag("/style1.css", "style2.css") -- -- assert_dom_equal %(), -- @view.stylesheet_link_tag("http://www.example.com/styles/style") -- assert_dom_equal %(), -- @view.stylesheet_link_tag("http://www.example.com/styles/style.css") -- assert_dom_equal %(), -- @view.stylesheet_link_tag("//www.example.com/styles/style.css") -- -- assert_dom_equal %(), -- @view.stylesheet_link_tag("print", :media => "print") -- assert_dom_equal %(), -- @view.stylesheet_link_tag("print", :media => "") -+ ActiveSupport::Deprecation.silence do -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static") -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static.css") -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag(:static) -+ -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("/elsewhere.css") -+ assert_dom_equal %(\n), -+ @view.stylesheet_link_tag("/style1.css", "style2.css") -+ -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("http://www.example.com/styles/style") -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("http://www.example.com/styles/style.css") -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("//www.example.com/styles/style.css") -+ -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("print", :media => "print") -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("print", :media => "") -+ end - end - - def test_javascript_include_tag_integrity -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: "sha-256-TvVUHzSfftWg1rcfL6TIJ0XKEGrgLyEq6lEpcmrG9qs=") -- -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: true) -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: false) -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: nil) -+ ActiveSupport::Deprecation.silence do -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: "sha-256-TvVUHzSfftWg1rcfL6TIJ0XKEGrgLyEq6lEpcmrG9qs=") -+ -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: true) -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: false) -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: nil) -+ end - end - - def test_stylesheet_link_tag_integrity -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: "sha-256-5YzTQPuOJz/EpeXfN/+v1sxsjAj/dw8q26abiHZM3A4=") -- -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: true) -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: false) -+ ActiveSupport::Deprecation.silence do -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: "sha-256-5YzTQPuOJz/EpeXfN/+v1sxsjAj/dw8q26abiHZM3A4=") -+ -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: true) -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: false) -+ end - end - - def test_javascript_path -- assert_equal "/javascripts/xmlhr.js", @view.javascript_path("xmlhr") -- assert_equal "/javascripts/xmlhr.js", @view.javascript_path("xmlhr.js") -- assert_equal "/javascripts/super/xmlhr.js", @view.javascript_path("super/xmlhr") -- assert_equal "/super/xmlhr.js", @view.javascript_path("/super/xmlhr") -- -- assert_equal "/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr.js?foo=1") -- assert_equal "/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr?foo=1") -- assert_equal "/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr.js#hash") -- assert_equal "/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr#hash") -- assert_equal "/javascripts/xmlhr.js?foo=1#hash", @view.javascript_path("xmlhr.js?foo=1#hash") -+ ActiveSupport::Deprecation.silence do -+ assert_equal "/javascripts/xmlhr.js", @view.javascript_path("xmlhr") -+ assert_equal "/javascripts/xmlhr.js", @view.javascript_path("xmlhr.js") -+ assert_equal "/javascripts/super/xmlhr.js", @view.javascript_path("super/xmlhr") -+ assert_equal "/super/xmlhr.js", @view.javascript_path("/super/xmlhr") -+ -+ assert_equal "/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr.js?foo=1") -+ assert_equal "/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr?foo=1") -+ assert_equal "/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr.js#hash") -+ assert_equal "/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr#hash") -+ assert_equal "/javascripts/xmlhr.js?foo=1#hash", @view.javascript_path("xmlhr.js?foo=1#hash") -+ end - end - - def test_stylesheet_path -- assert_equal "/stylesheets/bank.css", @view.stylesheet_path("bank") -- assert_equal "/stylesheets/bank.css", @view.stylesheet_path("bank.css") -- assert_equal "/stylesheets/subdir/subdir.css", @view.stylesheet_path("subdir/subdir") -- assert_equal "/subdir/subdir.css", @view.stylesheet_path("/subdir/subdir.css") -- -- assert_equal "/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank.css?foo=1") -- assert_equal "/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank?foo=1") -- assert_equal "/stylesheets/bank.css#hash", @view.stylesheet_path("bank.css#hash") -- assert_equal "/stylesheets/bank.css#hash", @view.stylesheet_path("bank#hash") -- assert_equal "/stylesheets/bank.css?foo=1#hash", @view.stylesheet_path("bank.css?foo=1#hash") -+ ActiveSupport::Deprecation.silence do -+ assert_equal "/stylesheets/bank.css", @view.stylesheet_path("bank") -+ assert_equal "/stylesheets/bank.css", @view.stylesheet_path("bank.css") -+ assert_equal "/stylesheets/subdir/subdir.css", @view.stylesheet_path("subdir/subdir") -+ assert_equal "/subdir/subdir.css", @view.stylesheet_path("/subdir/subdir.css") -+ -+ assert_equal "/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank.css?foo=1") -+ assert_equal "/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank?foo=1") -+ assert_equal "/stylesheets/bank.css#hash", @view.stylesheet_path("bank.css#hash") -+ assert_equal "/stylesheets/bank.css#hash", @view.stylesheet_path("bank#hash") -+ assert_equal "/stylesheets/bank.css?foo=1#hash", @view.stylesheet_path("bank.css?foo=1#hash") -+ end - end - end - -@@ -215,30 +227,34 @@ class NoSSLHelperTest < NoHostHelperTest - end - - def test_javascript_include_tag_integrity -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: true) -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: false) -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: nil) -- -- assert_dom_equal %(), -- @view.javascript_include_tag("static", integrity: "sha-256-TvVUHzSfftWg1rcfL6TIJ0XKEGrgLyEq6lEpcmrG9qs=") -+ ActiveSupport::Deprecation.silence do -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: true) -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: false) -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: nil) -+ -+ assert_dom_equal %(), -+ @view.javascript_include_tag("static", integrity: "sha-256-TvVUHzSfftWg1rcfL6TIJ0XKEGrgLyEq6lEpcmrG9qs=") -+ end - - assert_dom_equal %(), - @view.javascript_include_tag("foo", integrity: true) - end - - def test_stylesheet_link_tag_integrity -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: true) -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: false) -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: nil) -- -- assert_dom_equal %(), -- @view.stylesheet_link_tag("static", integrity: "sha-256-5YzTQPuOJz/EpeXfN/+v1sxsjAj/dw8q26abiHZM3A4=") -+ ActiveSupport::Deprecation.silence do -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: true) -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: false) -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: nil) -+ -+ assert_dom_equal %(), -+ @view.stylesheet_link_tag("static", integrity: "sha-256-5YzTQPuOJz/EpeXfN/+v1sxsjAj/dw8q26abiHZM3A4=") -+ end - - assert_dom_equal %(), - @view.stylesheet_link_tag("foo", integrity: true) -@@ -302,16 +318,18 @@ class RelativeHostHelperTest < HelperTest - end - - def test_javascript_path -- assert_equal "https://assets.example.com/javascripts/xmlhr.js", @view.javascript_path("xmlhr") -- assert_equal "https://assets.example.com/javascripts/xmlhr.js", @view.javascript_path("xmlhr.js") -- assert_equal "https://assets.example.com/javascripts/super/xmlhr.js", @view.javascript_path("super/xmlhr") -- assert_equal "https://assets.example.com/super/xmlhr.js", @view.javascript_path("/super/xmlhr") -- -- assert_equal "https://assets.example.com/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr.js?foo=1") -- assert_equal "https://assets.example.com/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr?foo=1") -- assert_equal "https://assets.example.com/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr.js#hash") -- assert_equal "https://assets.example.com/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr#hash") -- assert_equal "https://assets.example.com/javascripts/xmlhr.js?foo=1#hash", @view.javascript_path("xmlhr.js?foo=1#hash") -+ ActiveSupport::Deprecation.silence do -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js", @view.javascript_path("xmlhr") -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js", @view.javascript_path("xmlhr.js") -+ assert_equal "https://assets.example.com/javascripts/super/xmlhr.js", @view.javascript_path("super/xmlhr") -+ assert_equal "https://assets.example.com/super/xmlhr.js", @view.javascript_path("/super/xmlhr") -+ -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr.js?foo=1") -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js?foo=1", @view.javascript_path("xmlhr?foo=1") -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr.js#hash") -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js#hash", @view.javascript_path("xmlhr#hash") -+ assert_equal "https://assets.example.com/javascripts/xmlhr.js?foo=1#hash", @view.javascript_path("xmlhr.js?foo=1#hash") -+ end - - assert_dom_equal %(), - @view.javascript_include_tag("foo") -@@ -322,16 +340,18 @@ class RelativeHostHelperTest < HelperTest - end - - def test_stylesheet_path -- assert_equal "https://assets.example.com/stylesheets/bank.css", @view.stylesheet_path("bank") -- assert_equal "https://assets.example.com/stylesheets/bank.css", @view.stylesheet_path("bank.css") -- assert_equal "https://assets.example.com/stylesheets/subdir/subdir.css", @view.stylesheet_path("subdir/subdir") -- assert_equal "https://assets.example.com/subdir/subdir.css", @view.stylesheet_path("/subdir/subdir.css") -- -- assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank.css?foo=1") -- assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank?foo=1") -- assert_equal "https://assets.example.com/stylesheets/bank.css#hash", @view.stylesheet_path("bank.css#hash") -- assert_equal "https://assets.example.com/stylesheets/bank.css#hash", @view.stylesheet_path("bank#hash") -- assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1#hash", @view.stylesheet_path("bank.css?foo=1#hash") -+ ActiveSupport::Deprecation.silence do -+ assert_equal "https://assets.example.com/stylesheets/bank.css", @view.stylesheet_path("bank") -+ assert_equal "https://assets.example.com/stylesheets/bank.css", @view.stylesheet_path("bank.css") -+ assert_equal "https://assets.example.com/stylesheets/subdir/subdir.css", @view.stylesheet_path("subdir/subdir") -+ assert_equal "https://assets.example.com/subdir/subdir.css", @view.stylesheet_path("/subdir/subdir.css") -+ -+ assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank.css?foo=1") -+ assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1", @view.stylesheet_path("bank?foo=1") -+ assert_equal "https://assets.example.com/stylesheets/bank.css#hash", @view.stylesheet_path("bank.css#hash") -+ assert_equal "https://assets.example.com/stylesheets/bank.css#hash", @view.stylesheet_path("bank#hash") -+ assert_equal "https://assets.example.com/stylesheets/bank.css?foo=1#hash", @view.stylesheet_path("bank.css?foo=1#hash") -+ end - - assert_dom_equal %(), - @view.stylesheet_link_tag("foo") --- -2.33.0 - diff --git a/rubygem-sprockets-rails.spec b/rubygem-sprockets-rails.spec index 7d5086b43d8c79613a1f348873405db4a5c22d2d..1c5027aa42ed06a736888742ec3d6b97af1f693f 100644 --- a/rubygem-sprockets-rails.spec +++ b/rubygem-sprockets-rails.spec @@ -1,16 +1,12 @@ %global gem_name sprockets-rails Name: rubygem-%{gem_name} -Version: 3.2.1 -Release: 2 +Version: 3.4.2 +Release: 1 Summary: Sprockets Rails integration License: MIT URL: https://github.com/rails/sprockets-rails Source0: https://rubygems.org/gems/sprockets-rails-%{version}.gem Source1: https://github.com/rails/sprockets-rails/archive/v%{version}.tar.gz -Patch1: Silence-warnings-about-static-path-fallback.patch -Patch2: Fix-Action-View-deprecation-warning.patch -Patch3: Fixes-build-for-Gemfile-rails-7-by-adding-a-new-meth.patch -Patch4: Fix-extending-ActionView-Base-instances.patch BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest) rubygem(railties) >= 3.0 BuildRequires: rubygem(rake) rubygem(sprockets) BuildArch: noarch @@ -26,10 +22,7 @@ Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +ln -s %{gem_name}-%{version}/test test %build gem build ../%{gem_name}-%{version}.gemspec @@ -58,6 +51,9 @@ popd %doc %{gem_instdir}/README.md %changelog +* Wed Oct 19 2022 caodongxia - 3.4.2-1 +- update to 3.4.2 + * Tue Mar 01 2022 chenchen - 3.2.1-2 - fix build error caused by upgrading to ruby3 diff --git a/sprockets-rails-3.2.1.gem b/sprockets-rails-3.2.1.gem deleted file mode 100644 index 58921be3ab6e4d18a46c437b661839f0295caa3c..0000000000000000000000000000000000000000 Binary files a/sprockets-rails-3.2.1.gem and /dev/null differ diff --git a/sprockets-rails-3.4.2.gem b/sprockets-rails-3.4.2.gem new file mode 100644 index 0000000000000000000000000000000000000000..64591bff02715b7ccbb1c4786d1e122bee588a62 Binary files /dev/null and b/sprockets-rails-3.4.2.gem differ diff --git a/v3.2.1.tar.gz b/v3.4.2.tar.gz similarity index 58% rename from v3.2.1.tar.gz rename to v3.4.2.tar.gz index 11bd6097d7eb5694f24649ba91baa90f01865f1b..96f39a6cb6958dab748e90ddadcaba5a827e459c 100644 Binary files a/v3.2.1.tar.gz and b/v3.4.2.tar.gz differ