f2c1d64
%global gem_name yard
a2fc50c
fa7e2cc
Name: rubygem-%{gem_name}
6e6e30f
Version: 0.9.8
a1f325a
Release: 4%{?dist}
a2fc50c
Summary: Documentation tool for consistent and usable documentation in Ruby
a2fc50c
Group: Development/Languages
d7cbcc3
License: MIT and (BSD or Ruby)
a2fc50c
URL: http://yardoc.org
d7cbcc3
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
6e6e30f
# Fix depracation warnings.
6e6e30f
# https://github.com/lsegal/yard/pull/1057
6e6e30f
# https://github.com/lsegal/yard/commit/2d1e9f3b7696a45ed8e48a624a33d662cb99e5cb
6e6e30f
Patch0: pry-0.9.8-Replace-deprecated-TRUE-and-FALSE-constants-with-their-equivalents.patch
a1f325a
# Fix to directory traversal attacks (CVE-2017-17042)
a1f325a
# https://github.com/lsegal/yard/commit/b0217b3e30dc53d057b1682506333335975e62b4
a1f325a
Patch1: rubygem-yard-0.9.11-Disallow-relative-paths-that-start-with.patch
a1f325a
# https://github.com/lsegal/yard/commit/3bcccf678040e827f706b8305456424aa83f6471
a1f325a
Patch2: rubygem-yard-0.9.11-Fix-broken-tests.patch
d7cbcc3
BuildRequires: ruby(release)
fa7e2cc
BuildRequires: rubygems-devel
d7cbcc3
BuildRequires: ruby
2d77152
BuildRequires: rubygem(RedCloth)
6e6e30f
BuildRequires: rubygem(rspec)
f2c1d64
BuildRequires: rubygem(redcarpet)
df60eb0
BuildRequires: rubygem(rack)
a2fc50c
BuildArch: noarch
a2fc50c
a2fc50c
%description
a2fc50c
YARD is a documentation generation tool for the Ruby programming language.
a2fc50c
It enables the user to generate consistent, usable documentation that can be
a2fc50c
exported to a number of formats very easily, and also supports extending for
a2fc50c
custom Ruby constructs such as custom class level definitions.
a2fc50c
a2fc50c
f2c1d64
%package doc
f2c1d64
Summary: Documentation for %{name}
f2c1d64
Group: Documentation
f2c1d64
Requires: %{name} = %{version}-%{release}
f2c1d64
BuildArch: noarch
f2c1d64
f2c1d64
%description doc
d7cbcc3
Documentation for %{name}.
f2c1d64
a2fc50c
%prep
a2fc50c
%setup -q -T -c
c4f755e
%gem_install -n %{SOURCE0}
a2fc50c
6e6e30f
pushd .%{gem_instdir}
6e6e30f
%patch0 -p1
a1f325a
%patch1 -p1
a1f325a
%patch2 -p1
6e6e30f
popd
6e6e30f
a2fc50c
%build
a2fc50c
a2fc50c
%install
fa7e2cc
mkdir -p %{buildroot}%{gem_dir}
fa7e2cc
cp -a .%{gem_dir}/* \
fa7e2cc
        %{buildroot}%{gem_dir}/
9c954a5
6e6e30f
9c954a5
mkdir -p %{buildroot}%{_bindir}
6e6e30f
cp -pa .%{_bindir}/* \
9c954a5
        %{buildroot}%{_bindir}/
a2fc50c
fa7e2cc
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
a2fc50c
a2fc50c
%check
fa7e2cc
pushd .%{gem_instdir}
2d77152
# Not sure if this is needed, since bundler is not user or because Fedora
2d77152
# provides more recent RSpec :/
6e6e30f
sed -i '/allow(File)\.to receive(:exist?).with(\/\\\.yardopts$\/)/ i\      allow(File).to receive(:exist?).and_return(true)' spec/cli/server_spec.rb
2d77152
6e6e30f
rspec -rspec_helper spec
9c954a5
popd
a2fc50c
a2fc50c
%files
6e6e30f
%dir %{gem_instdir}
6e6e30f
%{_bindir}/yard
a2fc50c
%{_bindir}/yardoc
a2fc50c
%{_bindir}/yri
6e6e30f
%exclude %{gem_instdir}/.yardopts
6e6e30f
%license %{gem_instdir}/LEGAL
6e6e30f
%license %{gem_instdir}/LICENSE
fa7e2cc
%{gem_instdir}/bin
fa7e2cc
%{gem_libdir}
fa7e2cc
%{gem_instdir}/templates
fa7e2cc
fa7e2cc
%exclude %{gem_cache}
fa7e2cc
%{gem_spec}
fa7e2cc
f2c1d64
f2c1d64
%files doc
f2c1d64
%doc %{gem_docdir}
d7cbcc3
%doc %{gem_instdir}/CHANGELOG.md
fa7e2cc
%doc %{gem_instdir}/README.md
f2c1d64
%{gem_instdir}/Rakefile
f2c1d64
%{gem_instdir}/benchmarks
fa7e2cc
%doc %{gem_instdir}/docs
6e6e30f
%{gem_instdir}/spec
6e6e30f
%{gem_instdir}/%{gem_name}.gemspec
f2c1d64
a2fc50c
a2fc50c
a2fc50c
%changelog
a1f325a
* Fri Dec 01 2017 Vít Ondruch <vondruch@redhat.com> - 0.9.8-4
a1f325a
- Fix to directory traversal attacks (CVE-2017-17042).
a1f325a
6d805f9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-2
6d805f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6d805f9
6e6e30f
* Mon Jan 30 2017 Vít Ondruch <vondruch@redhat.com> - 0.9.8-1
6e6e30f
- Update to YARD 0.9.8.
6e6e30f
2d72402
* Wed May 25 2016 Jun Aruga <jaruga@redhat.com> - 0.8.7.6-3
2d72402
- Fix test suite for Ruby 2.3 compatibility. (rhbz#1308100)
2d72402
bfe643d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7.6-2
bfe643d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bfe643d
d7cbcc3
* Wed Jul 08 2015 Vít Ondruch <vondruch@redhat.com> - 0.8.7.6-1
d7cbcc3
- Update to YARD 0.8.7.6.
d7cbcc3
ea6ee05
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7.4-2
ea6ee05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ea6ee05
2d77152
* Thu Jul 03 2014 Vít Ondruch <vondruch@redhat.com> - 0.8.7.4-1
2d77152
- Update to yard 0.8.7.4.
2d77152
02851de
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7-2
02851de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
02851de
0168e20
* Wed Aug 14 2013 Vít Ondruch <vondruch@redhat.com> - 0.8.7-1
0168e20
- Update to yard 0.8.7.
0168e20
f5e9063
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.5.2-2
f5e9063
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f5e9063
df60eb0
* Fri Mar 15 2013 Vít Ondruch <vondruch@redhat.com> - 0.8.5.2-1
df60eb0
- Update to yard 0.8.5.2.
df60eb0
c4f755e
* Fri Mar 15 2013 Vít Ondruch <vondruch@redhat.com> - 0.8.2.1-3
c4f755e
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
c4f755e
86d5b26
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2.1-2
86d5b26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
86d5b26
f2c1d64
* Fri Jul 27 2012 Vít Ondruch <vondruch@redhat.com> - 0.8.2.1-1
f2c1d64
- Update to yard 0.8.2.1.
c0ae95b
e8ace5e
* Thu May 03 2012 Vít Ondruch <vondruch@redhat.com> - 0.8.1-1
e8ace5e
- Update to yard 0.8.1.
e8ace5e
fa7e2cc
* Wed Jan 25 2012 Vít Ondruch <vondruch@redhat.com> - 0.7.4-3
fa7e2cc
- Rebuilt for Ruby 1.9.3.
fa7e2cc
8787026
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-2
8787026
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8787026
9c954a5
* Thu Dec 15 2011 Vít Ondruch <vondruch@redhat.com> - 0.7.4-1
9c954a5
- Updated to yard 0.7.4.
9c954a5
dee70f2
* Mon Jul 25 2011 Mo Morsi <mmorsi@redhat.com> - 0.7.2-1
dee70f2
- update to latest upstream release
dee70f2
- fixes to conform to fedora guidelines
dee70f2
0d9d0b0
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
0d9d0b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0d9d0b0
a2fc50c
* Mon Feb 22 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-3
a2fc50c
- fixed dependencies/package issues according to guidelines
a2fc50c
a2fc50c
* Mon Feb 08 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-2
a2fc50c
- cleaned up macros, other package guideline compliance fixes
a2fc50c
- corrected license, added MIT
a2fc50c
- include all files and docs, added check/test section
a2fc50c
a2fc50c
* Mon Feb 08 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-1
a2fc50c
- Initial package
a2fc50c