diff --git a/0009-Update-nodes_by_line_number-spec-for-change-in-Ruby-.patch b/0009-Update-nodes_by_line_number-spec-for-change-in-Ruby-.patch new file mode 100644 index 0000000..4e3bf3c --- /dev/null +++ b/0009-Update-nodes_by_line_number-spec-for-change-in-Ruby-.patch @@ -0,0 +1,41 @@ +From a0e30cc7c8021067b78510b7cd29a7442adc34cb Mon Sep 17 00:00:00 2001 +From: Jon Rowe +Date: Wed, 26 Dec 2018 22:31:28 +0000 +Subject: [PATCH 09/13] Update nodes_by_line_number spec for change in Ruby + behaviour + +--- + spec/rspec/support/source_spec.rb | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/spec/rspec/support/source_spec.rb b/spec/rspec/support/source_spec.rb +index 0e3d569..56532ce 100644 +--- a/spec/rspec/support/source_spec.rb ++++ b/spec/rspec/support/source_spec.rb +@@ -79,10 +79,19 @@ module RSpec::Support + describe '#nodes_by_line_number' do + it 'returns a hash containing nodes for each line number' do + expect(source.nodes_by_line_number).to match( +- 1 => [ +- an_object_having_attributes(:type => :@int), +- an_object_having_attributes(:type => :@ident) +- ], ++ 1 => ++ if RUBY_VERSION >= '2.6.0' ++ [ ++ an_object_having_attributes(:type => :@int), ++ an_object_having_attributes(:type => :@period), ++ an_object_having_attributes(:type => :@ident) ++ ] ++ else ++ [ ++ an_object_having_attributes(:type => :@int), ++ an_object_having_attributes(:type => :@ident) ++ ] ++ end, + 2 => [ + an_object_having_attributes(:type => :@ident), + an_object_having_attributes(:type => :@ident) +-- +2.20.1 + diff --git a/rubygem-rspec-support.spec b/rubygem-rspec-support.spec index bde5925..838a313 100644 --- a/rubygem-rspec-support.spec +++ b/rubygem-rspec-support.spec @@ -3,7 +3,7 @@ %global mainver 3.8.0 %undefine prever -%global mainrel 1 +%global mainrel 2 %global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g') %global need_bootstrap_set 0 @@ -12,7 +12,7 @@ Name: rubygem-%{gem_name} Version: %{mainver} -Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist}.1 +Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist} Summary: Common functionality to Rspec series License: MIT @@ -21,8 +21,10 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{mainver}%{?prever}.gem # %%{SOURCE2} %%{name} %%{version} Source1: rubygem-%{gem_name}-%{version}-full.tar.gz Source2: rspec-related-create-full-tarball.sh +# Patches from upstream: +Patch9: 0009-Update-nodes_by_line_number-spec-for-change-in-Ruby-.patch # tweak regex for search path -Patch0: rubygem-rspec-support-3.2.1-callerfilter-searchpath-regex.patch +Patch100: rubygem-rspec-support-3.2.1-callerfilter-searchpath-regex.patch #BuildRequires: ruby(release) BuildRequires: rubygems-devel @@ -55,7 +57,8 @@ Documentation for %{name} %setup -q -T -n %{gem_name}-%{version} -b 1 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec -%patch0 -p1 +%patch100 -p1 +%patch9 -p1 %build gem build %{gem_name}.gemspec @@ -102,6 +105,9 @@ ruby -rrubygems -Ilib/ -S rspec spec/ || \ %doc %{gem_docdir} %changelog +* Tue Feb 5 2019 Mamoru TASAKA - 3.8.0-2 +- Backport upstream patch for ruby 2.6 changes + * Sat Feb 02 2019 Fedora Release Engineering - 3.8.0-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild