parent
f18c1c2425
commit
1c1a14cbe4
@ -1,26 +0,0 @@
|
||||
From ca4be4b7788c90d94beb1e835b7019f809148d08 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew White <andrew.white@unboxed.co>
|
||||
Date: Mon, 2 Apr 2018 09:34:53 +0100
|
||||
Subject: [PATCH] Backport fix for Dir::Tmpname.create from #32386
|
||||
|
||||
The removal of path separators from the tmpname value affects all four
|
||||
supported versions of Ruby - 2.2.10, 2.3.7, 2.4.4, and 2.5.1.
|
||||
---
|
||||
activesupport/test/caching_test.rb | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
|
||||
index c67ffe69b80a..c138f10c13a5 100644
|
||||
--- a/activesupport/test/caching_test.rb
|
||||
+++ b/activesupport/test/caching_test.rb
|
||||
@@ -854,7 +854,9 @@ def test_key_transformation_with_pathname
|
||||
def test_filename_max_size
|
||||
key = "#{'A' * ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE}"
|
||||
path = @cache.send(:normalize_key, key, {})
|
||||
- Dir::Tmpname.create(path) do |tmpname, n, opts|
|
||||
+ basename = File.basename(path)
|
||||
+ dirname = File.dirname(path)
|
||||
+ Dir::Tmpname.create(basename, Dir.tmpdir + dirname) do |tmpname, n, opts|
|
||||
assert File.basename(tmpname + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}"
|
||||
end
|
||||
end
|
@ -0,0 +1,22 @@
|
||||
From 01f20c753e89f75e0031d0853866aaaa68ee1cc7 Mon Sep 17 00:00:00 2001
|
||||
From: utilum <oz@utilum.com>
|
||||
Date: Fri, 30 Mar 2018 23:53:23 +0200
|
||||
Subject: [PATCH] Fix: FileStoreTest#test_filename_max_size fails in Ruby 2.5.1
|
||||
|
||||
---
|
||||
activesupport/test/cache/stores/file_store_test.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/activesupport/test/cache/stores/file_store_test.rb b/activesupport/test/cache/stores/file_store_test.rb
|
||||
index c3c35a7bccfe..9aee8239799e 100644
|
||||
--- a/activesupport/test/cache/stores/file_store_test.rb
|
||||
+++ b/activesupport/test/cache/stores/file_store_test.rb
|
||||
@@ -69,7 +69,7 @@ def test_filename_max_size
|
||||
key = "#{'A' * ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE}"
|
||||
path = @cache.send(:normalize_key, key, {})
|
||||
Dir::Tmpname.create(path) do |tmpname, n, opts|
|
||||
- assert File.basename(tmpname + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}"
|
||||
+ assert File.basename(key + tmpname.split(key).last + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}"
|
||||
end
|
||||
end
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA512 (activesupport-5.1.5.gem) = 6e20f069f4e2e20a8ea762e02be9f136a32535b871b4c6f2a59600393201f6d01dbd2696a74024811c168e8d6c223e5a4fa0eda3ba30d87a3c2216fba0aedd05
|
||||
SHA512 (activesupport-5.1.5-tests.tgz) = 11be71318b4e9f1365d18d72fc527c87837782b62adb6498c423edd2a40687ad22b43b05e983528b6a4d1690376d64adecad816ec8bfd298d7352307e63acd89
|
||||
SHA512 (activesupport-5.2.0-tests.tgz) = 72085a71720d6931f8acedc9d6e20f0ee7910cc7c85ed05bedafd49d730ff6b1f1c19fa7f2faa021c2df5907e4d63aa1af7a7e373a6c55300d53be34ecee437f
|
||||
SHA512 (activesupport-5.2.0.gem) = 606ea2168abc2c0ac1310c560c22e8d708f586c9cfa1e132ed50069eb61db4e4a16138598d83ff020beb3171236f3ddae25b38c315add03b89a04af578900252
|
||||
|
Loading…
Reference in new issue