From 0f9f576d74df88122d47e275c8986cb29e7ec9f0 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 10 Jan 2024 04:21:06 +0300 Subject: [PATCH] import rubygem-pry-0.13.1-7.1.el9 --- .gitignore | 2 + .rubygem-pry.metadata | 2 + SOURCES/pry-0.13.1-Fix-broken-spec.patch | 26 +++ SPECS/rubygem-pry.spec | 199 +++++++++++++++++++++++ 4 files changed, 229 insertions(+) create mode 100644 .gitignore create mode 100644 .rubygem-pry.metadata create mode 100644 SOURCES/pry-0.13.1-Fix-broken-spec.patch create mode 100644 SPECS/rubygem-pry.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..314d46a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/pry-0.13.1-spec.tar.gz +SOURCES/pry-0.13.1.gem diff --git a/.rubygem-pry.metadata b/.rubygem-pry.metadata new file mode 100644 index 0000000..3f1ed28 --- /dev/null +++ b/.rubygem-pry.metadata @@ -0,0 +1,2 @@ +4aeaba9a05bbbf1fc1f601f320a7acf2ba698ef1 SOURCES/pry-0.13.1-spec.tar.gz +c062c2b4cdb93d3b9bbebd2bab2e1c5bc32ddf88 SOURCES/pry-0.13.1.gem diff --git a/SOURCES/pry-0.13.1-Fix-broken-spec.patch b/SOURCES/pry-0.13.1-Fix-broken-spec.patch new file mode 100644 index 0000000..100c9ff --- /dev/null +++ b/SOURCES/pry-0.13.1-Fix-broken-spec.patch @@ -0,0 +1,26 @@ +From 25f5022fcf3c43c43bfdb10ff2c1dc60588b9fa6 Mon Sep 17 00:00:00 2001 +From: Barrett Ingram +Date: Sat, 2 Jan 2021 17:53:36 -0600 +Subject: [PATCH] Add CI support for ruby 3 and fix broken spec + +Spec started failing because a statement which we expected to be a +syntax error is now interpreted as a valid pattern-matching statement. +Swapping the hash-rockets for colons turns this back into a syntax +error. +--- + spec/syntax_checking_spec.rb | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/spec/syntax_checking_spec.rb b/spec/syntax_checking_spec.rb +index ca75ba9f0..beba497f1 100644 +--- a/spec/syntax_checking_spec.rb ++++ b/spec/syntax_checking_spec.rb +@@ -36,7 +36,7 @@ + ["o = Object.new.tap{ def o.render;", "'MEH'", "}"], + + # multiple syntax errors reported in one SyntaxException +- ["puts {'key'=>'val'}.to_json"] ++ ["puts {key: 'val'}.to_json"] + ].compact.each do |foo| + it "should raise an error on invalid syntax like #{foo.inspect}" do + redirect_pry_io(InputTester.new(*foo), @str_output) do diff --git a/SPECS/rubygem-pry.spec b/SPECS/rubygem-pry.spec new file mode 100644 index 0000000..25609f9 --- /dev/null +++ b/SPECS/rubygem-pry.spec @@ -0,0 +1,199 @@ +%global gem_name pry + +# Enable bootstrap until dependencies are in epel9 +%global bootstrap 0 + +Name: rubygem-%{gem_name} +Version: 0.13.1 +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 +# 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 +# Fix spec which were testing invalid syntax which become valid in Ruby 3.0. +# https://github.com/pry/pry/pull/2170 +Patch0: pry-0.13.1-Fix-broken-spec.patch +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby +# These are for tests, disable until dependencies are in epel9 +%if %{bootstrap} +BuildRequires: rubygem(bundler) +BuildRequires: rubygem(coderay) => 1.1.0 +BuildRequires: rubygem(irb) +BuildRequires: rubygem(method_source) => 0.8.1 +BuildRequires: rubygem(rspec) +%endif +# 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 + +%description +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 +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name}. + +%prep +%setup -q -n %{gem_name}-%{version} -b 1 + +pushd %{_builddir} +%patch0 -p1 +popd + + +%build +# 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 +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 +# Disable tests until dependencies are in epel9 +%if %{bootstrap} +pushd .%{gem_instdir} +ln -s %{_builddir}/spec spec + +# Rakefile is used by editor test. +touch Rakefile + +# 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 + +# The bundler is required just to make /spec/integration/bundler_spec.rb pass. +RUBYOPT=-rbundler rspec -rspec_helper spec +popd +%endif + +%files +%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 +* Wed Jan 10 2024 MSVSphere Packaging Team - 0.13.1-7.1 +- Rebuilt for MSVSphere 9.3 + +* Mon Jun 06 2022 Troy Dawson - 0.13.1-7.1 +- Disable test dependencies and tests, until they are in epel9 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.13.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.13.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Apr 07 2021 Vít Ondruch - 0.13.1-5 +- Add `BR: rubygem(irb)`, which was previosly pulled in indirectly. + +* Wed Jan 27 2021 Fedora Release Engineering - 0.13.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jan 11 2021 Vít Ondruch - 0.13.1-3 +- Fix FTBFS due to Ruby 3.0 incompatibility. + +* Wed Jul 29 2020 Fedora Release Engineering - 0.13.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Apr 20 2020 Vít Ondruch - 0.13.1-1 +- Update to Pry 0.13.1. + Resolves: rhbz#1493806 + Resovles: rhbz#1800023 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.10.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 0.10.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* 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