Commit 289ca870 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4763 from CocoaPods/seg-open-uri

Actually use the CocoaPods OpenURI hotfix
parents ff4535ca 6393d001
......@@ -91,7 +91,7 @@ module Pod
@podspecs_paths << '.' if @podspecs_paths.empty?
@podspecs_paths.each do |path|
if path =~ %r{https?://}
require 'open-uri'
require 'cocoapods/open-uri'
output_path = podspecs_tmp_dir + File.basename(path)
output_path.dirname.mkpath
open(path) do |io|
......
......@@ -14,7 +14,7 @@ module Pod
if podspec_path.exist?
store_podspec(sandbox, podspec_path, is_json)
else
require 'open-uri'
require 'cocoapods/open-uri'
begin
open(podspec_uri) { |io| store_podspec(sandbox, io.read, is_json) }
rescue OpenURI::HTTPError => e
......
......@@ -146,7 +146,7 @@ module Pod
SILENCE_WARNINGS_STRING = '// @COCOAPODS_SILENCE_WARNINGS@ //'
def self.xcconfig_includes_target_xcconfig?(base_config_ref, target_config_path)
return unless base_config_ref && base_config_ref.real_path.file?
regex = /
regex = %r{
^(
(\s* # Possible, but unlikely, space before include statement
\#include\s+ # Include statement
......@@ -158,7 +158,7 @@ module Pod
|
(#{Regexp.quote(SILENCE_WARNINGS_STRING)}) # Token to treat xcconfig as good and silence pod install warnings
)
/x
}x
base_config_ref.real_path.readlines.find { |line| line =~ regex }
end
......
# rubocop:disable Style/FileName
require 'open-uri'
# Allow OpenURI to follow http to https redirects.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment