commit 74cf329d3b63a519eb86a422e9b3947b3cd1563d
parent 9e2dca4076817f7e849f2a9526430a10172fbce9
Author: Sascha Silbe <sascha-pgp@silbe.org>
Date: Tue, 18 Jan 2011 19:26:54 +0100
sources.yaml: consistent label ordering
Sort labels in sources.yaml so the ordering doesn't change betweeen saves.
This is useful when tracking sources.yaml with a VCS (e.g. git).
Signed-off-by: Sascha Silbe
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/source.rb b/lib/sup/source.rb
@@ -155,7 +155,7 @@ end
module SerializeLabelsNicely
def before_marshal # can return an object
c = clone
- c.instance_eval { @labels = @labels.to_a.map { |l| l.to_s } }
+ c.instance_eval { @labels = (@labels.to_a.map { |l| l.to_s }).sort }
c
end