commit:     76dc951c55384b780ce8d6e20b36c759ae0253b1
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Mon May 26 08:14:56 2025 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Mon May 26 08:16:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76dc951c

dev-ruby/pathutil: remove masked package

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/pathutil/Manifest                         |   1 -
 .../pathutil/files/pathutil-0.16.2-ruby30.patch    | 197 ----------------
 .../pathutil/files/pathutil-0.16.2-ruby31.patch    | 247 ---------------------
 dev-ruby/pathutil/metadata.xml                     |  12 -
 dev-ruby/pathutil/pathutil-0.16.2-r2.ebuild        |  35 ---
 5 files changed, 492 deletions(-)

diff --git a/dev-ruby/pathutil/Manifest b/dev-ruby/pathutil/Manifest
deleted file mode 100644
index e051c37e686d..000000000000
--- a/dev-ruby/pathutil/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pathutil-0.16.2.tar.gz 26079 BLAKE2B 
5a9d1dac1f1171ee6bc447725c04883cb56a9071927f3e0fdbcb9754345ac77a6609533a1308a411cb22658caeb2a4bed49225923af109bca288cfb3aeb3d669
 SHA512 
d06daf365b94dacd33966f3928a53f0f00d2fca7b9f6348a7efd2b55ab5ba937459e5bd78fde241f30749a1ae55e4ae3ba1ed8945b5333464e7d3ce9666cd054

diff --git a/dev-ruby/pathutil/files/pathutil-0.16.2-ruby30.patch 
b/dev-ruby/pathutil/files/pathutil-0.16.2-ruby30.patch
deleted file mode 100644
index 9bb290d4bf24..000000000000
--- a/dev-ruby/pathutil/files/pathutil-0.16.2-ruby30.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-https://github.com/envygeeks/pathutil/pull/5
-
-From 3451a10c362fc867b20c7e471a551b31c40a0246 Mon Sep 17 00:00:00 2001
-From: Tom Dunlap <[email protected]>
-Date: Tue, 9 Jun 2020 12:59:32 -0400
-Subject: [PATCH] Fix ruby keyword parameter deprecation warnings
-
-In ruby 2.7, using the last argument as keyword parameters became
-deprecated in preparation for ruby 3.0. When running the tests, we saw
-numerous deprecation warnings. This commit fixes up those deprecation
-warnings by explicitly passing the last argument(s) as keyword
-argument(s).
-
-See: 
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
-
-Fixes #4
-
-Side note: this commit did not fix the `#binread` method because it was
-untested, and when attempting to add tests, we got the following failing
-test:
-
-```
-1) Pathutil#binread when set to normalize should use encode to convert CRLF to 
LF
-   Failure/Error:
-     File.binread(self, *args, kwd).encode({
-       :universal_newline => true
-     })
-
-   TypeError:
-     no implicit conversion of Hash into Integer
-   # ./lib/pathutil.rb:509:in `binread'
-   # ./lib/pathutil.rb:509:in `binread'
-   # ./spec/tests/lib/pathutil_spec.rb:943:in `block (4 levels) in <top 
(required)>'
-```
-
-...which appears to be occuring because of an interface mismatch as
-`IO#binread` does not take keyword arguments.
-
-https://ruby-doc.org/core-2.7.1/IO.html#method-c-binread
----
- lib/pathutil.rb                         | 36 ++++++++-----------------
- spec/tests/lib/pathutil/helpers_spec.rb |  4 +--
- spec/tests/lib/pathutil_spec.rb         | 13 +++------
- 3 files changed, 16 insertions(+), 37 deletions(-)
-
-diff --git a/lib/pathutil.rb b/lib/pathutil.rb
-index 1a15873..80913f2 100644
---- a/lib/pathutil.rb
-+++ b/lib/pathutil.rb
-@@ -456,14 +456,10 @@ def safe_copy(to, root: nil, ignore: [])
-     to   = self.class.new(to)
- 
-     if directory?
--      safe_copy_directory(to, {
--        :root => root, :ignore => ignore
--      })
-+      safe_copy_directory(to, root: root, ignore: ignore)
- 
-     else
--      safe_copy_file(to, {
--        :root => root
--      })
-+      safe_copy_file(to, root: root)
-     end
-   end
- 
-@@ -494,14 +490,10 @@ def read(*args, **kwd)
-     kwd[:encoding] ||= encoding
- 
-     if normalize[:read]
--      File.read(self, *args, kwd).encode({
--        :universal_newline => true
--      })
-+      File.read(self, *args, **kwd).encode(universal_newline: true)
- 
-     else
--      File.read(
--        self, *args, kwd
--      )
-+      File.read(self, *args, **kwd)
-     end
-   end
- 
-@@ -534,13 +526,13 @@ def readlines(*args, **kwd)
-     kwd[:encoding] ||= encoding
- 
-     if normalize[:read]
--      File.readlines(self, *args, kwd).encode({
-+      File.readlines(self, *args, **kwd).encode({
-         :universal_newline => true
-       })
- 
-     else
-       File.readlines(
--        self, *args, kwd
-+        self, *args, **kwd
-       )
-     end
-   end
-@@ -556,11 +548,11 @@ def write(data, *args, **kwd)
-     if normalize[:write]
-       File.write(self, data.encode(
-         :crlf_newline => true
--      ), *args, kwd)
-+      ), *args, **kwd)
- 
-     else
-       File.write(
--        self, data, *args, kwd
-+        self, data, *args, **kwd
-       )
-     end
-   end
-@@ -670,9 +662,7 @@ def expanded_paths(path)
-   private
-   def safe_copy_file(to, root: nil)
-     raise Errno::EPERM, "#{self} not in #{root}" unless in_path?(root)
--    FileUtils.cp(self, to, {
--      :preserve => true
--    })
-+    FileUtils.cp(self, to, preserve: true)
-   end
- 
-   # --
-@@ -697,15 +687,11 @@ def safe_copy_directory(to, root: nil, ignore: [])
-             }"
- 
-           elsif file.file?
--            FileUtils.cp(file, to, {
--              :preserve => true
--            })
-+            FileUtils.cp(file, to, preserve: true)
- 
-           else
-             path = file.realpath
--            path.safe_copy(to.join(file.basename), {
--              :root => root, :ignore => ignore
--            })
-+            path.safe_copy(to.join(file.basename), root: root, ignore: ignore)
-           end
-         end
-       end
-diff --git a/spec/tests/lib/pathutil/helpers_spec.rb 
b/spec/tests/lib/pathutil/helpers_spec.rb
-index 4d64d0a..0dfbc00 100644
---- a/spec/tests/lib/pathutil/helpers_spec.rb
-+++ b/spec/tests/lib/pathutil/helpers_spec.rb
-@@ -76,9 +76,7 @@
-           #
- 
-           after do
--            described_class.load_yaml("hello: world", {
--              :aliases => true
--            })
-+            described_class.load_yaml("hello: world", aliases: true)
-           end
-         end
- 
-diff --git a/spec/tests/lib/pathutil_spec.rb b/spec/tests/lib/pathutil_spec.rb
-index 784a16b..0ee7a12 100644
---- a/spec/tests/lib/pathutil_spec.rb
-+++ b/spec/tests/lib/pathutil_spec.rb
-@@ -944,9 +944,7 @@
- 
-     context "with an encoding argument" do
-       before do
--        file.write("hello", {
--          :encoding => "ASCII"
--        })
-+        file.write("hello", encoding: "ASCII")
-       end
- 
-       #
-@@ -1050,11 +1048,10 @@
-           name1.join(name2.basename, name1.basename).touch
-           name1.join(name1.basename).touch
- 
--          name1.safe_copy(name2, {
--            :root => tmpdir1, :ignore => [
-+          name1.safe_copy(name2, root: tmpdir1, ignore: [
-               name1.join(name2.basename, name1.basename)
-             ]
--          })
-+          )
-         end
- 
-         #
-@@ -1077,9 +1074,7 @@
-           name1.join(name2.basename, name1.basename).touch
-           name1.join(name1.basename).touch
- 
--          name1.safe_copy(name2, {
--            :root => tmpdir1
--          })
-+          name1.safe_copy(name2, root: tmpdir1)
-         end
- 
-         #

diff --git a/dev-ruby/pathutil/files/pathutil-0.16.2-ruby31.patch 
b/dev-ruby/pathutil/files/pathutil-0.16.2-ruby31.patch
deleted file mode 100644
index 0bfc4c5919b5..000000000000
--- a/dev-ruby/pathutil/files/pathutil-0.16.2-ruby31.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-https://github.com/envygeeks/pathutil/pull/7
-
-From c0ecc9a516ed43facfb3a80735034c892d517d1a Mon Sep 17 00:00:00 2001
-From: Jakub Jirutka <[email protected]>
-Date: Sun, 3 Apr 2022 20:20:44 +0200
-Subject: [PATCH 1/2] Fix usage of YAML.safe_load for compatibility with Ruby
- >=2.4
-
-YAML.safe_load in Ruby 3.1.1 doesn't accept deprecated positional parameters 
anymore:
-
-  1) Pathutil::Helpers#load_yaml should be able to parse YAML
-     Failure/Error:
-       YAML.safe_load(
-         data,
-         whitelist_classes,
-         whitelist_symbols,
-         aliases
-       )
-
-     ArgumentError:
-       wrong number of arguments (given 4, expected 1)
-     # ./lib/pathutil/helpers.rb:44:in `load_yaml'
-     # ./spec/tests/lib/pathutil/helpers_spec.rb:25:in `block (3 levels) in 
<top (required)>'
-
-From 868efe4022f944cef81b05ae01e00fab2d51ee5c Mon Sep 17 00:00:00 2001
-From: Jakub Jirutka <[email protected]>
-Date: Sun, 3 Apr 2022 20:35:50 +0200
-Subject: [PATCH 2/2] Remove deprecated SafeYAML support
-
-SafeYAML has been deprecated a very long time ago.
---- a/Gemfile
-+++ b/Gemfile
-@@ -7,7 +7,6 @@ gem "rake", :require => false
- gemspec
- 
- group :test do
--  gem "safe_yaml", :require => false
-   gem "luna-rspec-formatters", :require => false
-   gem "simplecov", :require => false
- end
---- a/README.md
-+++ b/README.md
-@@ -26,7 +26,7 @@ but only if they originate from the given root.
- - `>=`, `>` - Check if a file is in but ahead of a path: 
`Pathutil.new("/tmp/hello") > "/tmp" # => true`
- - `in_path?` - Check if a file is within a given path: 
`Pathutil.new("/tmp/hello").in_path?("/tmp") # => true`
- - `<=`, `<` - Check if a file is in but below a path: `Pathutil.new("/tmp") < 
"/tmp/hello" # => true`
--- `read_yaml` - a wrapper around `Yaml.safe_load` and `SafeYAML` to make 
reading `YAML` easy.
-+- `read_yaml` - a wrapper around `Yaml.safe_load` to make reading `YAML` easy.
- - `children` - behaves like Pathname, except it accepts a block to work on 
the path.
- - `safe_copy` - Copy files, disallowing symlinks unless `in_path?`
- - `enforce_root` - Force a root if not already in that root.
---- a/benchmark/yaml.rb
-+++ /dev/null
-@@ -1,16 +0,0 @@
--# Frozen-string-literal: true
--# Copyright: 2015 - 2017 Jordon Bedwell - MIT License
--# Encoding: utf-8
--
--require "bundler/setup"
--require "safe_yaml/load"
--require "benchmark/ips"
--require "pathutil"
--
--data = "hello: world\nworld: hello"
--Benchmark.ips :quiet => true do |x|
--  x.json! "benchmark.json"
--  x.report("A:SafeYAML.load") { SafeYAML.load(data) }
--  x.report("B:Pathutil::Helpers.load_yaml") { 
Pathutil::Helpers.load_yaml(data) }
--  x.compare!
--end
---- a/lib/pathutil/helpers.rb
-+++ b/lib/pathutil/helpers.rb
-@@ -20,7 +20,7 @@ class Pathutil
-     end
- 
-     # --
--    # Wraps around YAML and SafeYAML to provide alternatives to Rubies.
-+    # Wraps around YAMLto provide alternatives to Rubies.
-     # @note We default aliases to yes so we can detect if you explicit true.
-     # @return Hash
-     # --
-@@ -34,20 +34,12 @@ class Pathutil
-         )
-       end
- 
--      if !YAML.respond_to?(:safe_load)
--        setup_safe_yaml whitelist_classes, aliases
--        SafeYAML.load(
--          data
--        )
--
--      else
--        YAML.safe_load(
--          data,
--          whitelist_classes,
--          whitelist_symbols,
--          aliases
--        )
--      end
-+      YAML.safe_load(
-+        data,
-+        permitted_classes: whitelist_classes,
-+        permitted_symbols: whitelist_symbols,
-+        aliases: aliases
-+      )
-     end
- 
-     # --
-@@ -109,21 +101,5 @@ class Pathutil
-         prefix, ext || ""
-       ]
-     end
--
--    # --
--    # Wrap around, cleanup, deprecate and use SafeYAML.
--    # rubocop:enable Style/ParallelAssignment
--    # --
--    private
--    def setup_safe_yaml(whitelist_classes, aliases)
--      warn "WARN: SafeYAML does not support disabling  of aliases." if 
aliases && aliases != :yes
--      warn "WARN: SafeYAML will be removed when Ruby 2.0 goes EOL."
--      require "safe_yaml/load"
--
--      SafeYAML.restore_defaults!
--      whitelist_classes.map(&SafeYAML.method(
--        :whitelist_class!
--      ))
--    end
-   end
- end
---- a/spec/tests/lib/pathutil/helpers_spec.rb
-+++ b/spec/tests/lib/pathutil/helpers_spec.rb
-@@ -26,113 +26,10 @@ describe Pathutil::Helpers do
-         "hello" => "world"
-       })
-     end
-+  end
- 
-     #
- 
--    context "when safe" do
--      it "should reject any special classes", :disable => :oldest_ruby do
--        expect { described_class.load_yaml(":hello: :world") }.to raise_error(
--          Psych::DisallowedClass
--        )
--      end
--
--      #
--
--      context "when using SafeYAML" do
--        before do
--          allow(YAML).to 
receive(:respond_to?).with(:safe_load).and_return(false)
--          expect_any_instance_of(described_class).to 
receive(:warn).and_return(
--            nil
--          )
--        end
--
--        #
--
--        context do
--          it "should warn it's deprecated" do
--            expect(described_class).to receive(:warn).and_return(
--              nil
--            )
--          end
--
--          #
--
--          after do
--            described_class.load_yaml(
--              ":hello: :world"
--            )
--          end
--        end
--
--        #
--
--        context "when trying to disable aliases" do
--          it "should warn that you cannot disable them in SafeYAML" do
--            expect(described_class).to 
receive(:warn).exactly(2).times.and_return(
--              nil
--            )
--          end
--
--          #
--
--          after do
--            described_class.load_yaml("hello: world", aliases: true)
--          end
--        end
--
--        #
--
--        it "should parse with SafeYAML" do
--          expect(described_class.load_yaml(":hello: :world")).to eq({
--            ":hello" => ":world"
--          })
--        end
--      end
--    end
--
--    #
--
--    context "when whitelisting classes" do
--      it "should allow that class to be loaded" do
--        expect(described_class.load_yaml(":hello: :world", :whitelist_classes 
=> [Symbol])).to eq({
--          :hello => :world
--        })
--      end
--    end
--
--    #
--
--    context "when diallowing aliases" do
--      it "should throw the parse" do
--        yaml = "version: &version 1\nother_version: *version"
--        expect { described_class.load_yaml(yaml, :aliases => false) }.to 
raise_error(
--          Psych::BadAlias
--        )
--      end
--    end
--
--    #
--
--    context do
--      it "should allow aliases by default" do
--        expect(described_class.load_yaml("version: &version 1\nother_version: 
*version")).to eq({
--          "version" => 1, "other_version" => 1
--        })
--      end
--    end
--
--    #
--
--    context do
--      it "should parse YAML" do
--        expect(described_class.load_yaml("hello: world\nworld: hello")).to 
eq({
--          "hello" => "world",
--          "world" => "hello"
--        })
--      end
--    end
--  end
--
-   #
- 
-   describe ".make_tmpname" do

diff --git a/dev-ruby/pathutil/metadata.xml b/dev-ruby/pathutil/metadata.xml
deleted file mode 100644
index e32ad2383b1f..000000000000
--- a/dev-ruby/pathutil/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
-<pkgmetadata>
-  <maintainer type="project">
-    <email>[email protected]</email>
-    <name>Gentoo Ruby Project</name>
-  </maintainer>
-  <upstream>
-    <remote-id type="github">envygeeks/pathutil</remote-id>
-    <remote-id type="rubygems">pathutil</remote-id>
-  </upstream>
-</pkgmetadata>

diff --git a/dev-ruby/pathutil/pathutil-0.16.2-r2.ebuild 
b/dev-ruby/pathutil/pathutil-0.16.2-r2.ebuild
deleted file mode 100644
index cea335f38c37..000000000000
--- a/dev-ruby/pathutil/pathutil-0.16.2-r2.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2025 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_GEMSPEC="Gem.gemspec"
-
-inherit ruby-fakegem
-
-DESCRIPTION="Like Pathname but a little less insane"
-HOMEPAGE="https://rubygems.org/gems/pathutil 
https://github.com/envygeeks/pathutil";
-SRC_URI="https://github.com/envygeeks/pathutil/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64"
-
-ruby_add_rdepend "
-       >=dev-ruby/forwardable-extended-2.6
-       <dev-ruby/forwardable-extended-3
-"
-
-PATCHES=(
-       "${FILESDIR}/${P}-ruby30.patch"
-       "${FILESDIR}/${P}-ruby31.patch"
-)
-
-all_ruby_prepare() {
-       sed -i -e '/\(coverage\|luna\|rspec\/helpers\)/ s:^:#:' \
-               -e '1irequire "pathname"; require "tempfile"; require "tmpdir"; 
require "json" ; gem "psych", "~> 5.0"' \
-               spec/rspec/helper.rb || die
-       rm -f spec/support/coverage.rb || die
-}

Reply via email to