Skip to content

Commit

Permalink
chore: hide deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Nov 27, 2020
1 parent fde2040 commit a642ebc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pact_broker/logging.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'semantic_logger'

module PactBroker
Expand Down Expand Up @@ -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

0 comments on commit a642ebc

Please sign in to comment.