lib/produce/developer_center.rb in produce-0.4.0 vs lib/produce/developer_center.rb in produce-0.4.1
- old
+ new
@@ -18,11 +18,11 @@
# Nothing to do here
else
app_name = valid_name_for(Produce.config[:app_name])
Helper.log.info "Creating new app '#{app_name}' on the Apple Dev Center".green
- app = Spaceship.app.create!(bundle_id: Produce.config[:bundle_identifier].to_s,
+ app = Spaceship.app.create!(bundle_id: app_identifier,
name: app_name)
Helper.log.info "Created app #{app.app_id}"
raise "Something went wrong when creating the new app - it's not listed in the apps list" unless app_exists?
@@ -38,12 +38,16 @@
def valid_name_for(input)
latinazed = input.to_slug.transliterate.to_s # remove accents
latinazed.gsub(/[^0-9A-Za-z\d\s]/, '') # remove non-valid characters
end
+ def app_identifier
+ Produce.config[:app_identifier].to_s
+ end
+
private
def app_exists?
- Spaceship.app.find(Produce.config[:bundle_identifier].to_s) != nil
+ Spaceship.app.find(app_identifier) != nil
end
def login
Spaceship.login(Produce.config[:username], nil)
Spaceship.select_team