Use explicit `URI#open`. (#44849)

This commit is contained in:
Markus Reiter 2018-03-16 01:52:43 +01:00 committed by commitay
parent 5dc7bf0794
commit a8ccfdc027
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ Similar to the `preflight`, `postflight`, `uninstall_preflight`, and `uninstall_
url do url do
require 'open-uri' require 'open-uri'
# No known stable URL; fetching disposable URL from landing site # No known stable URL; fetching disposable URL from landing site
open('https://example.com/app/landing') do |landing_page| URI('https://example.com/app/landing').open do |landing_page|
content = landing_page.read content = landing_page.read
parse(content) # => https://example.com/download?23309800482283 parse(content) # => https://example.com/download?23309800482283
end end