|
|
|
@ -1,49 +1,32 @@
|
|
|
|
|
%global gem_name pry
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 0.10.4
|
|
|
|
|
Release: 9%{?dist}
|
|
|
|
|
Version: 0.13.1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
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
|
|
|
|
|
# git clone https://github.com/pry/pry.git && cd pry
|
|
|
|
|
# git archive -v -o pry-0.13.1-spec.tar.gz v0.13.1 spec/
|
|
|
|
|
Source1: %{gem_name}-%{version}-spec.tar.gz
|
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
BuildRequires: ruby
|
|
|
|
|
BuildRequires: rubygem(rspec)
|
|
|
|
|
BuildRequires: rubygem(bundler)
|
|
|
|
|
BuildRequires: rubygem(coderay) => 1.1.0
|
|
|
|
|
BuildRequires: rubygem(slop) => 3.4
|
|
|
|
|
BuildRequires: rubygem(method_source) => 0.8.1
|
|
|
|
|
BuildRequires: rubygem(rspec)
|
|
|
|
|
# editor specs fail if no editor is available (soft requirement)
|
|
|
|
|
BuildRequires: vi
|
|
|
|
|
# https://github.com/pry/pry/pull/1498
|
|
|
|
|
Provides: bundled(rubygem-slop) = 3.4.0
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
|
|
|
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
An IRB alternative and runtime developer console.
|
|
|
|
|
Pry is a runtime developer console and IRB alternative with powerful
|
|
|
|
|
introspection capabilities. Pry aims to be more than an IRB replacement. It is
|
|
|
|
|
an attempt to bring REPL driven programming to the Ruby language.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
@ -55,18 +38,20 @@ BuildArch: noarch
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
gem unpack %{SOURCE0}
|
|
|
|
|
|
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
|
|
|
|
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
|
|
# Relax method_source. It seems that the higher version is enforced just
|
|
|
|
|
# due to JRuby.
|
|
|
|
|
%gemspec_remove_dep -g method_source "~> 1.0"
|
|
|
|
|
%gemspec_add_dep -g method_source "< 2"
|
|
|
|
|
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build %{gem_name}.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
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
@ -83,28 +68,20 @@ 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
|
|
|
|
|
ln -s %{_builddir}/spec spec
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
# Original test suite is run from non-versioned directory:
|
|
|
|
|
# https://github.com/pry/pry/blob/9d9ae4a0b0bd487bb41170c834b3fa417e161f23/spec/cli_spec.rb#L219
|
|
|
|
|
sed -i '/pry\/foo/ s/pry/pry-%{version}/' spec/cli_spec.rb
|
|
|
|
|
|
|
|
|
|
rspec spec
|
|
|
|
|
# The bundler is required just to make /spec/integration/bundler_spec.rb pass.
|
|
|
|
|
RUBYOPT=-rbundler rspec -rspec_helper spec
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{_bindir}/pry
|
|
|
|
|
%license %{gem_instdir}/LICENSE
|
|
|
|
@ -119,6 +96,11 @@ popd
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Apr 20 2020 Vít Ondruch <vondruch@redhat.com> - 0.13.1-1
|
|
|
|
|
- Update to Pry 0.13.1.
|
|
|
|
|
Resolves: rhbz#1493806
|
|
|
|
|
Resovles: rhbz#1800023
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.4-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|