public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rack/files/
@ 2018-04-18 18:15 David Seifert
  0 siblings, 0 replies; 4+ messages in thread
From: David Seifert @ 2018-04-18 18:15 UTC (permalink / raw
  To: gentoo-commits

commit:     b814adc916a0f26c0c691a0cc31c19d3bacd1746
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Mon Mar 12 08:39:48 2018 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Apr 18 18:15:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b814adc9

dev-ruby/rack: remove unused patch

Closes: https://bugs.gentoo.org/653152
Closes: https://github.com/gentoo/gentoo/pull/7433

 .../rack/files/rack-1.4.5-fix-test-ruby20.patch    | 25 ----------------------
 1 file changed, 25 deletions(-)

diff --git a/dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch b/dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch
deleted file mode 100644
index 7854b7e6e16..00000000000
--- a/dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0a74380d2e5157d94c7e9141242af33e5c0bf951 Mon Sep 17 00:00:00 2001
-From: Santiago Pastorino <santiago@wyeworks.com>
-Date: Sat, 29 Dec 2012 17:36:08 -0200
-Subject: [PATCH] Fix Ruby 2.0 build
-
----
- test/spec_chunked.rb | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/test/spec_chunked.rb b/test/spec_chunked.rb
-index c81409f..12f2158 100644
---- a/test/spec_chunked.rb
-+++ b/test/spec_chunked.rb
-@@ -41,7 +41,7 @@ def chunked(app)
-     response.headers.should.not.include 'Content-Length'
-     response.headers['Transfer-Encoding'].should.equal 'chunked'
-     response.body.encoding.to_s.should.equal "ASCII-8BIT"
--    response.body.should.equal "c\r\n\xFE\xFFH\x00e\x00l\x00l\x00o\x00\r\n2\r\n \x00\r\na\r\nW\x00o\x00r\x00l\x00d\x00\r\n0\r\n\r\n"
-+    response.body.should.equal "c\r\n\xFE\xFFH\x00e\x00l\x00l\x00o\x00\r\n2\r\n \x00\r\na\r\nW\x00o\x00r\x00l\x00d\x00\r\n0\r\n\r\n".force_encoding("BINARY")
-   end if RUBY_VERSION >= "1.9"
- 
-   should 'not modify response when Content-Length header present' do
--- 
-1.9.1
-


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rack/files/
@ 2020-05-10  7:16 Hans de Graaff
  0 siblings, 0 replies; 4+ messages in thread
From: Hans de Graaff @ 2020-05-10  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     376b8914ff063abd7d9d3e9d97d474b09cdfd474
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Thu Jan 30 15:19:44 2020 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun May 10 07:16:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=376b8914

dev-ruby/rack: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/rack/files/rack-1.2.1-gentoo.patch        | 13 --------
 .../rack/files/rack-1.6-rewindable-ruby23.patch    | 38 ----------------------
 2 files changed, 51 deletions(-)

diff --git a/dev-ruby/rack/files/rack-1.2.1-gentoo.patch b/dev-ruby/rack/files/rack-1.2.1-gentoo.patch
deleted file mode 100644
index 82ea127a8cb..00000000000
--- a/dev-ruby/rack/files/rack-1.2.1-gentoo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb
-index accd96b..d71fde6 100644
---- a/lib/rack/rewindable_input.rb
-+++ b/lib/rack/rewindable_input.rb
-@@ -94,7 +94,7 @@ module Rack
-     end
-     
-     def filesystem_has_posix_semantics?
--      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/
-+      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/ && RUBY_VERSION < '1.9.1'
-     end
-   end
- end

diff --git a/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch b/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch
deleted file mode 100644
index 9d36a7328e2..00000000000
--- a/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 11b5a15dd1c8a41d87eb73df7bb99a3affecd787 Mon Sep 17 00:00:00 2001
-From: deepj <deepjungle.maca@gmail.com>
-Date: Mon, 25 May 2015 22:41:31 +0200
-Subject: [PATCH] Clean up Rack::Rewindable
-
----
- lib/rack/rewindable_input.rb | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb
-index 64efdda..dd6b784 100644
---- a/lib/rack/rewindable_input.rb
-+++ b/lib/rack/rewindable_input.rb
-@@ -57,15 +57,6 @@ def close
- 
-     private
- 
--    # Ruby's Tempfile class has a bug. Subclass it and fix it.
--    class Tempfile < ::Tempfile
--      def _close
--        @tmpfile.close if @tmpfile
--        @data[1] = nil if @data
--        @tmpfile = nil
--      end
--    end
--
-     def make_rewindable
-       # Buffer all data into a tempfile. Since this tempfile is private to this
-       # RewindableInput object, we chmod it so that nobody else can read or write
-@@ -77,8 +68,6 @@ def make_rewindable
-       @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding)
-       @rewindable_io.binmode
-       if filesystem_has_posix_semantics?
--        # Use ::File.unlink as 1.9.1 Tempfile has a bug where unlink closes the file!
--        ::File.unlink @rewindable_io.path
-         raise 'Unlink failed. IO closed.' if @rewindable_io.closed?
-         @unlinked = true
-       end


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rack/files/
@ 2022-06-04  5:47 Hans de Graaff
  0 siblings, 0 replies; 4+ messages in thread
From: Hans de Graaff @ 2022-06-04  5:47 UTC (permalink / raw
  To: gentoo-commits

commit:     2962b2a65d469473dbcba9afffaab21c5bcb29bb
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  4 05:45:08 2022 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sat Jun  4 05:47:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2962b2a6

dev-ruby/rack: add missing patch

Closes: https://bugs.gentoo.org/849473
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch | 210 ++++++++++++++++++++++++++
 1 file changed, 210 insertions(+)

diff --git a/dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch b/dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch
new file mode 100644
index 000000000000..467fb3487d67
--- /dev/null
+++ b/dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch
@@ -0,0 +1,210 @@
+From 43b5565a73817d66b6d96de2e28d525a2a56f852 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= <josef.simanek@gmail.com>
+Date: Mon, 4 Apr 2022 23:17:19 +0200
+Subject: [PATCH] Newer rubies spec compatibility.
+
+---
+ Gemfile             |  5 +++++
+ lib/rack/utils.rb   |  7 +++++--
+ test/spec_mock.rb   | 34 +++++++++++++++++-----------------
+ test/testrequest.rb |  4 ++--
+ 4 files changed, 29 insertions(+), 21 deletions(-)
+
+diff --git a/Gemfile b/Gemfile
+index dc075a4ca..5768eedf7 100644
+--- a/Gemfile
++++ b/Gemfile
+@@ -14,6 +14,11 @@ end
+ 
+ gem "rubocop", require: false
+ 
++group :test do
++  gem "webrick" # gemified in Ruby 3.1+
++  gem "psych", "~> 4.0" # using YAML#unsafe_load in tests which is 4.0+ only
++end
++
+ # Alternative solution that might work, but it has bad interactions with
+ # Gemfile.lock if that gets committed/reused:
+ # c_platforms = [:mri] if Gem.platforms.last.os == "java"
+diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb
+index d3b3b1d42..34849ded1 100644
+--- a/lib/rack/utils.rb
++++ b/lib/rack/utils.rb
+@@ -22,6 +22,9 @@ module Utils
+     COMMON_SEP = QueryParser::COMMON_SEP
+     KeySpaceConstrainedParams = QueryParser::Params
+ 
++    RFC2822_DAY_NAME = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ]
++    RFC2822_MONTH_NAME = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]
++
+     class << self
+       attr_accessor :default_query_parser
+     end
+@@ -327,8 +330,8 @@ def rfc2822(time)
+     # weekday and month.
+     #
+     def rfc2109(time)
+-      wday = Time::RFC2822_DAY_NAME[time.wday]
+-      mon = Time::RFC2822_MONTH_NAME[time.mon - 1]
++      wday = RFC2822_DAY_NAME[time.wday]
++      mon = RFC2822_MONTH_NAME[time.mon - 1]
+       time.strftime("#{wday}, %d-#{mon}-%Y %H:%M:%S GMT")
+     end
+ 
+diff --git a/test/spec_mock.rb b/test/spec_mock.rb
+index d2311f5a2..73fb7b235 100644
+--- a/test/spec_mock.rb
++++ b/test/spec_mock.rb
+@@ -47,7 +47,7 @@
+   it "provide sensible defaults" do
+     res = Rack::MockRequest.new(app).request
+ 
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+     env["SERVER_NAME"].must_equal "example.org"
+     env["SERVER_PORT"].must_equal "80"
+@@ -60,23 +60,23 @@
+ 
+   it "allow GET/POST/PUT/DELETE/HEAD" do
+     res = Rack::MockRequest.new(app).get("", input: "foo")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+ 
+     res = Rack::MockRequest.new(app).post("", input: "foo")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "POST"
+ 
+     res = Rack::MockRequest.new(app).put("", input: "foo")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "PUT"
+ 
+     res = Rack::MockRequest.new(app).patch("", input: "foo")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "PATCH"
+ 
+     res = Rack::MockRequest.new(app).delete("", input: "foo")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "DELETE"
+ 
+     Rack::MockRequest.env_for("/", method: "HEAD")["REQUEST_METHOD"]
+@@ -102,11 +102,11 @@
+ 
+   it "allow posting" do
+     res = Rack::MockRequest.new(app).get("", input: "foo")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["mock.postdata"].must_equal "foo"
+ 
+     res = Rack::MockRequest.new(app).post("", input: StringIO.new("foo"))
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["mock.postdata"].must_equal "foo"
+   end
+ 
+@@ -115,7 +115,7 @@
+       get("https://bla.example.org:9292/meh/foo?bar")
+     res.must_be_kind_of Rack::MockResponse
+ 
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+     env["SERVER_NAME"].must_equal "bla.example.org"
+     env["SERVER_PORT"].must_equal "9292"
+@@ -129,7 +129,7 @@
+       get("https://example.org/foo")
+     res.must_be_kind_of Rack::MockResponse
+ 
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+     env["SERVER_NAME"].must_equal "example.org"
+     env["SERVER_PORT"].must_equal "443"
+@@ -144,7 +144,7 @@
+       get("foo")
+     res.must_be_kind_of Rack::MockResponse
+ 
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+     env["SERVER_NAME"].must_equal "example.org"
+     env["SERVER_PORT"].must_equal "80"
+@@ -155,13 +155,13 @@
+ 
+   it "properly convert method name to an uppercase string" do
+     res = Rack::MockRequest.new(app).request(:get)
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+   end
+ 
+   it "accept params and build query string for GET requests" do
+     res = Rack::MockRequest.new(app).get("/foo?baz=2", params: { foo: { bar: "1" } })
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+     env["QUERY_STRING"].must_include "baz=2"
+     env["QUERY_STRING"].must_include "foo[bar]=1"
+@@ -171,7 +171,7 @@
+ 
+   it "accept raw input in params for GET requests" do
+     res = Rack::MockRequest.new(app).get("/foo?baz=2", params: "foo[bar]=1")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "GET"
+     env["QUERY_STRING"].must_include "baz=2"
+     env["QUERY_STRING"].must_include "foo[bar]=1"
+@@ -181,7 +181,7 @@
+ 
+   it "accept params and build url encoded params for POST requests" do
+     res = Rack::MockRequest.new(app).post("/foo", params: { foo: { bar: "1" } })
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "POST"
+     env["QUERY_STRING"].must_equal ""
+     env["PATH_INFO"].must_equal "/foo"
+@@ -191,7 +191,7 @@
+ 
+   it "accept raw input in params for POST requests" do
+     res = Rack::MockRequest.new(app).post("/foo", params: "foo[bar]=1")
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "POST"
+     env["QUERY_STRING"].must_equal ""
+     env["PATH_INFO"].must_equal "/foo"
+@@ -202,7 +202,7 @@
+   it "accept params and build multipart encoded params for POST requests" do
+     files = Rack::Multipart::UploadedFile.new(File.join(File.dirname(__FILE__), "multipart", "file1.txt"))
+     res = Rack::MockRequest.new(app).post("/foo", params: { "submit-name" => "Larry", "files" => files })
+-    env = YAML.load(res.body)
++    env = YAML.unsafe_load(res.body)
+     env["REQUEST_METHOD"].must_equal "POST"
+     env["QUERY_STRING"].must_equal ""
+     env["PATH_INFO"].must_equal "/foo"
+diff --git a/test/testrequest.rb b/test/testrequest.rb
+index aabe7fa6b..481a4e54d 100644
+--- a/test/testrequest.rb
++++ b/test/testrequest.rb
+@@ -42,7 +42,7 @@ def GET(path, header = {})
+         http.request(get) { |response|
+           @status = response.code.to_i
+           begin
+-            @response = YAML.load(response.body)
++            @response = YAML.unsafe_load(response.body)
+           rescue TypeError, ArgumentError
+             @response = nil
+           end
+@@ -60,7 +60,7 @@ def POST(path, formdata = {}, header = {})
+         post.basic_auth user, passwd  if user && passwd
+         http.request(post) { |response|
+           @status = response.code.to_i
+-          @response = YAML.load(response.body)
++          @response = YAML.unsafe_load(response.body)
+         }
+       }
+     end


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rack/files/
@ 2022-12-26 13:44 Conrad Kostecki
  0 siblings, 0 replies; 4+ messages in thread
From: Conrad Kostecki @ 2022-12-26 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     e89c6155cc20152e48438ad656a5a0db24135690
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Dec 26 08:29:12 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 13:41:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e89c6155

dev-ruby/rack: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/28815
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch | 210 --------------------------
 1 file changed, 210 deletions(-)

diff --git a/dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch b/dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch
deleted file mode 100644
index 467fb3487d67..000000000000
--- a/dev-ruby/rack/files/rack-2.2.3.1-ruby30.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From 43b5565a73817d66b6d96de2e28d525a2a56f852 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= <josef.simanek@gmail.com>
-Date: Mon, 4 Apr 2022 23:17:19 +0200
-Subject: [PATCH] Newer rubies spec compatibility.
-
----
- Gemfile             |  5 +++++
- lib/rack/utils.rb   |  7 +++++--
- test/spec_mock.rb   | 34 +++++++++++++++++-----------------
- test/testrequest.rb |  4 ++--
- 4 files changed, 29 insertions(+), 21 deletions(-)
-
-diff --git a/Gemfile b/Gemfile
-index dc075a4ca..5768eedf7 100644
---- a/Gemfile
-+++ b/Gemfile
-@@ -14,6 +14,11 @@ end
- 
- gem "rubocop", require: false
- 
-+group :test do
-+  gem "webrick" # gemified in Ruby 3.1+
-+  gem "psych", "~> 4.0" # using YAML#unsafe_load in tests which is 4.0+ only
-+end
-+
- # Alternative solution that might work, but it has bad interactions with
- # Gemfile.lock if that gets committed/reused:
- # c_platforms = [:mri] if Gem.platforms.last.os == "java"
-diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb
-index d3b3b1d42..34849ded1 100644
---- a/lib/rack/utils.rb
-+++ b/lib/rack/utils.rb
-@@ -22,6 +22,9 @@ module Utils
-     COMMON_SEP = QueryParser::COMMON_SEP
-     KeySpaceConstrainedParams = QueryParser::Params
- 
-+    RFC2822_DAY_NAME = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ]
-+    RFC2822_MONTH_NAME = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]
-+
-     class << self
-       attr_accessor :default_query_parser
-     end
-@@ -327,8 +330,8 @@ def rfc2822(time)
-     # weekday and month.
-     #
-     def rfc2109(time)
--      wday = Time::RFC2822_DAY_NAME[time.wday]
--      mon = Time::RFC2822_MONTH_NAME[time.mon - 1]
-+      wday = RFC2822_DAY_NAME[time.wday]
-+      mon = RFC2822_MONTH_NAME[time.mon - 1]
-       time.strftime("#{wday}, %d-#{mon}-%Y %H:%M:%S GMT")
-     end
- 
-diff --git a/test/spec_mock.rb b/test/spec_mock.rb
-index d2311f5a2..73fb7b235 100644
---- a/test/spec_mock.rb
-+++ b/test/spec_mock.rb
-@@ -47,7 +47,7 @@
-   it "provide sensible defaults" do
-     res = Rack::MockRequest.new(app).request
- 
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-     env["SERVER_NAME"].must_equal "example.org"
-     env["SERVER_PORT"].must_equal "80"
-@@ -60,23 +60,23 @@
- 
-   it "allow GET/POST/PUT/DELETE/HEAD" do
-     res = Rack::MockRequest.new(app).get("", input: "foo")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
- 
-     res = Rack::MockRequest.new(app).post("", input: "foo")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "POST"
- 
-     res = Rack::MockRequest.new(app).put("", input: "foo")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "PUT"
- 
-     res = Rack::MockRequest.new(app).patch("", input: "foo")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "PATCH"
- 
-     res = Rack::MockRequest.new(app).delete("", input: "foo")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "DELETE"
- 
-     Rack::MockRequest.env_for("/", method: "HEAD")["REQUEST_METHOD"]
-@@ -102,11 +102,11 @@
- 
-   it "allow posting" do
-     res = Rack::MockRequest.new(app).get("", input: "foo")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["mock.postdata"].must_equal "foo"
- 
-     res = Rack::MockRequest.new(app).post("", input: StringIO.new("foo"))
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["mock.postdata"].must_equal "foo"
-   end
- 
-@@ -115,7 +115,7 @@
-       get("https://bla.example.org:9292/meh/foo?bar")
-     res.must_be_kind_of Rack::MockResponse
- 
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-     env["SERVER_NAME"].must_equal "bla.example.org"
-     env["SERVER_PORT"].must_equal "9292"
-@@ -129,7 +129,7 @@
-       get("https://example.org/foo")
-     res.must_be_kind_of Rack::MockResponse
- 
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-     env["SERVER_NAME"].must_equal "example.org"
-     env["SERVER_PORT"].must_equal "443"
-@@ -144,7 +144,7 @@
-       get("foo")
-     res.must_be_kind_of Rack::MockResponse
- 
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-     env["SERVER_NAME"].must_equal "example.org"
-     env["SERVER_PORT"].must_equal "80"
-@@ -155,13 +155,13 @@
- 
-   it "properly convert method name to an uppercase string" do
-     res = Rack::MockRequest.new(app).request(:get)
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-   end
- 
-   it "accept params and build query string for GET requests" do
-     res = Rack::MockRequest.new(app).get("/foo?baz=2", params: { foo: { bar: "1" } })
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-     env["QUERY_STRING"].must_include "baz=2"
-     env["QUERY_STRING"].must_include "foo[bar]=1"
-@@ -171,7 +171,7 @@
- 
-   it "accept raw input in params for GET requests" do
-     res = Rack::MockRequest.new(app).get("/foo?baz=2", params: "foo[bar]=1")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "GET"
-     env["QUERY_STRING"].must_include "baz=2"
-     env["QUERY_STRING"].must_include "foo[bar]=1"
-@@ -181,7 +181,7 @@
- 
-   it "accept params and build url encoded params for POST requests" do
-     res = Rack::MockRequest.new(app).post("/foo", params: { foo: { bar: "1" } })
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "POST"
-     env["QUERY_STRING"].must_equal ""
-     env["PATH_INFO"].must_equal "/foo"
-@@ -191,7 +191,7 @@
- 
-   it "accept raw input in params for POST requests" do
-     res = Rack::MockRequest.new(app).post("/foo", params: "foo[bar]=1")
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "POST"
-     env["QUERY_STRING"].must_equal ""
-     env["PATH_INFO"].must_equal "/foo"
-@@ -202,7 +202,7 @@
-   it "accept params and build multipart encoded params for POST requests" do
-     files = Rack::Multipart::UploadedFile.new(File.join(File.dirname(__FILE__), "multipart", "file1.txt"))
-     res = Rack::MockRequest.new(app).post("/foo", params: { "submit-name" => "Larry", "files" => files })
--    env = YAML.load(res.body)
-+    env = YAML.unsafe_load(res.body)
-     env["REQUEST_METHOD"].must_equal "POST"
-     env["QUERY_STRING"].must_equal ""
-     env["PATH_INFO"].must_equal "/foo"
-diff --git a/test/testrequest.rb b/test/testrequest.rb
-index aabe7fa6b..481a4e54d 100644
---- a/test/testrequest.rb
-+++ b/test/testrequest.rb
-@@ -42,7 +42,7 @@ def GET(path, header = {})
-         http.request(get) { |response|
-           @status = response.code.to_i
-           begin
--            @response = YAML.load(response.body)
-+            @response = YAML.unsafe_load(response.body)
-           rescue TypeError, ArgumentError
-             @response = nil
-           end
-@@ -60,7 +60,7 @@ def POST(path, formdata = {}, header = {})
-         post.basic_auth user, passwd  if user && passwd
-         http.request(post) { |response|
-           @status = response.code.to_i
--          @response = YAML.load(response.body)
-+          @response = YAML.unsafe_load(response.body)
-         }
-       }
-     end


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-26 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-04  5:47 [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rack/files/ Hans de Graaff
  -- strict thread matches above, loose matches on Subject: below --
2022-12-26 13:44 Conrad Kostecki
2020-05-10  7:16 Hans de Graaff
2018-04-18 18:15 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox