From 8a86a490eada1df6087349a36b02f27188275e1c Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 10 2021 13:47:22 +0000 Subject: Import rubygem-deep_merge-1.2.1-7.el9 in CloudSIG xena --- diff --git a/.rubygem-deep_merge.metadata b/.rubygem-deep_merge.metadata new file mode 100644 index 0000000..3034e21 --- /dev/null +++ b/.rubygem-deep_merge.metadata @@ -0,0 +1 @@ +4a1985fcb9fd15668f9571a2cd5dc3cf12b7c3cf SOURCES/deep_merge-1.2.1.gem diff --git a/SOURCES/LICENSE b/SOURCES/LICENSE new file mode 100644 index 0000000..657494c --- /dev/null +++ b/SOURCES/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2008-2104 Steve Midgley, Daniel DeLeo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/SOURCES/deep_merge-minitest5.patch b/SOURCES/deep_merge-minitest5.patch new file mode 100644 index 0000000..cc906ed --- /dev/null +++ b/SOURCES/deep_merge-minitest5.patch @@ -0,0 +1,48 @@ +diff -uNr deep_merge-1.0.1.ORIG/deep_merge.gemspec deep_merge-1.0.1/deep_merge.gemspec +--- deep_merge-1.0.1.ORIG/deep_merge.gemspec 2014-05-30 13:15:45.024000000 +0000 ++++ deep_merge-1.0.1/deep_merge.gemspec 2014-05-30 13:18:42.221000000 +0000 +@@ -30,5 +30,6 @@ + else + s.add_dependency(%q, ["~> 10.1"]) + end ++ s.add_development_dependency "minitest" + end + +diff -uNr deep_merge-1.0.1.ORIG/test/test_deep_merge.rb deep_merge-1.0.1/test/test_deep_merge.rb +--- deep_merge-1.0.1.ORIG/test/test_deep_merge.rb 2014-05-30 13:15:45.024000000 +0000 ++++ deep_merge-1.0.1/test/test_deep_merge.rb 2014-05-30 13:21:27.440000000 +0000 +@@ -1,4 +1,4 @@ +-require 'test/unit' ++require 'minitest/autorun' + + $:.unshift(File.dirname(__FILE__) + '/../lib/') + require 'deep_merge' +@@ -11,7 +11,7 @@ + end + end + +-class TestDeepMerge < Test::Unit::TestCase ++class TestDeepMerge < Minitest::Test + + def setup + end +@@ -214,12 +214,13 @@ + assert_equal({"property" => {"bedroom_count" => {"king_bed" => [nil, 3], "queen_bed" => [4, nil, 1]}, "bathroom_count" => [nil, "2", "1"]}}, hash_dst) + + # test parameter management for knockout_prefix and overwrite unmergable +- assert_raise(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:knockout_prefix => ""})} +- assert_raise(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true, :knockout_prefix => ""})} +- assert_raise(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true, :knockout_prefix => "--"})} +- assert_nothing_raised(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:knockout_prefix => "--"})} +- assert_nothing_raised(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst)} +- assert_nothing_raised(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true})} ++ assert_raises(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:knockout_prefix => ""})} ++ assert_raises(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true, :knockout_prefix => ""})} ++ assert_raises(DeepMerge::InvalidParameter) {DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true, :knockout_prefix => "--"})} ++ # test valid parameters ++ DeepMerge::deep_merge!(hash_src, hash_dst, {:knockout_prefix => "--"}) ++ DeepMerge::deep_merge!(hash_src, hash_dst) ++ DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true}) + + # hash holding arrays of arrays + hash_src = {["1", "2", "3"] => ["1", "2"]} diff --git a/SPECS/rubygem-deep_merge.spec b/SPECS/rubygem-deep_merge.spec new file mode 100644 index 0000000..9bc1b9f --- /dev/null +++ b/SPECS/rubygem-deep_merge.spec @@ -0,0 +1,129 @@ + +%global enable_checks 1 + +# Generated from deep_merge-1.0.1.gem by gem2rpm -*- rpm-spec -*- +%global gem_name deep_merge + +Name: rubygem-%{gem_name} +Version: 1.2.1 +Release: 7%{?dist} +Summary: Merge Deeply Nested Hashes +License: MIT +URL: https://github.com/danielsdeleo/deep_merge +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Requires: ruby(rubygems) +BuildRequires: rubygems-devel +BuildRequires: ruby +%if 0%{?enable_checks} +BuildRequires: rubygem(minitest) >= 5 +BuildRequires: rubygem(test-unit) +%endif + +BuildArch: noarch + +%description +Recursively merge hashes. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +gem unpack %{SOURCE0} + +%setup -q -D -T -n %{gem_name}-%{version} + +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +%build +# Create the gem as gem install only works on a gem file +gem build %{gem_name}.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 +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +%if 0%{?enable_checks} +ruby -Ilib test/test_deep_merge.rb +%endif + +%files +%dir %{gem_instdir} + +%{gem_libdir} +%exclude %{gem_cache} +%exclude %{gem_instdir}/CHANGELOG +%exclude %{gem_instdir}/test +%exclude %{gem_instdir}/Rakefile +%{gem_spec} +%doc %{gem_instdir}/LICENSE + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/README.md + + +%changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.2.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.2.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 1.2.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 1.2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu May 17 2018 Steve Traylen - 1.2.1-1 +- Update to 1.2.1 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Mar 23 2017 Steve Traylen - 1.1.1-1 +- Update to 1.1.1 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 1.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 19 2014 Steve Traylen - 1.0.1-5 +- Ensure rubygem(minitest) is > 5 version on fc21. + +* Tue Jun 3 2014 Steve Traylen - 1.0.1-4 +- Include LICENSE file in main package. + +* Mon Jun 2 2014 Steve Traylen - 1.0.1-3 +- Drop usage of testrb and use ruby instead for checks. + +* Fri May 30 2014 Steve Traylen - 1.0.1-2 +- latest ruby guidelines and minitest5 patch + +* Wed Feb 12 2014 Steve Traylen - 1.0.1-1 +- Initial package