Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/KrauseFx/sign
Browse files Browse the repository at this point in the history
  • Loading branch information
KrauseFx committed Dec 23, 2014
2 parents ecec832 + 38f6d97 commit 3df7f2b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/sigh/developer_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,13 @@ def download_file(url)
host = Capybara.current_session.current_host
url = [host, url].join('')

myacinfo = page.driver.cookies['myacinfo'].value # some Apple magic, which is required for the profile download
data = open(url, {'Cookie' => "myacinfo=#{myacinfo}"}).read
cookieString = ""

page.driver.cookies.each do |key, cookie|
cookieString << "#{cookie.name}=#{cookie.value};" # append all known cookies
end

data = open(url, {'Cookie' => cookieString}).read

raise "Something went wrong when downloading the file from the Dev Center" unless data
Helper.log.info "Successfully downloaded provisioning profile"
Expand Down

0 comments on commit 3df7f2b

Please sign in to comment.