Class: DeployGate::Builds::Ios::SetProfile
- Inherits:
-
Object
- Object
- DeployGate::Builds::Ios::SetProfile
- Defined in:
- lib/deploygate/builds/ios/set_profile.rb
Constant Summary collapse
- OUTPUT_PATH =
'/tmp/dg/provisioning_profile/'
- CERTIFICATE_OUTPUT_PATH =
'/tmp/dg/certificate/'
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #app_id_create ⇒ Boolean
- #create_provisioning(uuid) ⇒ Array
- #initialize(username, identifier) ⇒ DeployGate::Builds::Ios::SetProfile constructor
Constructor Details
#initialize(username, identifier) ⇒ DeployGate::Builds::Ios::SetProfile
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/deploygate/builds/ios/set_profile.rb', line 13 def initialize(username, identifier) @username = username @identifier = identifier Spaceship.login(username) Spaceship.select_team if Spaceship.client.in_house? @method = Export::ENTERPRISE else @method = Export::AD_HOC end end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
5 6 7 |
# File 'lib/deploygate/builds/ios/set_profile.rb', line 5 def method @method end |
Instance Method Details
#app_id_create ⇒ Boolean
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/deploygate/builds/ios/set_profile.rb', line 26 def app_id_create app_created = false Spaceship.app.all.collect do |app| if app.bundle_id == @identifier app_created = true break end end unless app_created Spaceship.app.create!(:bundle_id => @identifier, :name => "#{@identifier.split('.').join(' ')}") return true end false end |
#create_provisioning(uuid) ⇒ Array
44 45 46 47 48 49 50 51 52 |
# File 'lib/deploygate/builds/ios/set_profile.rb', line 44 def create_provisioning(uuid) FileUtils.mkdir_p(OUTPUT_PATH) if uuid.nil? return install_provisioning else return select_uuid_provisioning(uuid) end end |