Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue6765 proxy #6817

Merged
merged 3 commits into from
Nov 2, 2016
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions fastlane/lib/fastlane/helper/crashlytics_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ def download_android_tools
begin
UI.important("Downloading Crashlytics Support Library - this might take a minute...")

result = Net::HTTP.get(URI(url))
File.write(zip_path, result)
uri = URI(url)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to mention (with a link to the ruby issue) why it is done that way in a comment. Otherwise someone might come along later, wonder why it is done this way, and change it back.

http_conn = Net::HTTP.new(uri.host, uri.port)
http_conn.use_ssl = true
result = http_conn.request_get(uri.path)
raise "#{result.message} (#{result.code})" unless result.kind_of? Net::HTTPSuccess
Copy link
Collaborator

@milch milch Nov 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use UI.crash! instead of raise as described here: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/UI.md

File.write(zip_path, result.body)

# Now unzip the file
Action.sh "unzip '#{zip_path}' -d '#{containing}'"
Expand Down