Upgrade version to 0.8.1
Signed-off-by: cherry530 <707078654@qq.com>
This commit is contained in:
parent
a4911c6724
commit
d1532934cf
@ -1,53 +0,0 @@
|
|||||||
diff -Nur a/test/current_bindings_test.rb b/test/current_bindings_test.rb
|
|
||||||
--- a/test/current_bindings_test.rb 2022-01-26 10:31:50.154632034 +0800
|
|
||||||
+++ b/test/current_bindings_test.rb 2022-01-26 10:31:16.638078095 +0800
|
|
||||||
@@ -2,6 +2,8 @@
|
|
||||||
|
|
||||||
class CurrentBindingsTest < BaseTest
|
|
||||||
test 'first binding returned is the current one' do
|
|
||||||
- assert_equal __LINE__, Bindex.current_bindings.first.eval('__LINE__')
|
|
||||||
+ _, lineno = Bindex.current_bindings.first.source_location
|
|
||||||
+
|
|
||||||
+ assert_equal __LINE__ - 2, lineno
|
|
||||||
end
|
|
||||||
end
|
|
||||||
diff -Nur a/test/exception_test.rb b/test/exception_test.rb
|
|
||||||
--- a/test/exception_test.rb 2022-01-26 10:31:50.154632034 +0800
|
|
||||||
+++ b/test/exception_test.rb 2022-01-26 10:28:40.535498131 +0800
|
|
||||||
@@ -4,31 +4,31 @@
|
|
||||||
test 'bindings returns all the bindings of where the error originated' do
|
|
||||||
exc = FlatFixture.new.call
|
|
||||||
|
|
||||||
- assert_equal 3, exc.bindings.first.eval('__LINE__')
|
|
||||||
+ assert_equal 3, exc.bindings.first.source_location.last
|
|
||||||
end
|
|
||||||
|
|
||||||
test 'bindings returns all the bindings of where a custom error originate' do
|
|
||||||
exc = CustomErrorFixture.new.call
|
|
||||||
|
|
||||||
- assert_equal 5, exc.bindings.first.eval('__LINE__')
|
|
||||||
+ assert_equal 5, exc.bindings.first.source_location.last
|
|
||||||
end
|
|
||||||
|
|
||||||
test 'bindings goes down the_stack' do
|
|
||||||
exc = BasicNestedFixture.new.call
|
|
||||||
|
|
||||||
- assert_equal 11, exc.bindings.first.eval('__LINE__')
|
|
||||||
+ assert_equal 11, exc.bindings.first.source_location.last
|
|
||||||
end
|
|
||||||
|
|
||||||
test 'bindings inside_of_an_eval' do
|
|
||||||
exc = EvalNestedFixture.new.call
|
|
||||||
|
|
||||||
- assert_equal 11, exc.bindings.first.eval('__LINE__')
|
|
||||||
+ assert_equal 11, exc.bindings.first.source_location.last
|
|
||||||
end
|
|
||||||
|
|
||||||
test "re-raising doesn't lose bindings information" do
|
|
||||||
exc = ReraisedFixture.new.call
|
|
||||||
|
|
||||||
- assert_equal 3, exc.bindings.first.eval('__LINE__')
|
|
||||||
+ assert_equal 3, exc.bindings.first.source_location.last
|
|
||||||
end
|
|
||||||
|
|
||||||
test 'bindings is_empty_when_exception_is_still_not_raised' do
|
|
||||||
BIN
bindex-0.5.0.gem
BIN
bindex-0.5.0.gem
Binary file not shown.
BIN
bindex-0.8.1.gem
Normal file
BIN
bindex-0.8.1.gem
Normal file
Binary file not shown.
@ -1,12 +1,11 @@
|
|||||||
%global gem_name bindex
|
%global gem_name bindex
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 0.5.0
|
Version: 0.8.1
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Bindings for your Ruby exceptions
|
Summary: Bindings for your Ruby exceptions
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/gsamokovarov/bindex
|
URL: https://github.com/gsamokovarov/bindex
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
Patch0: Fix-test-error.patch
|
|
||||||
BuildRequires: ruby(release) rubygems-devel ruby-devel >= 2.0.0 gcc rubygem(minitest)
|
BuildRequires: ruby(release) rubygems-devel ruby-devel >= 2.0.0 gcc rubygem(minitest)
|
||||||
%description
|
%description
|
||||||
Bindings for your Ruby exceptions.
|
Bindings for your Ruby exceptions.
|
||||||
@ -23,7 +22,6 @@ Documentation for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
gem unpack %{SOURCE0}
|
gem unpack %{SOURCE0}
|
||||||
%setup -q -D -T -n %{gem_name}-%{version}
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||||||
%patch0 -p1
|
|
||||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -34,9 +32,9 @@ gem build %{gem_name}.gemspec
|
|||||||
mkdir -p %{buildroot}%{gem_dir}
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
cp -a .%{gem_dir}/* \
|
cp -a .%{gem_dir}/* \
|
||||||
%{buildroot}%{gem_dir}/
|
%{buildroot}%{gem_dir}/
|
||||||
mkdir -p %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
mkdir -p %{buildroot}%{gem_extdir_mri}/skiptrace/internal/
|
||||||
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
|
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
|
||||||
cp -a .%{gem_extdir_mri}/%{gem_name}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
cp -a .%{gem_extdir_mri}/skiptrace/internal/*.so %{buildroot}%{gem_extdir_mri}/skiptrace/internal/
|
||||||
rm -rf %{buildroot}%{gem_instdir}/ext/
|
rm -rf %{buildroot}%{gem_instdir}/ext/
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -50,8 +48,9 @@ popd
|
|||||||
%exclude %{gem_instdir}/.*
|
%exclude %{gem_instdir}/.*
|
||||||
%license %{gem_instdir}/LICENSE.txt
|
%license %{gem_instdir}/LICENSE.txt
|
||||||
%exclude %{gem_instdir}/bindex.gemspec
|
%exclude %{gem_instdir}/bindex.gemspec
|
||||||
|
%exclude %{gem_instdir}/skiptrace.gemspec
|
||||||
%{gem_libdir}
|
%{gem_libdir}
|
||||||
%exclude %{gem_libdir}/bindex/*.jar
|
%exclude %{gem_libdir}/skiptrace/internal/*.jar
|
||||||
%exclude %{gem_cache}
|
%exclude %{gem_cache}
|
||||||
%{gem_spec}
|
%{gem_spec}
|
||||||
|
|
||||||
@ -64,6 +63,9 @@ popd
|
|||||||
%{gem_instdir}/test
|
%{gem_instdir}/test
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 14 2023 xu_ping <707078654@qq.com> - 0.8.1-1
|
||||||
|
- Upgrade version to 0.8.1
|
||||||
|
|
||||||
* Wed Jan 26 2022 liyanan <liyanan32@huawei.com> - 0.5.0-2
|
* Wed Jan 26 2022 liyanan <liyanan32@huawei.com> - 0.5.0-2
|
||||||
- Fix test error
|
- Fix test error
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user