Skip to content

Commit

Permalink
fix: use URI.open instead of Kernel.open
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jan 11, 2020
1 parent 9f71d74 commit 7b3ea81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/pact/provider/help/pact_diff.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
module Pact
module Provider
module Help

class PactDiff

class PrintPactDiffError < StandardError; end

attr_reader :pact_json, :output
Expand Down Expand Up @@ -52,7 +50,7 @@ def diff_url

def get_diff
begin
open(diff_url) { | file | file.read }
URI.open(diff_url) { | file | file.read }
rescue StandardError => e
raise PrintPactDiffError.new("Tried to retrieve diff with previous pact from #{diff_url}, but received response code #{e}.")
end
Expand Down

0 comments on commit 7b3ea81

Please sign in to comment.