%global gem_name pry Name: rubygem-%{gem_name} Version: 0.10.4 Release: 7%{?dist}.1 Summary: An IRB alternative and runtime developer console License: MIT URL: http://pryrepl.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # Upstream does not ship the test suite in the gem. Source1: %{name}-generate-test-tarball.sh Source2: %{gem_name}-%{version}-tests.tar.xz # rm stray openstruct reference. Upstream at # https://github.com/pry/pry/commit/70942ad3b2d93e028fc3e8bfe1c6bd11ec79ffad Patch0: rubygem-pry-0.10.1-rm-openstruct.patch # Fix Ruby 2.4 compatibility. # https://github.com/pry/pry/pull/1586 Patch1: pry-0.10.4-support-custom-implementation-of-BasicObject-inspect.patch Patch2: pry-0.10.4-Avoid-calling-Ruby-2.4-String-pretty_print-in-ColorPrinter.patch Patch3: pry-0.10.4-Fixnum-and-Bignum-are-unified-into-Integer-since-Ruby-2.4.patch %if 0%{?fc19} || 0%{?fc20} || 0%{?el7} Requires: ruby(release) Requires: ruby(rubygems) Requires: rubygem(coderay) => 1.1.0 Requires: rubygem(coderay) < 1.2 Requires: rubygem(slop) => 3.4 Requires: rubygem(slop) < 4 Requires: rubygem(method_source) => 0.8.1 Requires: rubygem(method_source) < 0.9 %endif BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildRequires: rubygem(rspec) BuildRequires: %{_bindir}/rspec BuildRequires: rubygem(coderay) => 1.1.0 BuildRequires: rubygem(slop) => 3.4 BuildRequires: rubygem(method_source) => 0.8.1 # editor specs fail if no editor is available (soft requirement) BuildRequires: vi BuildArch: noarch %if 0%{?fc19} || 0%{?fc20} || 0%{?el7} Provides: rubygem(%{gem_name}) = %{version} %endif %description An IRB alternative and runtime developer console. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %patch1 -p1 %patch2 -p1 %build gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %check pushd .%{gem_instdir} tar xvf %{SOURCE2} # rm stray openstruct reference cat %{PATCH0} | patch -p1 cat %{PATCH3} | patch -p1 # Rakefile is used by editor test. touch Rakefile # rubygem-gist is not available in Fedora yet. sed -i '/gist --login/i pending "rubygem-gist is not in Fedora yet."' \ spec/commands/gist_spec.rb # Remove dependency on bundler sed -e "/require 'bundler\/setup'/ s/^/#/" -i spec/helper.rb sed -e "/Bundler.require/ s/^/#/" -i spec/helper.rb rspec spec popd %files %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %{_bindir}/pry %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Sat Feb 02 2019 Fedora Release Engineering - 0.10.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 14 2018 Fedora Release Engineering - 0.10.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 0.10.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.10.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.10.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jan 24 2017 Vít Ondruch - 0.10.4-2 - Fix Ruby 2.4 compatibility. * Fri Oct 14 2016 Vít Ondruch - 0.10.4-1 - Update to Pry 0.10.4. * Thu Feb 04 2016 Fedora Release Engineering - 0.10.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.10.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Dec 09 2014 Ken Dreyer - 0.10.1-1 - Update to latest upstream release (RHBZ #1108177) - Remove gem2rpm auto-generated comment - Update URL to latest upstream location - Add generate-test-tarball.sh script since upstream no longer ships the tests - Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1 - Use gem unpack / setup / build per Ruby packaging guidelines - Use %%license tag * Sun Jun 08 2014 Fedora Release Engineering - 0.9.12.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Mar 03 2014 Vít Ondruch - 0.9.12.6-1 - Update to Pry 0.9.12.6. * Sun Aug 04 2013 Fedora Release Engineering - 0.9.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Mar 07 2013 Bohuslav Kabrda - 0.9.12-1 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 - Updated to Pry 0.9.12. * Thu Feb 14 2013 Fedora Release Engineering - 0.9.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Jul 31 2012 Bohuslav Kabrda - 0.9.10-1 - Initial package