Blame SOURCES/remove-sorted_set-usage.patch

46575c
From 540c3e482e90c7c428b7c6684c1527fc412a2085 Mon Sep 17 00:00:00 2001
46575c
From: Joel Capitao <jcapitao@redhat.com>
46575c
Date: Mon, 31 May 2021 17:04:06 +0200
46575c
Subject: [PATCH] remove sorted_set usage
46575c
46575c
---
46575c
 lib/semantic_puppet/dependency/graph_node.rb |  4 ++--
46575c
 spec/unit/semantic_puppet/dependency_spec.rb | 10 +++++-----
46575c
 2 files changed, 7 insertions(+), 7 deletions(-)
46575c
46575c
diff --git a/lib/semantic_puppet/dependency/graph_node.rb b/lib/semantic_puppet/dependency/graph_node.rb
46575c
index 51416c8..9ca312d 100644
46575c
--- a/lib/semantic_puppet/dependency/graph_node.rb
46575c
+++ b/lib/semantic_puppet/dependency/graph_node.rb
46575c
@@ -33,10 +33,10 @@ module SemanticPuppet
46575c
       end
46575c
 
46575c
       # @api internal
46575c
-      # @return [{ String => SortedSet<GraphNode> }] the satisfactory
46575c
+      # @return [{ String => Array<GraphNode> }] the satisfactory
46575c
       #         dependency nodes
46575c
       def dependencies
46575c
-        @_dependencies ||= Hash.new { |h, k| h[k] = SortedSet.new }
46575c
+        @_dependencies ||= Hash.new { |h, k| h[k] = Array.new }
46575c
       end
46575c
 
46575c
       # Adds the given dependency name to the list of dependencies.
46575c
diff --git a/spec/unit/semantic_puppet/dependency_spec.rb b/spec/unit/semantic_puppet/dependency_spec.rb
46575c
index f86dc73..f314aba 100644
46575c
--- a/spec/unit/semantic_puppet/dependency_spec.rb
46575c
+++ b/spec/unit/semantic_puppet/dependency_spec.rb
46575c
@@ -93,8 +93,8 @@ describe SemanticPuppet::Dependency do
46575c
         )
46575c
 
46575c
         result = SemanticPuppet::Dependency.query('foo' => '1.0.0', 'bar' => '1.0.0')
46575c
-        expect(result.dependencies['foo']).to eql SortedSet.new([ foo ])
46575c
-        expect(result.dependencies['bar']).to eql SortedSet.new([ bar ])
46575c
+        expect(result.dependencies['foo']).to eql [foo]
46575c
+        expect(result.dependencies['bar']).to eql [bar]
46575c
       end
46575c
 
46575c
       it 'populates all returned ModuleReleases with related dependencies' do
46575c
@@ -105,9 +105,9 @@ describe SemanticPuppet::Dependency do
46575c
         )
46575c
 
46575c
         result = SemanticPuppet::Dependency.query('foo' => '1.0.0')
46575c
-        expect(result.dependencies['foo']).to eql SortedSet.new([ foo ])
46575c
-        expect(foo.dependencies['bar']).to eql SortedSet.new([ bar ])
46575c
-        expect(bar.dependencies['baz']).to eql SortedSet.new([ baz ])
46575c
+        expect(result.dependencies['foo']).to eql [foo]
46575c
+        expect(foo.dependencies['bar']).to eql [bar]
46575c
+        expect(bar.dependencies['baz']).to eql [ baz]
46575c
       end
46575c
     end
46575c
 
46575c
-- 
46575c
2.31.1
46575c