From 7c17d138fdab1dcd6362383d471cd179b788aecc Mon Sep 17 00:00:00 2001 From: Jaroslav Prokop Date: Aug 30 2018 10:58:56 +0000 Subject: Update to Cucumber 3.1.2. --- diff --git a/.gitignore b/.gitignore index 2af5c89..52e22f8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ cucumber-1.2.1.gem/cucumber-1.3.15.gem /cucumber-1.3.18.gem /cucumber-2.3.3.gem /cucumber-2.4.0.gem +/cucumber-3.1.2.gem +/rubygem-cucumber-3.1.2-features.tar.gz +/rubygem-cucumber-3.1.2-spec.tar.gz diff --git a/cucumber-2.4.0-Fix-Aruba-0.14.x-compatibility.patch b/cucumber-2.4.0-Fix-Aruba-0.14.x-compatibility.patch deleted file mode 100644 index 0a5c212..0000000 --- a/cucumber-2.4.0-Fix-Aruba-0.14.x-compatibility.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/features/docs/work_in_progress.feature b/features/docs/work_in_progress.feature -index 6a2a446f..29a9ee9f 100644 ---- a/features/docs/work_in_progress.feature -+++ b/features/docs/work_in_progress.feature -@@ -124,7 +124,6 @@ Feature: Cucumber --work-in-progress switch - - features/wip.feature:15:in `Scenario: Passing' - -- - """ - - Scenario: Fail with Passing Scenario Outline -@@ -150,5 +149,4 @@ Feature: Cucumber --work-in-progress switch - - features/passing_outline.feature:7:in `Scenario Outline: Passing, Examples (#1)' - -- - """ -diff --git a/features/lib/support/normalise_output.rb b/features/lib/support/normalise_output.rb -index 9911db76..975c545f 100644 ---- a/features/lib/support/normalise_output.rb -+++ b/features/lib/support/normalise_output.rb -@@ -4,6 +4,10 @@ module NormaliseArubaOutput - normalise_output(super) - end - -+ def sanitize_text(text) -+ normalise_output(super) -+ end -+ - def normalise_output(out) - out = out.gsub(/#{Dir.pwd}\/tmp\/aruba/, '.') # Remove absolute paths - out = out.gsub(/tmp\/aruba\//, '') # Fix aruba path diff --git a/cucumber-3.0.0.pre.1-Fix-brittle-spec.patch b/cucumber-3.0.0.pre.1-Fix-brittle-spec.patch deleted file mode 100644 index 87bc7d1..0000000 --- a/cucumber-3.0.0.pre.1-Fix-brittle-spec.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 25d2ca520129e25cf6c033f9e7a84a7e3f582de0 Mon Sep 17 00:00:00 2001 -From: Matt Wynne -Date: Sat, 2 Jul 2016 22:06:51 +0100 -Subject: [PATCH] Fix brittle spec - ---- - spec/cucumber/formatter/html_spec.rb | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/spec/cucumber/formatter/html_spec.rb b/spec/cucumber/formatter/html_spec.rb -index 3c9554f..733c79f 100644 ---- a/spec/cucumber/formatter/html_spec.rb -+++ b/spec/cucumber/formatter/html_spec.rb -@@ -31,8 +31,7 @@ module Formatter - - describe "when writing the report to a file" do - before(:each) do -- allow(@out).to receive(:respond_to?).with(:path, false).and_return(true) -- expect(@out).to receive(:respond_to?).with(:path).and_return(true) -+ allow(@out).to receive(:respond_to?).with(:path).and_return(true) - expect(@out).to receive(:path).and_return('out/file.html') - run_defined_feature - @doc = Nokogiri.HTML(@out.string) diff --git a/rubygem-cucumber.spec b/rubygem-cucumber.spec index 6dfdb2c..26df6de 100644 --- a/rubygem-cucumber.spec +++ b/rubygem-cucumber.spec @@ -3,24 +3,24 @@ %{?_with_bootstrap: %global bootstrap 1} Name: rubygem-%{gem_name} -Version: 2.4.0 -Release: 5%{?dist} +Version: 3.1.2 +Release: 1%{?dist} Summary: Tool to execute plain-text documents as functional tests Group: Development/Languages License: MIT -URL: http://cukes.info +URL: https://cucumber.io/ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem -# Fix test failures. -# https://github.com/cucumber/cucumber-ruby/commit/25d2ca520129e25cf6c033f9e7a84a7e3f582de0 -Patch0: cucumber-3.0.0.pre.1-Fix-brittle-spec.patch -# Aruba 0.14.2+ compatibility. -# https://github.com/cucumber/cucumber-ruby/pull/1073 -Patch1: cucumber-2.4.0-Fix-Aruba-0.14.x-compatibility.patch -Requires: js-jquery1 +# git clone https://github.com/cucumber/cucumber-ruby.git && cd cucumber-ruby +# git checkout v3.1.2 && tar czvf rubygem-cucumber-3.1.2-spec.tar.gz spec/ cucumber.yml +Source1: %{name}-%{version}-spec.tar.gz +# git clone https://github.com/cucumber/cucumber-ruby.git && cd cucumber-ruby +# git checkout v3.1.2 && tar czvf rubygem-cucumber-3.1.2-features.tar.gz features/ +Source2: %{name}-%{version}-features.tar.gz +Requires: js-jquery < 4 BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby -BuildRequires: js-jquery1 +BuildRequires: js-jquery < 4 BuildRequires: web-assets-devel # Aruba has circular dependency with Cucumber. %if ! 0%{?bootstrap} @@ -29,6 +29,7 @@ BuildRequires: rubygem(aruba) BuildRequires: rubygem(builder) BuildRequires: rubygem(bundler) BuildRequires: rubygem(cucumber-core) +BuildRequires: rubygem(cucumber-expressions) BuildRequires: rubygem(cucumber-wire) BuildRequires: rubygem(multi_json) BuildRequires: rubygem(multi_test) @@ -52,20 +53,19 @@ BuildArch: noarch Documentation for %{name}. %prep -%setup -q -c -T -%gem_install -n %{SOURCE0} +%setup -q -n %{gem_name}-%{version} -b 1 -b 2 -pushd .%{gem_instdir} -%patch0 -p1 -%patch1 -p1 - -# Fix Ruby 2.4 compatibility. -# https://github.com/cucumber/cucumber-ruby/issues/1071 -sed -i -r '/include FixRuby21Bug9285/ s/(include FixRuby21Bug9285).*/\1/' lib/cucumber/runtime.rb -popd +# We don't have gherkin 5.1.0 in Fedora yet +%gemspec_remove_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '~> 5.1.0' +%gemspec_add_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '>= 4.1.0' %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} @@ -79,30 +79,42 @@ cp -pa .%{_bindir}/* \ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x -# Replave the bundled jQuery with system version. -ln -sf %{_jsdir}/jquery/1/jquery.min.js %{buildroot}%{gem_libdir}/cucumber/formatter/jquery-min.js +# Replace the bundled jQuery with system version. +ln -sf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{gem_libdir}/cucumber/formatter/jquery-min.js %check pushd .%{gem_instdir} +# Cucumber.yml is needed for both test suites. +# Used as fixture for rspec and options for cucumber. +ln -s %{_builddir}/cucumber.yml cucumber.yml + +ln -s %{_builddir}/spec spec # We don't need Pry. sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb rspec spec %if ! 0%{?bootstrap} +ln -s %{_builddir}/features features # This expects that test suite is executed from git repository. sed -i '/Scenario: Passing feature/i\ @skip' features/docs/raketask.feature +# TODO: Fails with "/usr/share/ruby/delegate.rb:83:in `method_missing'", not entirely sure why +# Issue at github: https://github.com/cucumber/cucumber-ruby/issues/1317 +sed -i '/Scenario: Ambiguous steps$/i\ @skip' features/docs/defining_steps/ambiguous_steps.feature + +# A feature requires Gemfile to work. +touch Gemfile + # Use RUBYOPT to make sure that the Cucumber from current directory has # precedence over system Cucumber, which is pulled in as Aruba dependency. -RUBYOPT=-Ilib cucumber --tags ~@skip +RUBYOPT=-Ilib cucumber --tags 'not @skip' %endif popd %files %dir %{gem_instdir} %{_bindir}/cucumber -%exclude %{gem_instdir}/.* %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_libdir} @@ -112,18 +124,13 @@ popd %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CONTRIBUTING.md -%{gem_instdir}/Gemfile* -%doc %{gem_instdir}/History.md %doc %{gem_instdir}/README.md -%{gem_instdir}/Rakefile -%{gem_instdir}/cucumber.yml -%{gem_instdir}/cucumber.gemspec -%{gem_instdir}/examples -%{gem_instdir}/features -%{gem_instdir}/gem_tasks -%{gem_instdir}/spec +%doc %{gem_instdir}/CHANGELOG.md %changelog +* Thu Aug 23 2018 Jaroslav Prokop - 3.1.2-1 +- Update to Cucumber 3.1.2. + * Sat Jul 14 2018 Fedora Release Engineering - 2.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 23c42f3..c0ef8af 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -SHA512 (cucumber-2.4.0.gem) = b7f9720e3f9e1f30aba9590ff92209073bdc028b880ac7a378f6dfe2a7f093c0521387cfc9319d7ed994c5e9de7106ccff23ba1f10c1cc5888785c69262c723e +SHA512 (cucumber-3.1.2.gem) = 71c97553e2a6d6fd2b6397827fce3f3495da1b97f1baa02d983018d5679a270588f7c8b441726f8e85936822b3822dd1ccdbdbbd8cdc2cc087f889828bb9719f +SHA512 (rubygem-cucumber-3.1.2-features.tar.gz) = 2b0f1dd664893e5bbe46d7a4681add550ee213f2a6a573bee683c234f9158685afc1a858b31a563548490565833432b7b9c96a3e71c31ef460e6ec8a0920d84f +SHA512 (rubygem-cucumber-3.1.2-spec.tar.gz) = a7093188ae1b91d23d2ab5052c8e493f4627b094f561829740c3059da43183dc516008a62086e724784d4b2dec3438393d3f95550c3adaa878b6c3dfb19eedca