lib/produce/developer_center.rb in produce-0.1.5 vs lib/produce/developer_center.rb in produce-0.1.6
- old
+ new
@@ -1,9 +1,9 @@
require 'fastlane_core/developer_center/developer_center'
-module FastlaneCore
- class DeveloperCenter
+module Produce
+ class DeveloperCenter < FastlaneCore::DeveloperCenter
APPS_URL = "https://developer.apple.com/account/ios/identifiers/bundle/bundleList.action"
CREATE_APP_URL = "https://developer.apple.com/account/ios/identifiers/bundle/bundleCreate.action"
def run(config)
@config = config
@@ -16,13 +16,14 @@
if app_exists?
Helper.log.info "App '#{@config[:app_name]}' already exists, nothing to do on the Dev Center".green
ENV["CREATED_NEW_APP_ID"] = nil
# Nothing to do here
else
- Helper.log.info "Creating new app '#{@config[:app_name]}' on the Apple Dev Center".green
+ app_name = valid_name_for(@config[:app_name])
+ Helper.log.info "Creating new app '#{app_name}' on the Apple Dev Center".green
visit CREATE_APP_URL
- wait_for_elements("*[name='appIdName']").first.set @config[:app_name]
+ wait_for_elements("*[name='appIdName']").first.set app_name
wait_for_elements("*[name='explicitIdentifier']").first.set @config[:bundle_identifier]
click_next
sleep 5 # sometimes this takes a while and we don't want to timeout
@@ -41,10 +42,10 @@
raise "Something went wrong when creating the new app - it's not listed in the App's list" unless app_exists?
ENV["CREATED_NEW_APP_ID"] = Time.now.to_s
- Helper.log.info "Finished creating new app '#{@config[:app_name]}' on the Dev Center".green
+ Helper.log.info "Finished creating new app '#{app_name}' on the Dev Center".green
end
return true
end