Fix build failed with rubygem-rspec-mocks
This commit is contained in:
parent
267a9c06d4
commit
e9fc685088
@ -0,0 +1,43 @@
|
||||
From 3da3b44afdf2fa0bd618b87c5d862e9def1d5f4f Mon Sep 17 00:00:00 2001
|
||||
From: Tim Diggins <tim@red56.uk>
|
||||
Date: Fri, 4 Mar 2022 11:25:44 +0000
|
||||
Subject: [PATCH] First fix CI so it's green (see #780, #781)
|
||||
|
||||
fix options spec.
|
||||
|
||||
allow line_editor spec to be run independently
|
||||
|
||||
running `rspec spec/line_editor_spec.rb` generated a double error
|
||||
when it tries to re require "readline"
|
||||
|
||||
fix expectations for ruby 3 treatment of hash arg
|
||||
|
||||
try coveralls_reborn to fix ssl errors.
|
||||
|
||||
Note that we could also use the coveralls action as recommended
|
||||
in https://github.com/tagliala/coveralls-ruby-reborn
|
||||
but it seems like a github token is needed, which makes
|
||||
it more complex for contributors
|
||||
|
||||
This does mean dropping coveralls for EOLed rubies but
|
||||
do we really need to post to coveralls on each test run?
|
||||
Wouldn't one test run be enough?
|
||||
---
|
||||
spec/parser/options_spec.rb | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/spec/parser/options_spec.rb b/spec/parser/options_spec.rb
|
||||
index b1e50fbf..5caf9f67 100644
|
||||
--- a/spec/parser/options_spec.rb
|
||||
+++ b/spec/parser/options_spec.rb
|
||||
@@ -116,7 +116,9 @@ def remaining
|
||||
expected = "Unknown switches \"--baz\""
|
||||
expected << "\nDid you mean? \"--bar\"" if Thor::Correctable
|
||||
|
||||
- expect { check_unknown! }.to raise_error(Thor::UnknownArgumentError, expected)
|
||||
+ expect { check_unknown! }.to raise_error(Thor::UnknownArgumentError) do |error|
|
||||
+ expect(error.to_s).to eq(expected)
|
||||
+ end
|
||||
end
|
||||
|
||||
it "skips leading non-switches" do
|
||||
@ -2,12 +2,13 @@
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.1.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Thor is a toolkit for building powerful command-line interfaces
|
||||
License: MIT
|
||||
URL: http://whatisthor.com/
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: %{gem_name}-%{version}-spec.txz
|
||||
Patch0: rubygem-thor-1.1.0-Fix-rspec-mocks-3.10.2-compatibility.patch
|
||||
|
||||
Requires: rubygem(io-console)
|
||||
BuildRequires: ruby(release)
|
||||
@ -36,6 +37,10 @@ Documentation for %{name}.
|
||||
%prep
|
||||
%setup -q -n %{gem_name}-%{version} -b1
|
||||
|
||||
pushd %{_builddir}
|
||||
%patch0 -p1
|
||||
popd
|
||||
|
||||
%build
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
%gem_install
|
||||
@ -80,6 +85,9 @@ popd
|
||||
%{gem_instdir}/thor.gemspec
|
||||
|
||||
%changelog
|
||||
* Wed Jun 29 2022 liyanan <liyanan32@h-partners.com> - 1.1.0-3
|
||||
- Fix build failed with rubygem-rspec-mocks
|
||||
|
||||
* Wed Mar 30 2022 ouyangminxiang <ouyangminxiang@kylinsec.com.cn> - 1.1.0-2
|
||||
- add BuildRequires: rubygem-bigdecimal rubygem-io-console rubygem-openssl rubygem-psych
|
||||
to resolve koji build error during check
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user