Skip to content

Instantly share code, notes, and snippets.

@horie1024
Created October 14, 2015 01:58
Show Gist options
  • Save horie1024/76078ed1ee0fc62f8df5 to your computer and use it in GitHub Desktop.
Save horie1024/76078ed1ee0fc62f8df5 to your computer and use it in GitHub Desktop.
resp = devicefarm.create_upload({
project_arn: "プロジェクトのARN",
name: "features.zip",
type: "CALABASH_TEST_PACKAGE",
content_type: "application/octet-stream"
})
# Pre-Signed URLの取得
pre_signed_url = resp.upload.url
# 実行をスケジューリングする際に使用
calabash_package_arn = resp.upload.arn
url = URI.parse(pre_signed_url)
features = File.open("YOUR_FEATURES_PATH", "rb").read
Net::HTTP.start(url.host) do |http|
http.send_request("PUT", url.request_uri, features, {"content-type" => "application/octet-stream"})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment