Fix build failed due to ruby update to 3.1.3
This commit is contained in:
parent
aec73270ce
commit
f6ae10e83c
@ -0,0 +1,37 @@
|
||||
From 5891358639fcfa7a2e2004855275bd7da0c85c64 Mon Sep 17 00:00:00 2001
|
||||
From: James Coglan <jcoglan@gmail.com>
|
||||
Date: Sun, 6 Feb 2022 23:36:18 +0000
|
||||
Subject: [PATCH] As of rspec-mocks v3.10.3, mock expectations need to use
|
||||
explicit hashes to avoid confusion with keyword args
|
||||
|
||||
---
|
||||
spec/websocket/extensions_spec.rb | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/spec/websocket/extensions_spec.rb b/spec/websocket/extensions_spec.rb
|
||||
index 7c1e4f1..ccb305d 100644
|
||||
--- a/spec/websocket/extensions_spec.rb
|
||||
+++ b/spec/websocket/extensions_spec.rb
|
||||
@@ -134,18 +134,18 @@
|
||||
end
|
||||
|
||||
it "activates one session with a boolean param" do
|
||||
- expect(@session).to receive(:activate).with("gzip" => true).exactly(1).and_return(true)
|
||||
+ expect(@session).to receive(:activate).with({ "gzip" => true }).exactly(1).and_return(true)
|
||||
@extensions.activate("deflate; gzip")
|
||||
end
|
||||
|
||||
it "activates one session with a string param" do
|
||||
- expect(@session).to receive(:activate).with("mode" => "compress").exactly(1).and_return(true)
|
||||
+ expect(@session).to receive(:activate).with({ "mode" => "compress" }).exactly(1).and_return(true)
|
||||
@extensions.activate("deflate; mode=compress")
|
||||
end
|
||||
|
||||
it "activate multiple sessions" do
|
||||
- expect(@session).to receive(:activate).with("a" => true).exactly(1).and_return(true)
|
||||
- expect(@nonconflict_session).to receive(:activate).with("b" => true).exactly(1).and_return(true)
|
||||
+ expect(@session).to receive(:activate).with({ "a" => true }).exactly(1).and_return(true)
|
||||
+ expect(@nonconflict_session).to receive(:activate).with({ "b" => true }).exactly(1).and_return(true)
|
||||
@extensions.activate("deflate; a, reverse; b")
|
||||
end
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
%global gem_name websocket-extensions
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 0.1.2
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Generic extension manager for WebSocket connections
|
||||
License: MIT
|
||||
URL: http://github.com/faye/websocket-extensions-ruby
|
||||
Source0: https://rubygems.org/gems/websocket-extensions-%{version}.gem
|
||||
Source1: https://github.com/faye/websocket-extensions-ruby/archive/%{version}.tar.gz
|
||||
Patch0: CVE-2020-7663.patch
|
||||
Patch1: As-of-rspec-mocks-v3.10.3-mock-expectations-need-to-use.patch
|
||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec)
|
||||
BuildArch: noarch
|
||||
%description
|
||||
@ -39,6 +40,7 @@ cp -a .%{gem_dir}/* \
|
||||
pushd .%{gem_instdir}
|
||||
tar -xzf %{SOURCE1}
|
||||
cd %{gem_name}-ruby-%{version}
|
||||
cat %{PATCH1} | patch -p1
|
||||
rspec spec
|
||||
popd
|
||||
|
||||
@ -55,6 +57,9 @@ popd
|
||||
%doc %{gem_instdir}/README.md
|
||||
|
||||
%changelog
|
||||
* Tue Jan 17 2023 yaoxin <yaoxin30@h-partners.com> - 0.1.2-3
|
||||
- Fix build failed due to ruby update to 3.1.3
|
||||
|
||||
* Thu Feb 24 2022 wangkai <wangkai385@huawei.com> - 0.1.2-2
|
||||
- Fix CVE-2020-7663
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user