From 25e113f8551f7727de6f7329b95168df8ab984c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 20 Jan 2017 19:32:20 +0100 Subject: [PATCH] Update to Cucumber 2.4.0. Bootstrap round. --- .gitignore | 1 + ...2.4.0-Fix-Aruba-0.14.x-compatibility.patch | 33 ++++++++++++++++ rubygem-cucumber.spec | 38 +++++++++++-------- sources | 2 +- 4 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 cucumber-2.4.0-Fix-Aruba-0.14.x-compatibility.patch diff --git a/.gitignore b/.gitignore index 2b1c1b0..2af5c89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ 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 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 new file mode 100644 index 0000000..0a5c212 --- /dev/null +++ b/cucumber-2.4.0-Fix-Aruba-0.14.x-compatibility.patch @@ -0,0 +1,33 @@ +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/rubygem-cucumber.spec b/rubygem-cucumber.spec index 6633baa..ad80ba7 100644 --- a/rubygem-cucumber.spec +++ b/rubygem-cucumber.spec @@ -1,10 +1,11 @@ %global gem_name cucumber +%global bootstrap 1 %{?_with_bootstrap: %global bootstrap 1} Name: rubygem-%{gem_name} -Version: 2.3.3 -Release: 2%{?dist} +Version: 2.4.0 +Release: 0.1%{?dist} Summary: Tool to execute plain-text documents as functional tests Group: Development/Languages License: MIT @@ -13,17 +14,21 @@ 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 BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby -BUildRequires: js-jquery1 +BuildRequires: js-jquery1 BuildRequires: web-assets-devel # Aruba has circular dependency with Cucumber. %if ! 0%{?bootstrap} BuildRequires: rubygem(aruba) %endif BuildRequires: rubygem(builder) +BuildRequires: rubygem(bundler) BuildRequires: rubygem(cucumber-core) BuildRequires: rubygem(cucumber-wire) BuildRequires: rubygem(multi_json) @@ -53,6 +58,11 @@ Documentation for %{name}. 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 %build @@ -70,10 +80,6 @@ cp -pa .%{_bindir}/* \ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x -# Fix permissions. -# https://github.com/cucumber/cucumber-ruby/pull/968 -chmod a-x %{buildroot}%{gem_instdir}/lib/cucumber/formatter/cucumber.* - # Replave the bundled jQuery with system version. ln -sf %{_jsdir}/jquery/1/jquery.min.js %{buildroot}%{gem_libdir}/cucumber/formatter/jquery-min.js @@ -85,13 +91,12 @@ sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb rspec spec %if ! 0%{?bootstrap} -# There are several test failures, such as: -# superclass mismatch for class HiddenBackgroundPrinter (TypeError) -# - Not really sure what is the reason and how to fix this. -# missing Bundler and missing git -# - But adding Bundler uncovers missing git repository, now worth of the -# effort probably. -cucumber | grep '1113 steps (7 failed, 3 skipped, 1103 passed)' +# This expects that test suite is executed from git repository. +sed -i '/Scenario: Passing feature/i\ @skip' features/docs/raketask.feature + +# 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 %endif popd @@ -99,8 +104,8 @@ popd %dir %{gem_instdir} %{_bindir}/cucumber %exclude %{gem_instdir}/.* -%{gem_instdir}/bin %license %{gem_instdir}/LICENSE +%{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} @@ -120,6 +125,9 @@ popd %{gem_instdir}/spec %changelog +* Fri Jan 20 2017 Vít Ondruch - 2.4.0-1 +- Update to Cucumber 2.4.0. + * Thu Nov 24 2016 Vít Ondruch - 2.3.3-2 - Fix FTBFS. diff --git a/sources b/sources index 5fdef69..23c42f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -53e558c2f29a73b48399381071e10385 cucumber-2.3.3.gem +SHA512 (cucumber-2.4.0.gem) = b7f9720e3f9e1f30aba9590ff92209073bdc028b880ac7a378f6dfe2a7f093c0521387cfc9319d7ed994c5e9de7106ccff23ba1f10c1cc5888785c69262c723e