From 1ce938e7cb4e529a4448528af4c6b90270ea6615 Mon Sep 17 00:00:00 2001 From: Stefan Peer Date: Tue, 16 Jul 2019 13:59:32 +0200 Subject: [PATCH] Add Support for Hashdiff 1.0.0 When using Hashdiff version 1.0.0, octocatalog-diff failed with the following error: `uninitialized constant OctocatalogDiff::CatalogDiff::Differ::HashDiff (NameError)` Hashdiff 1.0.0 was released on July, 15 2019 and replaced the constant "HashDiff" with "Hashdiff". This commit fixes this error and keeps octocatalog-diff backwards compatible to older versions of HashDiff. --- lib/octocatalog-diff/catalog-diff/differ.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/octocatalog-diff/catalog-diff/differ.rb b/lib/octocatalog-diff/catalog-diff/differ.rb index c56234c1..2110fc2c 100644 --- a/lib/octocatalog-diff/catalog-diff/differ.rb +++ b/lib/octocatalog-diff/catalog-diff/differ.rb @@ -11,6 +11,8 @@ require_relative '../util/util' require_relative 'filter' +HashDiff = Hashdiff unless defined? HashDiff + module OctocatalogDiff module CatalogDiff # Calculate the difference between two Puppet catalogs.