Update to Concurrent Ruby 1.1.5.

epel9
Vít Ondruch 5 years ago
parent 881a06fc5d
commit 96edfa4514

2
.gitignore vendored

@ -6,3 +6,5 @@
/concurrent-ruby-1.0.4.gem
/concurrent-ruby-1.0.5-specs.tar.gz
/concurrent-ruby-1.0.5.gem
/concurrent-ruby-1.1.5-specs.tar.gz
/concurrent-ruby-1.1.5.gem

@ -1,18 +0,0 @@
diff --git a/lib/concurrent/map.rb b/lib/concurrent/map.rb
index f3aa55d5..34696efc 100644
--- a/lib/concurrent/map.rb
+++ b/lib/concurrent/map.rb
@@ -210,12 +210,8 @@ module Concurrent
undef :freeze
# @!visibility private
- DEFAULT_OBJ_ID_STR_WIDTH = 0.size == 4 ? 7 : 14 # we want to look "native", 7 for 32-bit, 14 for 64-bit
- # override default #inspect() method: firstly, we don't want to be spilling our guts (i-vars), secondly, MRI backend's
- # #inspect() call on its @backend i-var will bump @backend's iter level while possibly yielding GVL
def inspect
- id_str = (object_id << 1).to_s(16).rjust(DEFAULT_OBJ_ID_STR_WIDTH, '0')
- "#<#{self.class.name}:0x#{id_str} entries=#{size} default_proc=#{@default_proc.inspect}>"
+ format '%s entries=%d default_proc=%s>', to_s[0..-2], size.to_s, @default_proc.inspect
end
private

@ -2,18 +2,15 @@
%global gem_name concurrent-ruby
Name: rubygem-%{gem_name}
Version: 1.0.5
Release: 6%{?dist}
Version: 1.1.5
Release: 1%{?dist}
Summary: Modern concurrency tools for Ruby
License: MIT
URL: http://www.concurrent-ruby.com
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/ruby-concurrency/concurrent-ruby.git && cd concurrent-ruby
# git checkout v1.0.5 && tar czvf concurrent-ruby-1.0.5-specs.tar.gz spec/
# git archive -v -o concurrent-ruby-1.1.5-specs.tar.gz v1.1.5 spec/
Source1: %{gem_name}-%{version}-specs.tar.gz
# Avoid sporadic test failures due to wrong object_id formatting.
# https://github.com/ruby-concurrency/concurrent-ruby/pull/651
Patch1: concurrent-ruby-1.0.5-fix-inspect-output.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 1.9.3
@ -38,17 +35,11 @@ BuildArch: noarch
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch1 -p1
%setup -q -n %{gem_name}-%{version} -b 1
%build
# Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec
gem build ../%{gem_name}-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
@ -60,10 +51,9 @@ cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
# Run the test suite
%check
pushd .%{gem_instdir}
tar xzf %{SOURCE1}
ln -s %{_builddir}/spec spec
# -edge is not part of this gem.
sed -i '/require.*concurrent-edge/ s/^/#/' spec/spec_helper.rb
@ -73,15 +63,22 @@ sed -i '/require.*concurrent-edge/ s/^/#/' spec/spec_helper.rb
sed -i '/allow_c_extensions?/,/^ end/ s/^/#/' spec/concurrent/atomic/atomic_reference_spec.rb
# Exclude the -edge test cases.
# Also exclude `scheduled_task_spec` and `timer_task_spec`,
# because these are pretty unstable:
# https://github.com/ruby-concurrency/concurrent-ruby/issues/824
rspec -rspec_helper \
--exclude-pattern 'spec/concurrent/{actor_spec.rb,channel_spec.rb,lazy_register_spec.rb,channel/**/*,atomic/atomic_markable_reference_spec.rb,edge/**/*}' \
-fd \
--exclude-pattern 'spec/concurrent/{actor_spec.rb,channel_spec.rb,lazy_register_spec.rb,channel/**/*,edge/**/*,promises_spec.rb,throttle_spec.rb,cancellation_spec.rb,scheduled_task_spec.rb,timer_task_spec.rb}' \
spec
popd
%files
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE.txt
%license %{gem_instdir}/LICENSE.md
# Containst just some Java sources. Very likely included by mistake.
%exclude %{gem_instdir}/ext
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
@ -89,9 +86,14 @@ popd
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%changelog
* Mon Sep 16 2019 Vít Ondruch <vondruch@redhat.com> - 1.1.5-1
- Update to Concurrent Ruby 1.1.5.
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

@ -1,2 +1,2 @@
SHA512 (concurrent-ruby-1.0.5-specs.tar.gz) = f13da35b9b6cce1182d822723811b27aa661c3dfd231e2d3ace09451ee01f737d343d1d18f5debc296b1534ef0b6a919e679a8ef693a7d75b557e65d19432ef0
SHA512 (concurrent-ruby-1.0.5.gem) = 523df60096e77a377405b71f9133f28284ca73284bb52456bf1e1a38dbb34c593b3aa2ed9ceb019afbed4805ba2bc3d7c846d3a66139924ec7fa0ccb3fcf9324
SHA512 (concurrent-ruby-1.1.5-specs.tar.gz) = 74f1de9259c30dfdfba54be065fd090bc47df6543af811fc76cf8022408435cbbfa64eb92d4acc3c46cd1b5a2ed5497d0c852779174a2ec0503617f227ce8b17
SHA512 (concurrent-ruby-1.1.5.gem) = 357fa6bbf65ff4143adba9de6713d28eacb03170b3b4218f53d80433de13ba50b1c3741a62ec355a3aa01388bcbd059e1bca3dd82c88cf56b8b3110c24b37613

Loading…
Cancel
Save