summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2014-12-09 20:53:13 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2014-12-09 20:53:13 -0700
commit5e22b2fc9a53671150715bf39cf3b3b9235efea4 (patch)
tree1a970ce0c84b19a3bd822732f5486d49ea782227
parent63b1079643d5ae14a465c3e7d1eb062d5d1515e8 (diff)
downloadrubygem-pry-ktdreyer-update.zip
rubygem-pry-ktdreyer-update.tar.gz
rubygem-pry-ktdreyer-update.tar.xz
Update to latest upstream releasektdreyer-update
- 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 - No need to mark mandir file as %doc
-rw-r--r--.gitignore2
-rw-r--r--rubygem-pry-0.10.1-rm-openstruct.patch27
-rwxr-xr-xrubygem-pry-generate-test-tarball.sh26
-rw-r--r--rubygem-pry.spec97
-rw-r--r--sources3
5 files changed, 115 insertions, 40 deletions
diff --git a/.gitignore b/.gitignore
index 8d098b3..f4577ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
/pry-0.9.10.gem
/pry-0.9.12.gem
/pry-0.9.12.6.gem
+/pry-0.10.1.gem
+/pry-0.10.1-tests.tar.xz
diff --git a/rubygem-pry-0.10.1-rm-openstruct.patch b/rubygem-pry-0.10.1-rm-openstruct.patch
new file mode 100644
index 0000000..a1eb03a
--- /dev/null
+++ b/rubygem-pry-0.10.1-rm-openstruct.patch
@@ -0,0 +1,27 @@
+From 683b1abff5785a7fe2140ddf502ab82dbb968656 Mon Sep 17 00:00:00 2001
+From: Ken Dreyer <ktdreyer@ktdreyer.com>
+Date: Tue, 9 Dec 2014 20:44:02 -0700
+Subject: [PATCH] spec: rm stray reference to OpenStruct
+
+OpenStruct was removed in 91d412c044f174a2c50d1583a3f34c1f0f795e7d, but
+a stray reference remained in the test suite. Remove it here.
+---
+ spec/hooks_spec.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/hooks_spec.rb b/spec/hooks_spec.rb
+index 8248f03..fa5bf05 100644
+--- a/spec/hooks_spec.rb
++++ b/spec/hooks_spec.rb
+@@ -368,7 +368,7 @@ describe Pry::Hooks do
+
+ describe "after_session hook" do
+ it 'should always run, even if uncaught exception bubbles out of repl' do
+- o = OpenStruct.new
++ o = Pry::Config.new
+ o.great_escape = Class.new(StandardError)
+
+ old_ew = Pry.config.exception_whitelist
+--
+1.9.3
+
diff --git a/rubygem-pry-generate-test-tarball.sh b/rubygem-pry-generate-test-tarball.sh
new file mode 100755
index 0000000..8d9c9c0
--- /dev/null
+++ b/rubygem-pry-generate-test-tarball.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+
+VERSION=0.10.1
+
+GITHUBURL=https://github.com/pry/pry/archive/v${VERSION}.zip
+
+# download zipball
+if [[ ! -f pry-$VERSION.zip ]]; then
+ curl -o pry-$VERSION.zip -L $GITHUBURL
+fi
+
+# extract zipball
+[[ -d pry-$VERSION ]] && rm -r pry-$VERSION
+unzip pry-$VERSION.zip
+
+pushd pry-$VERSION
+ # repack
+ tar -cJvf pry-$VERSION-tests.tar.xz spec
+ mv pry-$VERSION-tests.tar.xz ..
+popd
+
+# Clean up
+rm pry-$VERSION.zip
+rm -r pry-$VERSION
diff --git a/rubygem-pry.spec b/rubygem-pry.spec
index 5593e73..c498130 100644
--- a/rubygem-pry.spec
+++ b/rubygem-pry.spec
@@ -1,40 +1,47 @@
-# Generated from pry-0.9.10.gem by gem2rpm -*- rpm-spec -*-
%global gem_name pry
Summary: An IRB alternative and runtime developer console
Name: rubygem-%{gem_name}
-Version: 0.9.12.6
-Release: 2%{?dist}
+Version: 0.10.1
+Release: 1%{?dist}
Group: Development/Languages
License: MIT
-URL: http://pry.github.com
-Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+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. Needs to go upstream
+Patch0: rubygem-pry-0.10.1-rm-openstruct.patch
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
Requires: ruby(release)
Requires: ruby(rubygems)
-Requires: rubygem(coderay) => 1.0
-Requires: rubygem(coderay) < 2
+Requires: rubygem(coderay) => 1.1.0
+Requires: rubygem(coderay) < 1.2
Requires: rubygem(slop) => 3.4
-Requires: rubygem(slop) < 4.0
-Requires: rubygem(method_source) => 0.8
-Requires: rubygem(method_source) < 1
+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(bacon)
-BuildRequires: rubygem(coderay) => 1.0
-BuildRequires: rubygem(coderay) < 2
+BuildRequires: rubygem(rspec)
+BuildRequires: rubygem(coderay) => 1.1.0
+BuildRequires: rubygem(coderay) < 1.2
BuildRequires: rubygem(mocha)
BuildRequires: rubygem(slop) => 3.4
-BuildRequires: rubygem(slop) < 4.0
-BuildRequires: rubygem(method_source) => 0.8
-BuildRequires: rubygem(method_source) < 1
+BuildRequires: rubygem(slop) < 4
+BuildRequires: rubygem(method_source) => 0.8.1
+BuildRequires: rubygem(method_source) < 0.9
# 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
+An IRB alternative and runtime developer console.
%package doc
@@ -44,13 +51,26 @@ Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
-Documentation for %{name}
+Documentation for %{name}.
%prep
-%setup -q -c -T
-%gem_install -n %{SOURCE0}
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n %{gem_name}-%{version} -a 2
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+# Remove dependency on bundler
+sed -e "/require 'bundler\/setup'/d" -i spec/helper.rb
+sed -e "/Bundler.require/d" -i spec/helper.rb
+
+# rm stray openstruct reference
+%patch0 -p1
%build
+gem build %{gem_name}.gemspec
+
+%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
@@ -62,42 +82,41 @@ mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
-mkdir -p %{buildroot}%{_mandir}/man1
-cp -a %{buildroot}%{gem_instdir}/man/%{gem_name}.1 \
- %{buildroot}%{_mandir}/man1/
-
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
+cp -pr spec .%{gem_instdir}
pushd .%{gem_instdir}
-bacon -Ispec -q spec/*_spec.rb
+ rspec -I"lib:spec" spec/*_spec.rb
+ rm -rf spec/
popd
%files
+%{!?_licensedir:%global license %%doc}
%dir %{gem_instdir}
-%doc %{gem_instdir}/LICENSE
-%doc %{_mandir}/man1/%{gem_name}.1.gz
+%license %{gem_instdir}/LICENSE
%{_bindir}/pry
%{gem_instdir}/bin
%{gem_libdir}
-%exclude %{gem_instdir}/.*
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
-%doc %{gem_instdir}/CHANGELOG
-%doc %{gem_instdir}/CONTRIBUTORS
-%{gem_instdir}/Gemfile
-%{gem_instdir}/man
-%doc %{gem_instdir}/README.markdown
-%{gem_instdir}/%{gem_name}.gemspec
-%{gem_instdir}/Rakefile
-%{gem_instdir}/spec
-%doc %{gem_instdir}/TODO
-%doc %{gem_instdir}/wiki
+%doc %{gem_instdir}/CHANGELOG.md
+%doc %{gem_instdir}/README.md
%changelog
+* Tue Dec 09 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.10.1-1
+- Update to latest upstream release
+- 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
+- No need to mark mandir file as %%doc
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources
index af155bd..b701ece 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-e35e4f7692add5643d02c515815e0a75 pry-0.9.12.6.gem
+81b69c5d073e089d73e7c6bfc09efe56 pry-0.10.1.gem
+f7960293f4ee96756752cca7a1b4fb26 pry-0.10.1-tests.tar.xz