lib/spaceship/tunes/tunes_client.rb in spaceship-0.3.1 vs lib/spaceship/tunes/tunes_client.rb in spaceship-0.3.2
- old
+ new
@@ -25,11 +25,11 @@
host = "https://itunesconnect.apple.com"
begin
url = host + request(:get, self.class.hostname).body.match(/action="(\/WebObjects\/iTunesConnect.woa\/wo\/.*)"/)[1]
raise "" unless url.length > 0
- File.write(cache_path, url) # TODO
+ File.write(cache_path, url)
return url
rescue => ex
puts ex
raise "Could not fetch the login URL from iTunes Connect, the server might be down"
end
@@ -138,11 +138,11 @@
# @param version (String): The version number is shown on the App Store and should
# match the one you used in Xcode.
# @param sku (String): A unique ID for your app that is not visible on the App Store.
# @param bundle_id (String): The bundle ID must match the one you used in Xcode. It
# can't be changed after you submit your first build.
- def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil)
+ def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil)
# First, we need to fetch the data from Apple, which we then modify with the user's values
r = request(:get, 'ra/apps/create/?appType=ios')
data = parse_response(r, 'data')
# Now fill in the values we have
@@ -150,9 +150,10 @@
data['newApp']['name']['value'] = name
data['newApp']['bundleId']['value'] = bundle_id
data['newApp']['primaryLanguage']['value'] = primary_language || 'English'
data['newApp']['vendorId']['value'] = sku
data['newApp']['bundleIdSuffix']['value'] = bundle_id_suffix
+ data['companyName']['value'] = company_name if company_name
# Now send back the modified hash
r = request(:post) do |req|
req.url 'ra/apps/create/?appType=ios'
req.body = data.to_json
\ No newline at end of file