Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1936243e64 |
2 changed files with 72 additions and 1 deletions
|
|
@ -0,0 +1,60 @@
|
||||||
|
From e63ecb909efa6ff9c4172e3f36e4ff8ac80ddb3a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||||
|
Date: Sat, 12 Feb 2022 22:31:36 +0900
|
||||||
|
Subject: [PATCH] Handle rspec-mocks 3.10.3 change with "with" syntax
|
||||||
|
|
||||||
|
rspec-mocks 3.10.3 changed "with" syntax behavior to support
|
||||||
|
ruby 3 keyword arguments separation:
|
||||||
|
|
||||||
|
https://github.com/rspec/rspec-mocks/pull/1394
|
||||||
|
https://github.com/rspec/rspec-mocks/issues/1460
|
||||||
|
|
||||||
|
Fix yard testsuite accordingly.
|
||||||
|
|
||||||
|
Fixes #1432
|
||||||
|
---
|
||||||
|
Gemfile | 2 +-
|
||||||
|
spec/code_objects/base_spec.rb | 2 +-
|
||||||
|
spec/templates/helpers/base_helper_spec.rb | 2 +-
|
||||||
|
spec/templates/template_spec.rb | 2 +-
|
||||||
|
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/spec/code_objects/base_spec.rb b/spec/code_objects/base_spec.rb
|
||||||
|
index f0820c480..4e766c440 100644
|
||||||
|
--- a/spec/code_objects/base_spec.rb
|
||||||
|
+++ b/spec/code_objects/base_spec.rb
|
||||||
|
@@ -249,7 +249,7 @@ class X; end
|
||||||
|
describe "#format" do
|
||||||
|
it "sends object to Templates.render" do
|
||||||
|
object = MethodObject.new(:root, :method)
|
||||||
|
- expect(Templates::Engine).to receive(:render).with(:x => 1, :object => object, :type => object.type)
|
||||||
|
+ expect(Templates::Engine).to receive(:render).with({:x => 1, :object => object, :type => object.type})
|
||||||
|
object.format :x => 1
|
||||||
|
end
|
||||||
|
|
||||||
|
diff --git a/spec/templates/helpers/base_helper_spec.rb b/spec/templates/helpers/base_helper_spec.rb
|
||||||
|
index 68937318c..fc2cd3863 100644
|
||||||
|
--- a/spec/templates/helpers/base_helper_spec.rb
|
||||||
|
+++ b/spec/templates/helpers/base_helper_spec.rb
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
|
||||||
|
it "passes off to #link_url if argument is recognized as a URL" do
|
||||||
|
url = "http://yardoc.org/"
|
||||||
|
- expect(self).to receive(:link_url).with(url, nil, :target => '_parent')
|
||||||
|
+ expect(self).to receive(:link_url).with(url, nil, {:target => '_parent'})
|
||||||
|
linkify url
|
||||||
|
end
|
||||||
|
|
||||||
|
diff --git a/spec/templates/template_spec.rb b/spec/templates/template_spec.rb
|
||||||
|
index ab0e7ede1..21808cc24 100644
|
||||||
|
--- a/spec/templates/template_spec.rb
|
||||||
|
+++ b/spec/templates/template_spec.rb
|
||||||
|
@@ -208,7 +208,7 @@ def init; sections 1, 2, 3 end
|
||||||
|
it "renders all sections with options" do
|
||||||
|
mod = template(:e).new
|
||||||
|
allow(mod).to receive(:render_section) {|section| section.name.to_s }
|
||||||
|
- expect(mod).to receive(:add_options).with(:a => 1).and_yield
|
||||||
|
+ expect(mod).to receive(:add_options).with({:a => 1}).and_yield
|
||||||
|
mod.sections :a
|
||||||
|
expect(mod.run(:a => 1)).to eq 'a'
|
||||||
|
end
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 0.9.26
|
Version: 0.9.26
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Documentation tool for consistent and usable documentation in Ruby
|
Summary: Documentation tool for consistent and usable documentation in Ruby
|
||||||
License: MIT and (BSD or Ruby)
|
License: MIT and (BSD or Ruby)
|
||||||
URL: http://yardoc.org
|
URL: http://yardoc.org
|
||||||
|
|
@ -11,6 +11,9 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
# git clone http://github.com/lsegal/yard
|
# git clone http://github.com/lsegal/yard
|
||||||
# cd yard && git archive -v -o yard-0.9.26-spec.txz v0.9.26 spec/
|
# cd yard && git archive -v -o yard-0.9.26-spec.txz v0.9.26 spec/
|
||||||
Source1: %{gem_name}-%{version}-spec.txz
|
Source1: %{gem_name}-%{version}-spec.txz
|
||||||
|
# https://github.com/lsegal/yard/pull/1433
|
||||||
|
# Fix test suite with rspec-mocks keyword argument <-> hash treatment with ruby3.x
|
||||||
|
Patch0: %{name}-pr1433-ruby3x-mocks-keyword-hash-separation.patch
|
||||||
|
|
||||||
# The 'irb/notifier' might be required for parsing of some old Ruby code.
|
# The 'irb/notifier' might be required for parsing of some old Ruby code.
|
||||||
# https://github.com/lsegal/yard/blob/v0.9.24/lib/yard/parser/ruby/legacy/irb/slex.rb#L13
|
# https://github.com/lsegal/yard/blob/v0.9.24/lib/yard/parser/ruby/legacy/irb/slex.rb#L13
|
||||||
|
|
@ -25,6 +28,7 @@ BuildRequires: rubygem(irb)
|
||||||
BuildRequires: rubygem(rspec)
|
BuildRequires: rubygem(rspec)
|
||||||
BuildRequires: rubygem(redcarpet)
|
BuildRequires: rubygem(redcarpet)
|
||||||
BuildRequires: rubygem(rack)
|
BuildRequires: rubygem(rack)
|
||||||
|
BuildRequires: rubygem(rake)
|
||||||
BuildRequires: rubygem(webrick)
|
BuildRequires: rubygem(webrick)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
@ -45,6 +49,10 @@ Documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version} -b1
|
%setup -q -n %{gem_name}-%{version} -b1
|
||||||
|
(
|
||||||
|
cd %{_builddir}/spec
|
||||||
|
%patch0 -p2
|
||||||
|
)
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Create the gem as gem install only works on a gem file
|
# Create the gem as gem install only works on a gem file
|
||||||
|
|
@ -117,6 +125,9 @@ popd
|
||||||
%{gem_instdir}/%{gem_name}.gemspec
|
%{gem_instdir}/%{gem_name}.gemspec
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 12 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.26-6
|
||||||
|
- Backport upstream patch for ruby3x keyword <-> hash separation
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.26-5
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.26-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue