Skip to content

Commit 6d33949

Browse files
author
jneen
committed
silence warnings from the ancient net/dav library
1 parent 96eaf27 commit 6d33949

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Rakefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# frozen_string_literal: true
22

3+
def Kernel.silence_warnings
4+
old_verbose, $VERBOSE = $VERBOSE, false
5+
yield
6+
ensure
7+
$VERBOSE = old_verbose
8+
end
9+
310
require "bundler/setup"
411
require "bundler/gem_tasks" # Adds the :build, :install and :release tasks
512
require "rake/clean" # Adds the :clean and :clobber tasks

tasks/builtins/apache.rake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ def File.exists?(p)
66
File.exist?(p)
77
end
88

9+
# And it still warns a lot.
10+
silence_warnings { require 'net/dav' }
11+
912
require 'open-uri'
1013
require_relative '../task_helper'
1114
require 'nokogiri'

0 commit comments

Comments
 (0)