!5 Update the package version to 0.14.14

From: @liqiuyu123 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2022-03-04 04:10:29 +00:00 committed by Gitee
commit 3b3e2c34f5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 14 additions and 276 deletions

View File

@ -1,148 +0,0 @@
From 33222dbc543b600c91621770f34d62cd81903c32 Mon Sep 17 00:00:00 2001
From: Matijs van Zuijlen <matijs@matijs.net>
Date: Thu, 30 May 2019 17:24:05 +0200
Subject: [PATCH] Replace problematic AnsiColor module with simple
implementation
Backport from master
---
lib/aruba/colorizer.rb | 109 +++----------------------------
lib/aruba/platforms/announcer.rb | 2 +-
2 files changed, 11 insertions(+), 100 deletions(-)
diff --git a/lib/aruba/colorizer.rb b/lib/aruba/colorizer.rb
index 2db79c710..fc479c68d 100644
--- a/lib/aruba/colorizer.rb
+++ b/lib/aruba/colorizer.rb
@@ -1,108 +1,19 @@
+# Aruba
module Aruba
- # The ANSIColor module can be used for namespacing and mixed into your own
- # classes.
- module AnsiColor
- # :stopdoc:
- ATTRIBUTES = [
- [ :clear , 0 ],
- [ :reset , 0 ], # synonym for :clear
- [ :bold , 1 ],
- [ :dark , 2 ],
- [ :italic , 3 ], # not widely implemented
- [ :underline , 4 ],
- [ :underscore , 4 ], # synonym for :underline
- [ :blink , 5 ],
- [ :rapid_blink , 6 ], # not widely implemented
- [ :negative , 7 ], # no reverse because of String#reverse
- [ :concealed , 8 ],
- [ :strikethrough, 9 ], # not widely implemented
- [ :black , 30 ],
- [ :red , 31 ],
- [ :green , 32 ],
- [ :yellow , 33 ],
- [ :blue , 34 ],
- [ :magenta , 35 ],
- [ :cyan , 36 ],
- [ :white , 37 ],
- [ :on_black , 40 ],
- [ :on_red , 41 ],
- [ :on_green , 42 ],
- [ :on_yellow , 43 ],
- [ :on_blue , 44 ],
- [ :on_magenta , 45 ],
- [ :on_cyan , 46 ],
- [ :on_white , 47 ]
- ].freeze
-
- ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first
- # :startdoc:
-
- # Returns true, if the coloring function of this module
- # is switched on, false otherwise.
- def self.coloring?
- @coloring
- end
-
- # Turns the coloring on or off globally, so you can easily do
- # this for example:
- # Cucumber::Term::ANSIColor::coloring = STDOUT.isatty
- def self.coloring=(val)
- @coloring = val
- end
- self.coloring = true
-
- ATTRIBUTES.each do |c, v|
- define_method(c) do |string|
- result = ''
- result << "\e[#{v}m" if Aruba::AnsiColor.coloring?
- if block_given?
- result << yield
- elsif string
- result << string
- elsif respond_to?(:to_str)
- result << to_str
- else
- return result #only switch on
- end
- result << "\e[0m" if Aruba::AnsiColor.coloring?
- result
- end
- end
-
- # Regular expression that is used to scan for ANSI-sequences while
- # uncoloring strings.
- COLORED_REGEXP = /\e\[(?:[34][0-7]|[0-9])?m/
+ # Simple colorizer class. Only supports the color cyan
+ class Colorizer
+ class << self
+ attr_accessor :coloring
- def self.included(klass)
- if klass == String
- ATTRIBUTES.delete(:clear)
- ATTRIBUTE_NAMES.delete(:clear)
- end
+ alias coloring? coloring
end
- # Returns an uncolored version of the string, that is all
- # ANSI-sequences are stripped from the string.
- def uncolored(string = nil) # :yields:
- if block_given?
- yield.gsub(COLORED_REGEXP, '')
- elsif string
- string.gsub(COLORED_REGEXP, '')
- elsif respond_to?(:to_str)
- to_str.gsub(COLORED_REGEXP, '')
+ def cyan(string)
+ if self.class.coloring?
+ "\e[36m#{string}\e[0m"
else
- ''
+ string
end
end
-
- # Returns an array of all Aruba::Platforms::AnsiColor attributes as symbols.
- def attributes
- ATTRIBUTE_NAMES
- end
- end
-end
-
-module Aruba
- class Colorizer
- include Aruba::AnsiColor
end
end
diff --git a/lib/aruba/platforms/announcer.rb b/lib/aruba/platforms/announcer.rb
index 9b6a65b43..778b56115 100644
--- a/lib/aruba/platforms/announcer.rb
+++ b/lib/aruba/platforms/announcer.rb
@@ -1,7 +1,7 @@
require 'shellwords'
require 'aruba/colorizer'
-Aruba::AnsiColor.coloring = false if !STDOUT.tty? && !ENV.key?("AUTOTEST")
+Aruba::Colorizer.coloring = false if !STDOUT.tty? && !ENV.key?("AUTOTEST")
# Aruba
module Aruba

View File

@ -1,112 +0,0 @@
From 6ef7ea6be0d395868b4cf055b9470f9a8cf7a909 Mon Sep 17 00:00:00 2001
From: Matijs van Zuijlen <matijs@matijs.net>
Date: Sat, 28 Dec 2019 09:58:55 +0100
Subject: [PATCH 1/4] Silence keyword argument warnings on Ruby 2.7
---
lib/aruba/platforms/unix_platform.rb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/aruba/platforms/unix_platform.rb b/lib/aruba/platforms/unix_platform.rb
index a656130ce..f3bb76767 100644
--- a/lib/aruba/platforms/unix_platform.rb
+++ b/lib/aruba/platforms/unix_platform.rb
@@ -125,7 +125,8 @@ def mkdir(dir_name)
def rm(paths, options = {})
paths = Array(paths).map { |p| ::File.expand_path(p) }
- FileUtils.rm_r(paths, options)
+ FileUtils.rm_r(paths, :force => options[:force], :noop => options[:noop],
+ :verbose => options[:verbose], :secure => options[:secure])
end
# Get current working directory
@@ -144,7 +145,8 @@ def chdir(dir_name, &block)
# Touch file, directory
def touch(args, options)
- FileUtils.touch(args, options)
+ FileUtils.touch(args, :noop => options[:noop], :verbose => options[:verbose],
+ :mtime => options[:mtime], :nocreate => options[:nocreate])
end
# Copy file/directory
@@ -159,7 +161,8 @@ def mv(args, options)
# Change mode of file/directory
def chmod(mode, args, options)
- FileUtils.chmod_R(mode, args, options)
+ FileUtils.chmod_R(mode, args, :noop => options[:noop],
+ :verbose => options[:verbose], :force => options[:force])
end
# Exists and is file
From c37c40ad626ae1e17b01ca86b7c31e515a7a5a9f Mon Sep 17 00:00:00 2001
From: Matijs van Zuijlen <matijs@matijs.net>
Date: Sat, 28 Dec 2019 15:22:05 +0100
Subject: [PATCH 2/4] Clarify method parameter names
---
lib/aruba/platforms/unix_platform.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/aruba/platforms/unix_platform.rb b/lib/aruba/platforms/unix_platform.rb
index f3bb76767..ccfd8434c 100644
--- a/lib/aruba/platforms/unix_platform.rb
+++ b/lib/aruba/platforms/unix_platform.rb
@@ -150,13 +150,13 @@ def touch(args, options)
end
# Copy file/directory
- def cp(args, options)
- FileUtils.cp_r(args, options)
+ def cp(src, dest)
+ FileUtils.cp_r(src, dest)
end
# Move file/directory
- def mv(args, options)
- FileUtils.mv(args, options)
+ def mv(src, dest)
+ FileUtils.mv(src, dest)
end
# Change mode of file/directory
From d0076164a85e41ada00fed71740a44448692a9ee Mon Sep 17 00:00:00 2001
From: Matijs van Zuijlen <matijs@matijs.net>
Date: Sat, 28 Dec 2019 15:10:58 +0100
Subject: [PATCH 3/4] Update scenario to pass on Ruby 2.7
When running under childprocess, IRB does not activate readline. This
means history is not collected and the history file is empty if saved.
In Ruby 2.7, the file is not even written to. This means saving the
history file cannot properly be tested on Ruby 2.7 using Aruba. Instead,
we check that the correct file is configured in IRB, and just assume IRB
will do the right thing with it.
---
features/cli/console.feature | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/features/cli/console.feature b/features/cli/console.feature
index 88f95dc99..b79a3a827 100644
--- a/features/cli/console.feature
+++ b/features/cli/console.feature
@@ -44,9 +44,12 @@ Feature: Aruba Console
"""
@unsupported-on-platform-java
- Scenario: Has history
+ Scenario: Has its own history file
Given I run `aruba console` interactively
- And I type "aruba_methods"
+ And I type "IRB.conf[:HISTORY_FILE]"
And I type "exit"
When I close the stdin stream
- Then the file "~/.aruba_history" should exist
+ Then the output should contain:
+ """
+ ~/.aruba_history
+ """

BIN
aruba-0.14.14.gem Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,17 +1,15 @@
%global gem_name aruba %global gem_name aruba
Summary: CLI Steps for Cucumber, hand-crafted for you in Aruba Summary: CLI Steps for Cucumber, hand-crafted for you in Aruba
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 0.14.9 Version: 0.14.14
Release: 2 Release: 1
License: MIT License: MIT
URL: https://github.com/cucumber/aruba URL: https://github.com/cucumber/aruba
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch0: Replace-problematic-AnsiColor-module-with-simple.patch
Patch1: Silence-keyword-argument-warnings-on-Ruby-2.7.patch
BuildRequires: ruby(release) rubygems-devel ruby rubygem(cucumber) >= 1.3.19 BuildRequires: ruby(release) rubygems-devel ruby rubygem(cucumber) >= 1.3.19
BuildRequires: rubygem(childprocess) >= 0.5.6 rubygem(ffi) >= 1.9.10 rubygem(minitest) BuildRequires: rubygem(childprocess) >= 0.5.6 rubygem(ffi) >= 1.9.10 rubygem(minitest)
BuildRequires: rubygem(pry) rubygem(rspec) >= 3 rubygem(contracts) >= 0.9 BuildRequires: rubygem(pry) rubygem(rspec) >= 3 rubygem(contracts) >= 0.9
BuildRequires: rubygem(thor) >= 0.19 /usr/bin/python3 ruby-irb BuildRequires: rubygem(thor) >= 0.19 /usr/bin/python3 ruby(irb)
BuildArch: noarch BuildArch: noarch
%description %description
Aruba is Cucumber extension for Command line applications written Aruba is Cucumber extension for Command line applications written
@ -27,8 +25,6 @@ Documentation for %{name}
%prep %prep
%setup -q -n %{gem_name}-%{version} %setup -q -n %{gem_name}-%{version}
%gemspec_remove_dep -g childprocess '>= 0.6.3' %gemspec_remove_dep -g childprocess '>= 0.6.3'
%patch0 -p1
%patch1 -p1
%build %build
gem build ../%{gem_name}-%{version}.gemspec gem build ../%{gem_name}-%{version}.gemspec
@ -66,28 +62,27 @@ sed -i features/support/env.rb \
> features/support/simplecov_setup.rb > features/support/simplecov_setup.rb
sed -i fixtures/cli-app/spec/spec_helper.rb \ sed -i fixtures/cli-app/spec/spec_helper.rb \
-e "\@\$LOAD_PATH@s|\.\./\.\./lib|$(pwd)/lib|" -e "\@\$LOAD_PATH@s|\.\./\.\./lib|$(pwd)/lib|"
sed -i features/steps/command/shell.feature \
-e 's|zsh|bash|' \
-e '\@echo.*Hello.*c@s|echo|echo -e|'
if ! grep -q python3 features/steps/command/shell.feature if ! grep -q python3 features/steps/command/shell.feature
then then
sed -i features/steps/command/shell.feature -e 's|python|python3|' sed -i features/03_testing_frameworks/cucumber/steps/command/run_commands_which_require_a_shell.feature \
sed -i features/steps/command/shell.feature -e "s|python'|python3'|" -e 's|python|python3|'
sed -i lib/aruba/generators/script_file.rb \ sed -i lib/aruba/generators/script_file.rb \
-e '\@interpreter@s|A-Z|A-Z0-9|' -e '\@interpreter@s|A-Z|A-Z0-9|'
sed -i features/getting_started/run_commands.feature \ sed -i features/01_getting_started_with_aruba/run_commands.feature \
-e '\@[^-]python@s|python|python3|' -e '\@[^-]python@s|python|python3|'
fi fi
mv features/04_aruba_api/filesystem/report_disk_usage.feature{,.skip}
sed -i Rakefile \ sed -i Rakefile \
-e '\@[Bb]undler@d' \ -e '\@[Bb]undler@d' \
-e 's|bundle exec ||' \ -e 's|bundle exec ||' \
%{nil} %{nil}
sed -i features/api/core/expand_path.feature -e "s|/home/\[\^/\]+|$(echo $HOME)|" sed -i features/04_aruba_api/core/expand_path.feature -e "s|/home/\[\^/\]+|$(echo $HOME)|"
sed -i features/configuration/home_directory.feature \ sed -i features/02_configure_aruba/home_directory.feature \
-e "\@Scenario: Default value@,\@Scenario@s|/home/|$(echo $HOME)|" -e "\@Scenario: Default value@,\@Scenario@s|/home/|$(echo $HOME)|"
sed -i features/configuration/home_directory.feature \ sed -i features/02_configure_aruba/home_directory.feature \
-e "\@Set to aruba's working directory@,\@Scenario@s|/home/|$(echo $HOME)/|" -e "\@Set to aruba's working directory@,\@Scenario@s|/home/|$(echo $HOME)/|"
RUBYOPT=-I$(pwd)/lib cucumber RUBYOPT=-I$(pwd)/lib cucumber
mv features/04_aruba_api/filesystem/report_disk_usage.feature{.skip,}
popd popd
%files %files
@ -109,6 +104,9 @@ popd
%{gem_instdir}/templates/ %{gem_instdir}/templates/
%changelog %changelog
* Thur Mar 3 2022 liqiuyu <liqiuyu@kylinos.cn> - 0.14.14-1
- update to 0.14.14
* Mon Feb 21 2022 liyanan <liyanan32@huawei.com> - 0.14.9-2 * Mon Feb 21 2022 liyanan <liyanan32@huawei.com> - 0.14.9-2
- fix build error - fix build error