lib/iosdeveloper/provisioning_portal.rb in iosdeveloper-0.1.0 vs lib/iosdeveloper/provisioning_portal.rb in iosdeveloper-0.1.1
- old
+ new
@@ -96,17 +96,17 @@
def profile_id(display_url)
/provDisplayId=(\w+)/.match(display_url)[1]
end
- def download_profile(profile_name, file_name)
+ def download_profile(profile_id, file_name)
page = get_page(PROFILES_URL)
page.search("#remove table tbody tr").each do |item|
- name = item.at(".profile span").text
- if name == profile_name
+ id = profile_id(item.at(".profile a").attr("href"))
+ if id == profile_id
download_link = item.at(".action a").attr("href")
@agent.get(download_link).save(file_name)
- puts "Saved #{profile_name} profile in #{file_name}"
+ puts "Saved #{profile_id} profile in #{file_name}"
end
end
end
end
\ No newline at end of file