From b66539aa577d352e059ca3ccce9597f3a25bf682 Mon Sep 17 00:00:00 2001 From: Jared White Date: Sun, 22 Dec 2024 11:05:09 -0800 Subject: [PATCH 1/2] Better inspect output for Collection --- bridgetown-core/lib/bridgetown-core/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridgetown-core/lib/bridgetown-core/collection.rb b/bridgetown-core/lib/bridgetown-core/collection.rb index 306ed6d62..ff419e945 100644 --- a/bridgetown-core/lib/bridgetown-core/collection.rb +++ b/bridgetown-core/lib/bridgetown-core/collection.rb @@ -184,7 +184,7 @@ def entry_filter # # @return [String] def inspect - "#<#{self.class} @label=#{label} resources=#{resources}>" + "#<#{self.class} #{label}: #{resources.count} metadata=#{metadata.inspect} static_files: #{static_files.count}>" end # Produce a sanitized label name From e3f9a21d7cc3f3ae50324575b4b99d9814074d4a Mon Sep 17 00:00:00 2001 From: Jared White Date: Sun, 22 Dec 2024 11:20:47 -0800 Subject: [PATCH 2/2] fix line length --- bridgetown-core/lib/bridgetown-core/collection.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridgetown-core/lib/bridgetown-core/collection.rb b/bridgetown-core/lib/bridgetown-core/collection.rb index ff419e945..1d172a62a 100644 --- a/bridgetown-core/lib/bridgetown-core/collection.rb +++ b/bridgetown-core/lib/bridgetown-core/collection.rb @@ -184,7 +184,8 @@ def entry_filter # # @return [String] def inspect - "#<#{self.class} #{label}: #{resources.count} metadata=#{metadata.inspect} static_files: #{static_files.count}>" + "#<#{self.class} #{label}: #{resources.count} metadata=#{metadata.inspect} " \ + "static_files: #{static_files.count}>" end # Produce a sanitized label name