Update to 7.1.0

This commit is contained in:
openeuler-ci-bot 2022-03-30 08:36:58 +00:00 committed by lyn1001
commit 2664e96800
6 changed files with 37 additions and 90 deletions

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,21 @@
%global gem_name cucumber %global gem_name cucumber
%{?_with_bootstrap: %global bootstrap 1} %{?_with_bootstrap: %global bootstrap 1}
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 3.1.2 Version: 7.1.0
Release: 1 Release: 1
Summary: Tool to execute plain-text documents as functional tests Summary: Tool to execute plain-text documents as functional tests
License: MIT License: MIT
URL: https://cucumber.io/ URL: https://cucumber.io/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/%{gem_name}/%{gem_name}-ruby/archive/v%{version}.tar.gz Source1: https://github.com/%{gem_name}/%{gem_name}-ruby/archive/v%{version}.tar.gz
# Fix wire protocol. BuildRequires: ruby(release) rubygems-devel ruby
# https://github.com/cucumber/cucumber-ruby/commit/486e4fe98b93580b63b504579d99c37790f4557d
Patch0: rubygem-cucumber-3.1.2-Pass-the-registry-to-the-Wire-plugin.patch
Requires: js-jquery < 4
BuildRequires: ruby(release) rubygems-devel ruby js-jquery < 4 web-assets-devel
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
BuildRequires: rubygem(aruba) BuildRequires: rubygem(aruba)
%endif %endif
BuildRequires: rubygem(rake) rubygem(webrick) rubygem(mime-types) rubygem(cucumber-create-meta)
BuildRequires: rubygem(builder) rubygem(bundler) rubygem(cucumber-core) 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) BuildRequires: rubygem(multi_test) rubygem(nokogiri) rubygem(rspec) rubygem(did_you_mean)
BuildArch: noarch BuildArch: noarch
%description %description
Cucumber lets software development teams describe how software should behave Cucumber lets software development teams describe how software should behave
@ -34,11 +31,23 @@ Documentation for %{name}.
%prep %prep
%setup -q -n %{gem_name}-%{version} -b 1 %setup -q -n %{gem_name}-%{version} -b 1
%patch0 -p1
%gemspec_remove_file "lib/cucumber/step_argument.rb" %gemspec_remove_dep -g cucumber-html-formatter
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_remove_dep -g diff-lcs "~> 1.4", ">= 1.4.4"
%gemspec_add_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '>= 4.1.0' %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 %build
gem build ../%{gem_name}-%{version}.gemspec gem build ../%{gem_name}-%{version}.gemspec
@ -52,19 +61,21 @@ mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \ cp -pa .%{_bindir}/* \
%{buildroot}%{_bindir}/ %{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x 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 %check
pushd .%{gem_instdir} pushd .%{gem_instdir}
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/cucumber.yml cucumber.yml ln -s %{_builddir}/%{gem_name}-ruby-%{version}/cucumber.yml cucumber.yml
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/spec spec ln -s %{_builddir}/%{gem_name}-ruby-%{version}/spec spec
sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb
rspec spec
%if ! 0%{?bootstrap} rspec -Ilib spec
%if %{without bootstrap}
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/features features 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 -e '/^ Scenario: output html to stdout$/i @skip' \
touch Gemfile features/docs/formatters/html.feature
RUBYOPT=-Ilib cucumber --tags 'not @skip' RUBYOPT=-Ilib cucumber --tags 'not @skip'
%endif %endif
popd popd
@ -85,5 +96,11 @@ popd
%doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/CHANGELOG.md
%changelog %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
* Wed Aug 19 2020 fanjiachen <fanjiachen3@huawei.com> - 3.1.2-1 * Wed Aug 19 2020 fanjiachen <fanjiachen3@huawei.com> - 3.1.2-1
- package init - package init

Binary file not shown.

BIN
v7.1.0.tar.gz Normal file

Binary file not shown.