summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-07-11 08:57:12 +0200
committerHans de Graaff <graaff@gentoo.org>2023-07-11 09:47:14 +0200
commit74fca6f9d31dd6ea67455a5c614ef7ee6399531d (patch)
treead1fced50ac882610362fc7101e7880f5bb18c7b /dev-ruby/hashie
parentdev-ruby/ox: drop 2.14.13, 2.14.14 (diff)
downloadgentoo-74fca6f9d31dd6ea67455a5c614ef7ee6399531d.tar.gz
gentoo-74fca6f9d31dd6ea67455a5c614ef7ee6399531d.tar.bz2
gentoo-74fca6f9d31dd6ea67455a5c614ef7ee6399531d.zip
dev-ruby/hashie: update SRC_URI
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/hashie')
-rw-r--r--dev-ruby/hashie/files/hashie-5.0.0-ruby32-tests.patch71
-rw-r--r--dev-ruby/hashie/hashie-5.0.0.ebuild6
-rw-r--r--dev-ruby/hashie/metadata.xml2
3 files changed, 76 insertions, 3 deletions
diff --git a/dev-ruby/hashie/files/hashie-5.0.0-ruby32-tests.patch b/dev-ruby/hashie/files/hashie-5.0.0-ruby32-tests.patch
new file mode 100644
index 000000000000..479e5a876ac2
--- /dev/null
+++ b/dev-ruby/hashie/files/hashie-5.0.0-ruby32-tests.patch
@@ -0,0 +1,71 @@
+From 2b3120ad4a6f54990dfec5b10f5769e3714ab1e8 Mon Sep 17 00:00:00 2001
+From: Peter Goldstein <peter.m.goldstein@gmail.com>
+Date: Fri, 13 Jan 2023 13:53:14 -0500
+Subject: [PATCH] Add Ruby 3.2 to the CI matrix (#571)
+
+* Adds Ruby 3.2 to the CI matrix
+
+* Use object_id rather than trust, as trust is no longer a method on Object in Ruby 3.2. Condition checked on Psych error based on version of Psych.
+
+* Update danger token
+
+* Add CHANGELOG entry
+
+* Add use of Gem::Version for version comparison
+---
+ .github/workflows/danger.yml | 4 ++--
+ .github/workflows/test.yml | 1 +
+ CHANGELOG.md | 1 +
+ spec/hashie/mash_spec.rb | 17 ++++++++++++-----
+ spec/hashie/utils_spec.rb | 2 +-
+ 5 files changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb
+index 03f56683..091748fc 100644
+--- a/spec/hashie/mash_spec.rb
++++ b/spec/hashie/mash_spec.rb
+@@ -137,9 +137,9 @@
+
+ include_context 'with a logger' do
+ it 'logs a warning when overriding built-in methods' do
+- Hashie::Mash.new('trust' => { 'two' => 2 })
++ Hashie::Mash.new('object_id' => { 'two' => 2 })
+
+- expect(logger_output).to match('Hashie::Mash#trust')
++ expect(logger_output).to match('Hashie::Mash#object_id')
+ end
+
+ it 'can set keys more than once and does not warn when doing so' do
+@@ -821,9 +821,16 @@ class SubMash < Hashie::Mash
+ expect(mash.company_a.accounts.admin.password).to eq('secret')
+ end
+ it 'can override the value of aliases' do
+- expect do
+- Hashie::Mash.load('spec/fixtures/yaml_with_aliases.yml', aliases: false)
+- end.to raise_error Psych::BadAlias, /base_accounts/
++ require 'psych'
++ if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('5')
++ expect do
++ Hashie::Mash.load('spec/fixtures/yaml_with_aliases.yml', aliases: false)
++ end.to raise_error Psych::AliasesNotEnabled, /Alias parsing was not enabled/
++ else
++ expect do
++ Hashie::Mash.load('spec/fixtures/yaml_with_aliases.yml', aliases: false)
++ end.to raise_error Psych::BadAlias, /base_accounts/
++ end
+ end
+ end
+
+diff --git a/spec/hashie/utils_spec.rb b/spec/hashie/utils_spec.rb
+index 0499aa7f..c6be23b1 100644
+--- a/spec/hashie/utils_spec.rb
++++ b/spec/hashie/utils_spec.rb
+@@ -7,7 +7,7 @@ def a_method_to_match_against
+ RSpec.describe Hashie::Utils do
+ describe '.method_information' do
+ it 'states the module or class that a native method was defined in' do
+- bound_method = method(:trust)
++ bound_method = method(:object_id)
+
+ message = Hashie::Utils.method_information(bound_method)
+
diff --git a/dev-ruby/hashie/hashie-5.0.0.ebuild b/dev-ruby/hashie/hashie-5.0.0.ebuild
index d394d48d49f5..a686b531df5f 100644
--- a/dev-ruby/hashie/hashie-5.0.0.ebuild
+++ b/dev-ruby/hashie/hashie-5.0.0.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-USE_RUBY="ruby26 ruby27 ruby30 ruby31"
+USE_RUBY="ruby30 ruby31 ruby32"
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
@@ -17,13 +17,15 @@ inherit ruby-fakegem
DESCRIPTION="Hashie is a small collection of tools that make hashes more powerful"
HOMEPAGE="https://www.mobomo.com/2009/11/hashie-the-hash-toolkit/"
-SRC_URI="https://github.com/intridea/hashie/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/hashie/hashie/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="$(ver_cut 1)"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86 ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE=""
+PATCHES=( "${FILESDIR}/${P}-ruby32-tests.patch" )
+
ruby_add_bdepend "test? ( dev-ruby/activesupport )"
all_ruby_prepare() {
diff --git a/dev-ruby/hashie/metadata.xml b/dev-ruby/hashie/metadata.xml
index 716acc6c5a35..e7c6da67af9b 100644
--- a/dev-ruby/hashie/metadata.xml
+++ b/dev-ruby/hashie/metadata.xml
@@ -6,6 +6,6 @@
<name>Gentoo Ruby Project</name>
</maintainer>
<upstream>
- <remote-id type="github">intridea/hashie</remote-id>
+ <remote-id type="github">hashie/hashie</remote-id>
</upstream>
</pkgmetadata>