Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1936243e64 |
6 changed files with 148 additions and 189 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,2 @@
|
||||||
/yard-*.gem
|
/yard-*.gem
|
||||||
/yard-*-spec.txz
|
/yard-*-spec.txz
|
||||||
/yard-*-test-missing-files.tar.gz
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -1,48 +1,36 @@
|
||||||
%global gem_name yard
|
%global gem_name yard
|
||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 0.9.38
|
Version: 0.9.26
|
||||||
Release: 2%{?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)
|
||||||
|
URL: http://yardoc.org
|
||||||
# lib/yard/parser/ruby/legacy/ruby_lex.rb: under GPL-2.0-only OR Ruby
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
# lib/yard/rubygems/backports/: MIT OR Ruby
|
# The test suite is not shipped with the gem. You may check it out like so:
|
||||||
# lib/yard/server/http_utils.rb: BSD 2-Clause
|
# git clone http://github.com/lsegal/yard
|
||||||
# lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js:
|
# cd yard && git archive -v -o yard-0.9.26-spec.txz v0.9.26 spec/
|
||||||
# MIT OR GPL(version 2??), as this is OR, use MIT for now
|
Source1: %{gem_name}-%{version}-spec.txz
|
||||||
# Others are MIT
|
# https://github.com/lsegal/yard/pull/1433
|
||||||
# SPDX confirmed
|
# Fix test suite with rspec-mocks keyword argument <-> hash treatment with ruby3.x
|
||||||
License: MIT AND (MIT OR Ruby) AND BSD-2-Clause AND (GPL-2.0-only OR Ruby)
|
Patch0: %{name}-pr1433-ruby3x-mocks-keyword-hash-separation.patch
|
||||||
|
|
||||||
URL: http://yardoc.org
|
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
||||||
Source1: %{gem_name}-%{version}-test-missing-files.tar.gz
|
|
||||||
# Source1 is created by $ bash %%SOURCE2 %%version
|
|
||||||
Source2: yard-create-missing-test-files.sh
|
|
||||||
# https://github.com/lsegal/yard/issues/1637
|
|
||||||
# Fix spec testsuite with namespace collision
|
|
||||||
Patch0: yard-0.9.38-issue1637-spec-namespace-collision.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
|
||||||
Recommends: rubygem(irb)
|
Recommends: rubygem(irb)
|
||||||
|
BuildRequires: ruby(release)
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: rubygems-devel
|
||||||
BuildRequires: rubygems-devel
|
BuildRequires: ruby
|
||||||
BuildRequires: ruby
|
BuildRequires: rubygem(RedCloth)
|
||||||
BuildRequires: rubygem(RedCloth)
|
BuildRequires: rubygem(asciidoctor)
|
||||||
BuildRequires: rubygem(asciidoctor)
|
BuildRequires: rubygem(bundler)
|
||||||
BuildRequires: rubygem(bundler)
|
BuildRequires: rubygem(irb)
|
||||||
BuildRequires: rubygem(irb)
|
BuildRequires: rubygem(rspec)
|
||||||
BuildRequires: rubygem(rack)
|
BuildRequires: rubygem(redcarpet)
|
||||||
BuildRequires: /usr/bin/rackup
|
BuildRequires: rubygem(rack)
|
||||||
BuildRequires: rubygem(rake)
|
BuildRequires: rubygem(rake)
|
||||||
BuildRequires: rubygem(redcarpet)
|
BuildRequires: rubygem(webrick)
|
||||||
BuildRequires: rubygem(rspec)
|
BuildArch: noarch
|
||||||
BuildRequires: rubygem(webrick)
|
|
||||||
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
YARD is a documentation generation tool for the Ruby programming language.
|
YARD is a documentation generation tool for the Ruby programming language.
|
||||||
|
|
@ -51,131 +39,94 @@ exported to a number of formats very easily, and also supports extending for
|
||||||
custom Ruby constructs such as custom class level definitions.
|
custom Ruby constructs such as custom class level definitions.
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{name}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version} -b1
|
%setup -q -n %{gem_name}-%{version} -b1
|
||||||
%patch -P0 -p1
|
(
|
||||||
mv ../%{gem_name}-%{version}.gemspec .
|
cd %{_builddir}/spec
|
||||||
|
%patch0 -p2
|
||||||
|
)
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build ./%{gem_name}-%{version}.gemspec
|
# Create the gem as gem install only works on a gem file
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
|
||||||
|
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
||||||
|
# by default, so that we can move it into the buildroot in %%install
|
||||||
%gem_install
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{gem_dir}
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
cp -a .%{gem_dir}/* \
|
cp -a .%{gem_dir}/* \
|
||||||
%{buildroot}%{gem_dir}/
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
pushd %{buildroot}%{gem_instdir}
|
|
||||||
rm -rf .yardopts* \
|
|
||||||
%{nil}
|
|
||||||
popd
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
cp -a .%{_bindir}/* \
|
cp -a .%{_bindir}/* \
|
||||||
%{buildroot}%{_bindir}/
|
%{buildroot}%{_bindir}/
|
||||||
|
|
||||||
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod 0755
|
# Some files in 0.9.24 release has still executable bit set :/
|
||||||
rm -f %{buildroot}%{gem_cache}
|
# https://github.com/lsegal/yard/issues/1147
|
||||||
|
find %{buildroot}%{gem_instdir} -type f | xargs chmod a-x
|
||||||
|
|
||||||
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# FIXME
|
pushd .%{gem_instdir}
|
||||||
# investigate this: was okay with yard 0.9.28
|
# Copy the test suite into place
|
||||||
sed -i spec/cli/diff_spec.rb \
|
cp -r %{_builddir}/spec .
|
||||||
-e '\@"searches for .gem file"@s|\([ \t]it \)|\txit |'
|
|
||||||
rspec -r spec_helper spec
|
# There are quite some test mocking File functionality which makes running the
|
||||||
|
# test suite without Bundler hard. Since the test suite includes Bundler test
|
||||||
|
# cases, just remove the unnecessary dependencies and run the test suite via
|
||||||
|
# Bundler.
|
||||||
|
sed -r -i "/(coveralls|gettext|samus|simplecov)/ s/^/#/" Gemfile
|
||||||
|
|
||||||
|
rspec -Ispec spec
|
||||||
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{gem_instdir}
|
%dir %{gem_instdir}
|
||||||
%license %{gem_instdir}/LEGAL
|
|
||||||
%license %{gem_instdir}/LICENSE
|
|
||||||
%doc %{gem_instdir}/CHANGELOG.md
|
|
||||||
%doc %{gem_instdir}/README.md
|
|
||||||
|
|
||||||
%{_bindir}/yard
|
%{_bindir}/yard
|
||||||
%{_bindir}/yardoc
|
%{_bindir}/yardoc
|
||||||
%{_bindir}/yri
|
%{_bindir}/yri
|
||||||
|
%exclude %{gem_instdir}/.*
|
||||||
%{gem_libdir}/
|
%license %{gem_instdir}/LEGAL
|
||||||
|
%license %{gem_instdir}/LICENSE
|
||||||
%{gem_instdir}/bin
|
%{gem_instdir}/bin
|
||||||
%{gem_instdir}/po/
|
%{gem_libdir}
|
||||||
%{gem_instdir}/templates/
|
%{gem_instdir}/po
|
||||||
|
%{gem_instdir}/templates
|
||||||
|
%exclude %{gem_cache}
|
||||||
%{gem_spec}
|
%{gem_spec}
|
||||||
%{?gem_plugin}
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc %{gem_docdir}
|
%doc %{gem_docdir}
|
||||||
%doc %{gem_instdir}/docs/
|
%doc %{gem_instdir}/CHANGELOG.md
|
||||||
|
%doc %{gem_instdir}/CODE_OF_CONDUCT.md
|
||||||
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
||||||
|
%{gem_instdir}/Dockerfile.samus
|
||||||
|
%{gem_instdir}/Gemfile
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%{gem_instdir}/Rakefile
|
||||||
|
%doc %{gem_instdir}/SECURITY.md
|
||||||
|
%{gem_instdir}/benchmarks
|
||||||
|
%{gem_instdir}/tasks
|
||||||
|
%{gem_plugin}
|
||||||
|
%doc %{gem_instdir}/docs
|
||||||
|
%{gem_instdir}/samus.json
|
||||||
|
%{gem_instdir}/%{gem_name}.gemspec
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jan 02 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.38-2
|
* Thu Jan 12 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.26-6
|
||||||
- Fix spec testsuite failure with namespace collision
|
- Backport upstream patch for ruby3x keyword <-> hash separation
|
||||||
|
|
||||||
* Mon Dec 08 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.38-1
|
|
||||||
- 0.9.38
|
|
||||||
|
|
||||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.37-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jun 10 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.37-3
|
|
||||||
- BR: /usr/bin/rackup for rack / rackup gem split (bug 2371181)
|
|
||||||
|
|
||||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.37-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Sep 05 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.37-1
|
|
||||||
- 0.9.37
|
|
||||||
|
|
||||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.36-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Mar 01 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.36-1
|
|
||||||
- 0.9.36 (Fixes CVE-2024-27285)
|
|
||||||
|
|
||||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.34-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Nov 10 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.34-4
|
|
||||||
- Testsuite: remove invalid yield usage from spec (for ruby3.3)
|
|
||||||
|
|
||||||
* Mon Sep 25 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.34-3
|
|
||||||
- Backport upstream patch for BOM detection change in ruby33
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.34-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Apr 13 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.34-1
|
|
||||||
- 0.9.34
|
|
||||||
|
|
||||||
* Wed Apr 12 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.33-1
|
|
||||||
- 0.9.33
|
|
||||||
|
|
||||||
* Mon Apr 10 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.32-1
|
|
||||||
- 0.9.32
|
|
||||||
|
|
||||||
* Sun Apr 9 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.29-1
|
|
||||||
- 0.9.29
|
|
||||||
- Whitespace cleanup
|
|
||||||
- SPDX migration
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.28-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Aug 08 2022 Vít Ondruch <vondruch@redhat.com> - 0.9.28-1
|
|
||||||
- Update to YARD 0.9.28.
|
|
||||||
Resolves: rhbz#2027537
|
|
||||||
Resolves: rhbz#2113713
|
|
||||||
|
|
||||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.26-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* 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
|
||||||
|
|
|
||||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
||||||
SHA512 (yard-0.9.38.gem) = af69f50fb7ce065adc8b387c93327ee9001fd2526ddce9381d883c4aa9f1518e895a2128623956210509c2c0528700cab91c4fcb30c0c88802e9007d5c5b43f2
|
SHA512 (yard-0.9.26.gem) = fc56f2170d40869252d4c81dc3bf4333c489328ae92ff0c290f84bcd772fbf30c75df0a874026b2d0f0d30deeaa55d2e9531f0c81c10a29eb610becee3568e46
|
||||||
SHA512 (yard-0.9.38-test-missing-files.tar.gz) = 08084b435ebbccf7fb85707c243d7a6e5be21f09188b05ebe50e41b897e34cb32d2310423567a89aef205ef2db5bfdfa7e334a1f2f61013132112331bce6df08
|
SHA512 (yard-0.9.26-spec.txz) = 157d940ed4f808a7df86f5bc31419620e1a325a8b7b7ed5847ed0f0cc5ab92760accc80d3efb6ae170246e296f578cf1da7f943bed40ca9d0548e84242a5964a
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
diff --git a/spec/tags/types_explainer_spec.rb b/spec/tags/types_explainer_spec.rb
|
|
||||||
index de7454d3..5eb72d47 100644
|
|
||||||
--- a/spec/tags/types_explainer_spec.rb
|
|
||||||
+++ b/spec/tags/types_explainer_spec.rb
|
|
||||||
@@ -5,10 +5,9 @@ RSpec.describe YARD::Tags::TypesExplainer do
|
|
||||||
CollectionType = YARD::Tags::TypesExplainer::CollectionType
|
|
||||||
FixedCollectionType = YARD::Tags::TypesExplainer::FixedCollectionType
|
|
||||||
HashCollectionType = YARD::Tags::TypesExplainer::HashCollectionType
|
|
||||||
- Parser = YARD::Tags::TypesExplainer::Parser
|
|
||||||
|
|
||||||
def parse(types)
|
|
||||||
- Parser.new(types).parse
|
|
||||||
+ YARD::Tags::TypesExplainer::Parser.new(types).parse
|
|
||||||
end
|
|
||||||
|
|
||||||
def parse_fail(types)
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "$0 <VERSION>"
|
|
||||||
}
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
if [ $# -lt 1 ] ; then
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
GEMNAME=yard
|
|
||||||
TMPDIR=$(mktemp -d /tmp/${GEMNAME}-XXXXXX)
|
|
||||||
CURDIR=$(pwd)
|
|
||||||
GITTOPDIR=${GEMNAME}-${VERSION}
|
|
||||||
|
|
||||||
pushd $TMPDIR
|
|
||||||
|
|
||||||
git clone http://github.com/lsegal/${GEMNAME} ${GITTOPDIR}
|
|
||||||
cd ${GEMNAME}-$VERSION
|
|
||||||
|
|
||||||
git checkout -b fedora-$VERSION v$VERSION
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
tar czf $CURDIR/${GEMNAME}-${VERSION}-test-missing-files.tar.gz \
|
|
||||||
${GITTOPDIR}/spec/ \
|
|
||||||
|
|
||||||
popd
|
|
||||||
rm -rf $TMPDIR
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue