From a642ebcfbcdb6316b1c93b6df9232b55754f6267 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 27 Nov 2020 19:07:44 +1100 Subject: [PATCH] chore: hide deprecation warnings --- lib/pact_broker/logging.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/pact_broker/logging.rb b/lib/pact_broker/logging.rb index 001ef426e..ce8c9e866 100644 --- a/lib/pact_broker/logging.rb +++ b/lib/pact_broker/logging.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'semantic_logger' module PactBroker @@ -50,3 +51,9 @@ def log_error e, description = nil include Logging end + +# Hide the annoying warnings from Declarative gem. Need to upgrade Representable. +def Warning.warn(w) + # super calls the original behavior, which is printing to $stderr + super unless (w.start_with?("[Declarative] Defaults#merge!") || w.include?("URI.unescape is obsolete")) +end