!1 package initialize

Merge pull request !1 from 谢政/master
This commit is contained in:
openeuler-ci-bot 2020-08-27 09:13:34 +08:00 committed by Gitee
commit 134d22f81a
4 changed files with 113 additions and 0 deletions

BIN
rspec-its-1.2.0.gem Normal file

Binary file not shown.

View File

@ -0,0 +1,33 @@
From e28d273df0c75a16278bd959d46c6489b035860e Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Tue, 12 Sep 2017 23:19:25 +0200
Subject: [PATCH] Fixnum to integer
---
spec/rspec/its_spec.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/rspec/its_spec.rb b/spec/rspec/its_spec.rb
index 91eed5f..83788f6 100644
--- a/spec/rspec/its_spec.rb
+++ b/spec/rspec/its_spec.rb
@@ -55,7 +55,7 @@ module RSpec
end
its("name") { should eq("John") }
its("name.size") { should eq(4) }
- its("name.size.class") { should eq(Fixnum) }
+ its("name.size.class") { should eq(Integer) }
context "using should_not" do
its("name") { should_not eq("Paul") }
@@ -86,7 +86,7 @@ module RSpec
end
its([:a]) { should eq("Symbol: a") }
its(['a']) { should eq("String: a") }
- its([:b, 'c', 4]) { should eq("Symbol: b; String: c; Fixnum: 4") }
+ its([:b, 'c', 4]) { should eq("Symbol: b; String: c; Integer: 4") }
its(:name) { should eq("George") }
context "when referring to an attribute that doesn't exist" do
context "it raises an error" do
--
1.8.3.1

76
rubygem-rspec-its.spec Normal file
View File

@ -0,0 +1,76 @@
%global gem_name rspec-its
Name: rubygem-%{gem_name}
Version: 1.2.0
Release: 1
Summary: Provides "its" method formerly part of rspec-core
License: MIT
URL: https://github.com/rspec/rspec-its
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Fix Ruby 2.4 compatibility
# https://github.com/rspec/rspec-its/pull/45
Patch0: rubygem-rspec-its-1.2.0-Fix-Ruby-2.4-compatibility.patch
%if 0%{?el7}
Requires: ruby(release) ruby(rubygems) rubygem-rspec-core
Requires: rubygem(rspec-expectations) >= 2.99.0.beta1
%endif
BuildRequires: ruby(release) rubygems-devel rubygem-rspec-core rubygem(rspec-expectations)
BuildRequires: rubygem(aruba)
BuildArch: noarch
%if 0%{?el7}
Provides: rubygem(%{gem_name}) = %{version}
%endif
%description
RSpec extension gem for attribute matching.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
cat %{PATCH0} | patch -p1 -F 0
rspec -Ilib spec
export RUBYOPT="-I${PWD}/lib"
cucumber
popd
%files
%{!?_licensedir:%global license %%doc}
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE.txt
%{gem_libdir}
%exclude %{gem_cache}
%exclude %{gem_instdir}/.*
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/Changelog.md
%{gem_instdir}/cucumber.yml
%{gem_instdir}/features
%{gem_instdir}/spec
%{gem_instdir}/Gemfile
%{gem_instdir}/Rakefile
%{gem_instdir}/script
%doc %{gem_instdir}/README.md
%{gem_instdir}/%{gem_name}.gemspec
%changelog
* Tue Aug 18 2020 xiezheng <xiezheng4@huawei.com> - 1.2.0-1
- package init

4
rubygem-rspec-its.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: rspec/rspec-its
tag_prefix: "v"
separator: "."