!6 Update to 7.1.0

From: @lyn1001 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2023-01-28 03:37:47 +00:00 committed by Gitee
commit d4586e2554
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 34 additions and 145 deletions

View File

@ -1,47 +0,0 @@
From f2c64e5ef094576455d2e98f0557a965c5a57895 Mon Sep 17 00:00:00 2001
From: baizg1107 <preloyalwhite@163.com>
Date: Wed, 2 Mar 2022 14:35:40 +0800
Subject: [PATCH] fix features incompative
---
features/docs/defining_steps/nested_steps.feature | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/features/docs/defining_steps/nested_steps.feature b/features/docs/defining_steps/nested_steps.feature
index dfe9b5f..3e9993a 100644
--- a/features/docs/defining_steps/nested_steps.feature
+++ b/features/docs/defining_steps/nested_steps.feature
@@ -122,6 +122,7 @@ Feature: Nested Steps
"""
error (RuntimeError)
./features/step_definitions/steps2.rb:5:in `/I have a couple turtles/'
+ /usr/share/ruby/forwardable.rb:238:in `invoke_dynamic_step'
./features/step_definitions/steps2.rb:2:in `/two turtles/'
features/test_feature_1.feature:3:in `Given two turtles'
@@ -161,13 +162,16 @@ Feature: Nested Steps
Scenario: Call directly
Given a step that calls an undefined step
Undefined dynamic step: "this does not exist" (Cucumber::UndefinedDynamicStep)
+ /usr/share/ruby/forwardable.rb:238:in `invoke_dynamic_step'
./features/step_definitions/steps.rb:2:in `/^a step that calls an undefined step$/'
features/call_undefined_step_from_step_def.feature:4:in `Given a step that calls an undefined step'
Scenario: Call via another
Given a step that calls a step that calls an undefined step
Undefined dynamic step: "this does not exist" (Cucumber::UndefinedDynamicStep)
+ /usr/share/ruby/forwardable.rb:238:in `invoke_dynamic_step'
./features/step_definitions/steps.rb:2:in `/^a step that calls an undefined step$/'
+ /usr/share/ruby/forwardable.rb:238:in `invoke_dynamic_step'
./features/step_definitions/steps.rb:6:in `/^a step that calls a step that calls an undefined step$/'
features/call_undefined_step_from_step_def.feature:7:in `Given a step that calls a step that calls an undefined step'
@@ -177,5 +181,4 @@ Feature: Nested Steps
2 scenarios (2 failed)
2 steps (2 failed)
-
"""
--
2.27.0

Binary file not shown.

BIN
cucumber-7.1.0.gem Normal file

Binary file not shown.

View File

@ -1,70 +0,0 @@
From 486e4fe98b93580b63b504579d99c37790f4557d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Rasmusson?= <B.Rasmusson@computer.org>
Date: Mon, 23 Jul 2018 13:35:05 +0200
Subject: [PATCH] Pass the registry to the Wire plugin.
Also, the class StepArgument is only used in the Wire plugin, so move
it to Cucumber-Wire.
---
lib/cucumber/glue/step_definition.rb | 1 -
lib/cucumber/runtime.rb | 2 +-
lib/cucumber/step_argument.rb | 25 --------------------------
3 files changed, 1 insertion(+), 27 deletions(-)
delete mode 100644 lib/cucumber/step_argument.rb
diff --git a/lib/cucumber/glue/step_definition.rb b/lib/cucumber/glue/step_definition.rb
index 81b3630b4..a8f43c0f2 100644
--- a/lib/cucumber/glue/step_definition.rb
+++ b/lib/cucumber/glue/step_definition.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require 'cucumber/step_match'
-require 'cucumber/step_argument'
require 'cucumber/core_ext/string'
require 'cucumber/glue/invoke_in_world'
diff --git a/lib/cucumber/runtime.rb b/lib/cucumber/runtime.rb
index fa9f88e0d..f60cf64b9 100644
--- a/lib/cucumber/runtime.rb
+++ b/lib/cucumber/runtime.rb
@@ -273,7 +273,7 @@ def load_step_definitions
end
def install_wire_plugin
- Cucumber::Wire::Plugin.new(@configuration).install if @configuration.all_files_to_load.any? { |f| f =~ %r{\.wire$} }
+ Cucumber::Wire::Plugin.new(@configuration, @support_code.registry).install if @configuration.all_files_to_load.any? { |f| f =~ /\.wire$/ }
end
def log
diff --git a/lib/cucumber/step_argument.rb b/lib/cucumber/step_argument.rb
deleted file mode 100644
index c5d0cf076..000000000
--- a/lib/cucumber/step_argument.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-module Cucumber
- # Defines the location and value of a captured argument from the step
- # text
- class StepArgument
- def self.arguments_from(regexp, step_name)
- match = regexp.match(step_name)
- if match
- n = 0
- match.captures.map do |val|
- n += 1
- offset = match.offset(n)[0]
- new(offset, val)
- end
- end
- end
-
- attr_reader :offset, :val
-
- def initialize(offset, val)
- @offset, @val = offset, val
- end
- end
-end

View File

@ -1,24 +1,20 @@
%global gem_name cucumber
%{?_with_bootstrap: %global bootstrap 1}
Name: rubygem-%{gem_name}
Version: 3.1.2
Release: 2
Version: 7.1.0
Release: 1
Summary: Tool to execute plain-text documents as functional tests
License: MIT
URL: https://cucumber.io/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/%{gem_name}/%{gem_name}-ruby/archive/v%{version}.tar.gz
# Fix wire protocol.
# https://github.com/cucumber/cucumber-ruby/commit/486e4fe98b93580b63b504579d99c37790f4557d
Patch0: rubygem-cucumber-3.1.2-Pass-the-registry-to-the-Wire-plugin.patch
Patch1: 0001-fix-features-incompative.patch
Requires: js-jquery < 4
BuildRequires: ruby(release) rubygems-devel ruby js-jquery < 4 web-assets-devel
BuildRequires: ruby(release) rubygems-devel ruby
%if ! 0%{?bootstrap}
BuildRequires: rubygem(aruba)
%endif
BuildRequires: rubygem(rake) rubygem(webrick) rubygem(mime-types) rubygem(cucumber-create-meta)
BuildRequires: rubygem(builder) rubygem(bundler) rubygem(cucumber-core)
BuildRequires: rubygem(cucumber-expressions) rubygem(cucumber-wire) rubygem(multi_json)
BuildRequires: rubygem-cucumber-expressions rubygem(cucumber-wire) rubygem(multi_json)
BuildRequires: rubygem(multi_test) rubygem(nokogiri) rubygem(rspec) rubygem(did_you_mean)
BuildArch: noarch
%description
@ -34,15 +30,24 @@ BuildArch: noarch
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
%patch0 -p1
pushd %{_builddir}/%{gem_name}-ruby-%{version}
%patch1 -p1
popd
%gemspec_remove_file "lib/cucumber/step_argument.rb"
rm %{_builddir}/%{gem_name}-ruby-%{version}/spec/cucumber/step_argument_spec.rb
%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'
%setup -q -n %{gem_name}-%{version} -b 1
%gemspec_remove_dep -g cucumber-html-formatter
%gemspec_remove_dep -g diff-lcs "~> 1.4", ">= 1.4.4"
%gemspec_add_dep -g diff-lcs ">= 1.3"
%gemspec_remove_dep -g cucumber-gherkin "~> 22.0", ">= 22.0.0"
%gemspec_add_dep -g cucumber-gherkin ">= 20.0"
%gemspec_remove_dep -g multi_test "~> 0.1", ">= 0.1.2"
%gemspec_add_dep -g multi_test ">= 0.1.2"
%gemspec_remove_dep -g cucumber-cucumber-expressions "~> 14.0", ">= 14.0.0"
%gemspec_add_dep -g cucumber-cucumber-expressions ">= 12.1"
%gemspec_remove_dep -g cucumber-messages "~> 17.1", ">= 17.1.1"
%gemspec_add_dep -g cucumber-messages ">= 17.0"
%build
gem build ../%{gem_name}-%{version}.gemspec
@ -56,23 +61,21 @@ mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
ln -sf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{gem_libdir}/cucumber/formatter/jquery-min.js
%check
pushd .%{gem_instdir}
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/cucumber.yml cucumber.yml
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/spec spec
sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb
rspec -Ilib spec
%if %{without bootstrap}
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/features features
sed -i '/Scenario: Passing feature/i\ @skip' features/docs/raketask.feature
sed -i '/Scenario: Ambiguous steps$/i\ @skip' features/docs/defining_steps/ambiguous_steps.feature
sed -i '/Scenario: Undefined nested step$/i\ @skip' features/docs/defining_steps/nested_steps.feature
rspec spec
%if ! 0%{?bootstrap}
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/features features
sed -i '/Scenario: Passing feature/i\ @skip' features/docs/raketask.feature
sed -i '/Scenario: Ambiguous steps$/i\ @skip' features/docs/defining_steps/ambiguous_steps.feature
touch Gemfile
sed -i -e '/^ Scenario: output html to stdout$/i @skip' \
features/docs/formatters/html.feature
RUBYOPT=-Ilib cucumber --tags 'not @skip'
%endif
popd
@ -93,6 +96,9 @@ popd
%doc %{gem_instdir}/CHANGELOG.md
%changelog
* Mon Jan 9 2023 liyanan <liyanan32@h-partners.com> - 7.1.0-1
- Update to 7.1.0
* Tue Mar 01 2022 baizhonggui <baizhonggui@huawei.com> - 3.1.2-2
- Add ruby 3.0 support for fixing build error

Binary file not shown.

BIN
v7.1.0.tar.gz Normal file

Binary file not shown.