diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-25 12:50:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-25 12:50:15 +0000 |
commit | 71d582d27eeece574ab3d904aa3fbe7742b0e895 (patch) | |
tree | a859a9d4a94b41c113fb5bdb5c4ffe261d884970 /dev-ruby/contracts | |
parent | 0b82ae29b3034efe3e7b7f533dbcb76168544c5e (diff) |
gentoo auto-resync : 25:03:2023 - 12:50:15
Diffstat (limited to 'dev-ruby/contracts')
-rw-r--r-- | dev-ruby/contracts/Manifest | 2 | ||||
-rw-r--r-- | dev-ruby/contracts/contracts-0.17-r1.ebuild | 31 | ||||
-rw-r--r-- | dev-ruby/contracts/files/contracts-0.17-ruby32.patch | 120 |
3 files changed, 153 insertions, 0 deletions
diff --git a/dev-ruby/contracts/Manifest b/dev-ruby/contracts/Manifest index aee8943a5276..993742a1cf94 100644 --- a/dev-ruby/contracts/Manifest +++ b/dev-ruby/contracts/Manifest @@ -1,5 +1,7 @@ +AUX contracts-0.17-ruby32.patch 3364 BLAKE2B 14e94549b81de0cc30728cc227a3ed3432b771c7c9a6fd29ff8615ff865f8bb0beba87087504364e1c88c60f28c3b9f643c438bb0ebf06db3ce8ac684639ba9f SHA512 f15f448918eaa2d2e73ff7e88c137ba7751471d1dc100827f79092dec6846f18eee1bb81b8f1175d770e5c4d8e55a3d8ac9df377353f90926b943f6f0754ff59 DIST contracts-0.16.1.gem 57856 BLAKE2B 72978a2a47b75411d2ae74521470d5958ef711351e2ce6776f1331b0d3f4b175d43f991a73fd2332ac0e1f6732b05a65887054a0be4452fd62f058a28ba929be SHA512 bc182431de9efbc6d23603c68a64eddcd3f27ea1ac8c2c9ff00840cf38d2f58ba595304127e6b43e504d3aa387559a5c1429b671dadac175d3a4ad2c02edbf6a DIST contracts-0.17.gem 58368 BLAKE2B 2bccd3a552268821b3c34a08fef3d6c0e43e27f8a0e56a2b7b0291d388142a2efb3686230d4daaea6e82c45be8d42f2ab61d1aa3d6a7f682bd7d99a0af7f179d SHA512 bce1417e7b505ec35b43917d53cbdb175995ff877da2a6122e08b3c7e537d557785987a0110006525dd079f09d574be3f5f4793154f99ac91c32f83662fa311b EBUILD contracts-0.16.1.ebuild 493 BLAKE2B 260637f892121209606ced2306f0a7224700f5036d185d35ddc3691d6c6a3890cb8335d231a0c67717613162c01fd7b53481375cba784ccb174a3916ded09d41 SHA512 24ee4b0e1befa12fcc27bee1bc69d35479bdc9bbe127b0b86a1444024508ab53496c415fbca1b82a002ba03a2a035b74b20b0836a78da22cc8ebca1faf3e6742 +EBUILD contracts-0.17-r1.ebuild 905 BLAKE2B e2d22603ddf8d9d6d32a7169d5f02c186a331daa6aeff2187a77f27abfdf99b0355fa8bbf7efc05a82a68235cc36c36983498b6e19da1ef30661797de9421fe8 SHA512 5b2a6f29597a849ab5a51f8374d7a5842f164fab7c90b6650e1ec1fe8933e6fabd21167e856cc92dc4ae52a04163691498fd671c64e62bda0d219c3d0c76c6d9 EBUILD contracts-0.17.ebuild 859 BLAKE2B f3325a2955d456e760d43c9dcb121fafb1a8be823ce3a753e3da425e64e6c604ff006edfa19ac89fd68e4ca347a19f718d108415978a28e60cb3215ecf91c312 SHA512 982ca2ff5584af6fb91e63aaefd471cfa58919ea79351f7942b4d61006c97fd49e663f273700897e44c9df8ac371ff0e400c77d649a446797e7e82807b3e0e6b MISC metadata.xml 353 BLAKE2B ec68a13b1faccc1cf044530138380700063502c1844fe5fd23c79717b15aaaebc7c0a65789b60c0bed1ebac36f87d4fbedf93374fe0fee300e5cb4fe81653838 SHA512 b03899010b43019e54ad01b3a160bd76cead6cb7e3cad3ab1ca0f1a63ce497ae7522530b01578de8d9de962061629d0453ae99154b4d97a90815df71b47f2466 diff --git a/dev-ruby/contracts/contracts-0.17-r1.ebuild b/dev-ruby/contracts/contracts-0.17-r1.ebuild new file mode 100644 index 000000000000..6232037c76e4 --- /dev/null +++ b/dev-ruby/contracts/contracts-0.17-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby30 ruby31 ruby32" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.markdown README.md TODO.markdown TUTORIAL.md" + +inherit ruby-fakegem + +DESCRIPTION="provides contracts for Ruby" +HOMEPAGE="https://github.com/egonSchiele/contracts.ruby" + +LICENSE="MIT" +SLOT="$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +PATCHES=( + "${FILESDIR}"/${P}-ruby32.patch +) + +each_ruby_test() { + # COLUMNS needed for: + # ./spec/contracts_spec.rb:654 # Contracts: Contracts to_s formatting in expected should wrap and pretty print for long return contracts + # ./spec/contracts_spec.rb:643 # Contracts: Contracts to_s formatting in expected should wrap and pretty print for long param contracts + local -x COLUMNS=80 + each_fakegem_test +} diff --git a/dev-ruby/contracts/files/contracts-0.17-ruby32.patch b/dev-ruby/contracts/files/contracts-0.17-ruby32.patch new file mode 100644 index 000000000000..0f28e763ddac --- /dev/null +++ b/dev-ruby/contracts/files/contracts-0.17-ruby32.patch @@ -0,0 +1,120 @@ +https://github.com/egonSchiele/contracts.ruby/issues/300 +https://github.com/egonSchiele/contracts.ruby/commit/88fd1d841615e59c873d7da64d050d3a251634dd + +From 88fd1d841615e59c873d7da64d050d3a251634dd Mon Sep 17 00:00:00 2001 +From: PikachuEXE <pikachuexe@gmail.com> +Date: Wed, 5 Oct 2022 10:27:41 +0800 +Subject: [PATCH] * Update all references to Fixnum to Integer + +Deprecated in ruby 2.4 +--- a/lib/contracts/builtin_contracts.rb ++++ b/lib/contracts/builtin_contracts.rb +@@ -95,7 +95,7 @@ def self.[](*vals) + + # Takes a variable number of contracts. + # The contract passes if any of the contracts pass. +- # Example: <tt>Or[Fixnum, Float]</tt> ++ # Example: <tt>Or[Integer, Float]</tt> + class Or < CallableClass + def initialize(*vals) + super() +@@ -120,7 +120,7 @@ def to_s + + # Takes a variable number of contracts. + # The contract passes if exactly one of those contracts pass. +- # Example: <tt>Xor[Fixnum, Float]</tt> ++ # Example: <tt>Xor[Integer, Float]</tt> + class Xor < CallableClass + def initialize(*vals) + super() +@@ -146,7 +146,7 @@ def to_s + + # Takes a variable number of contracts. + # The contract passes if all contracts pass. +- # Example: <tt>And[Fixnum, Float]</tt> ++ # Example: <tt>And[Integer, Float]</tt> + class And < CallableClass + def initialize(*vals) + super() +--- a/spec/builtin_contracts_spec.rb ++++ b/spec/builtin_contracts_spec.rb +@@ -30,7 +30,7 @@ def passes(&some) + end + + describe "Num:" do +- it "should pass for Fixnums" do ++ it "should pass for Integers" do + passes { @o.double(2) } + end + +--- a/spec/fixtures/fixtures.rb ++++ b/spec/fixtures/fixtures.rb +@@ -100,11 +100,11 @@ def sum_three(vals) + end + end + +- Contract ({ :name => String, :age => Fixnum }) => nil ++ Contract ({ :name => String, :age => Integer }) => nil + def person(data) + end + +- Contract C::StrictHash[{ :name => String, :age => Fixnum }] => nil ++ Contract C::StrictHash[{ :name => String, :age => Integer }] => nil + def strict_person(data) + end + +@@ -119,7 +119,7 @@ def hash_complex_contracts(data) + def nested_hash_complex_contracts(data) + end + +- Contract C::KeywordArgs[:name => String, :age => Fixnum] => nil ++ Contract C::KeywordArgs[:name => String, :age => Integer] => nil + def person_keywordargs(name: "name", age: 10) + end + +@@ -529,30 +529,30 @@ def initialize(day, month) + @month = month + end + +- Contract C::None => Fixnum ++ Contract C::None => Integer + def silly_next_day! + self.day += 1 + end + +- Contract C::None => Fixnum ++ Contract C::None => Integer + def silly_next_month! + self.month += 1 + end + +- Contract C::None => Fixnum ++ Contract C::None => Integer + def clever_next_day! + return clever_next_month! if day == 31 + self.day += 1 + end + +- Contract C::None => Fixnum ++ Contract C::None => Integer + def clever_next_month! + return next_year! if month == 12 + self.month += 1 + self.day = 1 + end + +- Contract C::None => Fixnum ++ Contract C::None => Integer + def next_year! + self.month = 1 + self.day = 1 +@@ -610,7 +610,7 @@ def on_response(status, body) + body + "!" + end + +- Contract Fixnum, String => String ++ Contract Integer, String => String + def on_response(status, body) + "error #{status}: #{body}" + end + |