diff options
author | Hans de Graaff <graaff@gentoo.org> | 2022-10-23 11:41:47 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2022-10-23 12:00:37 +0200 |
commit | 97dd93355d6ccaca04d15f3d3d2fa76d794839f7 (patch) | |
tree | a2dd45026959541e27295f613c2527bc7a4b74ac /dev-ruby/async | |
parent | dev-ruby/console: fix sandbox violation in tests (diff) | |
download | gentoo-97dd93355d6ccaca04d15f3d3d2fa76d794839f7.tar.gz gentoo-97dd93355d6ccaca04d15f3d3d2fa76d794839f7.tar.bz2 gentoo-97dd93355d6ccaca04d15f3d3d2fa76d794839f7.zip |
dev-ruby/async: add 2.2.1, fix tests for 1.x
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/async')
-rw-r--r-- | dev-ruby/async/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/async/async-1.30.3.ebuild | 18 | ||||
-rw-r--r-- | dev-ruby/async/async-2.2.1.ebuild | 42 |
3 files changed, 52 insertions, 9 deletions
diff --git a/dev-ruby/async/Manifest b/dev-ruby/async/Manifest index 2d7531f0b811..5e2fbb8a8720 100644 --- a/dev-ruby/async/Manifest +++ b/dev-ruby/async/Manifest @@ -1,2 +1,3 @@ DIST async-1.30.3.tar.gz 92599 BLAKE2B 69db66676adf2dd0f77142bffc55b1e90a6983c53c7fac444f72b9365f6907e4d2ec45579ea267f3a8f31fc45af63c3517908c353749b288d1873e2cf720f96b SHA512 337a51ca8fd0e6685528e2eca9b584344ba583f7254f2600110ee62da6e4ccabeb471e7d94f36ab6f8d0eb3eada9e23335a262a50c8d035f67708fce0a590e5e DIST async-2.1.0.tar.gz 75110 BLAKE2B 6226cd64f62d42a57d46f1c31287e403af5c645343a2de899a090f986e2b669dc96f1019629cf32ed46809fbfcbb5716375ef4560358676759dcad0e17d02849 SHA512 85f02004f7851757425f6e30c364ad9cb52ac4ad4559fa3a4a9b933fc5df1f10f6975233df6057da479dc28b5188d9e6d0b70e215a4a99b7864938260571089c +DIST async-2.2.1.tar.gz 75671 BLAKE2B a652bbb99d49c569fd864015059391a013f35c888be1e3b32ae06900bb861274390543c64ac9687689cb012c9b4c82df7764e4aaa50d2e76b595fdc7736ec8f5 SHA512 329862fa30f56371092666bef199b949e6325d99696a7ef2029cf9524a5cea31fc361cfaf438e15731c8e09c06ca47261fd3fcdce306a464332def9897c8dec5 diff --git a/dev-ruby/async/async-1.30.3.ebuild b/dev-ruby/async/async-1.30.3.ebuild index f4164212833c..0624935ba1a7 100644 --- a/dev-ruby/async/async-1.30.3.ebuild +++ b/dev-ruby/async/async-1.30.3.ebuild @@ -3,18 +3,20 @@ EAPI=8 -USE_RUBY="ruby26 ruby27 ruby30 ruby31" +USE_RUBY="ruby27 ruby30 ruby31" + RUBY_FAKEGEM_RECIPE_TEST="rspec3" RUBY_FAKEGEM_EXTRADOC="README.md" RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + inherit ruby-fakegem DESCRIPTION="A concurrency framework for Ruby" HOMEPAGE="https://github.com/socketry/async" -SRC_URI="https://github.com/socketry/async/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/socketry/async/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" -SLOT="$(ver_cut 1)/$(ver_cut 1-2)" +SLOT="$(ver_cut 1)" KEYWORDS="~amd64 ~sparc" IUSE="" @@ -30,11 +32,9 @@ ruby_add_bdepend "test? ( all_ruby_prepare() { sed -i -E 's/require_relative "(.+)"/require File.expand_path("\1")/g' "${RUBY_FAKEGEM_GEMSPEC}" || die - # network tests - rm -f "spec/async/scheduler_spec.rb" "spec/async/scheduler/address_spec.rb" "spec/async/scheduler/io_spec.rb" || die - - # broken on ruby 3.x - rm -f "spec/async/condition_spec.rb" "spec/async/notification_spec.rb" || die + # Avoid network tests + sed -i -e '/can fetch website using Net::HTTP/askip "requires network"' spec/async/scheduler_spec.rb || die - sed -i -E 's/require '"'"'covered\/rspec'"'"'//g' "spec/spec_helper.rb" || die + # Avoid test dependency on unpackaged covered + sed -i -e '/covered/ s:^:#:' spec/spec_helper.rb || die } diff --git a/dev-ruby/async/async-2.2.1.ebuild b/dev-ruby/async/async-2.2.1.ebuild new file mode 100644 index 000000000000..6e2688dbe2b7 --- /dev/null +++ b/dev-ruby/async/async-2.2.1.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby31" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" +RUBY_FAKEGEM_EXTRADOC="readme.md" +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="A concurrency framework for Ruby" +HOMEPAGE="https://github.com/socketry/async" +SRC_URI="https://github.com/socketry/async/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~sparc" +IUSE="" + +ruby_add_rdepend ">=dev-ruby/console-1.10:1 + dev-ruby/io-event:1.1 + >=dev-ruby/timers-4.1:4" + +ruby_add_bdepend "test? ( + >=dev-ruby/async-rspec-1.1:1 + dev-ruby/benchmark-ips +)" + +all_ruby_prepare() { + sed -i -E 's/require_relative "(.+)"/require File.expand_path("\1")/g' "${RUBY_FAKEGEM_GEMSPEC}" || die + + # network tests + rm -f \ + "spec/net/http_spec.rb" \ + "spec/async/scheduler/address_spec.rb" \ + "spec/async/scheduler/io_spec.rb" || die + + sed -i -E 's/require '"'"'covered\/rspec'"'"'//g' "spec/spec_helper.rb" || die +} |