class Spaceship::Portal::AppService

Represents a single application service (its state to be more precise) on the Apple Dev Portal

Constants

AccessWifi
AppGroup
ApplePay
AssociatedDomains
AutoFillCredential
ClassKit
Cloud
CloudKit
DataProtection
GameCenter
HealthKit
HomeKit
Hotspot
InAppPurchase
InterAppAudio
Multipath
NFCTagReading
NetworkExtension
Passbook
PersonalVPN
PushNotification
SiriKit
VPNConfiguration
Wallet
WirelessAccessory

Attributes

service_id[RW]

@return (String) The identifier used by the Dev Portal to represent this service @example

"homeKit"
service_uri[RW]

@return (String) The service URI for this service @example

"account/ios/identifiers/updateService.action"
value[RW]

@return (Object) The current value for this service @example

false

Private Class Methods

new(service_id, value) click to toggle source
# File spaceship/lib/spaceship/portal/app_service.rb, line 20
def initialize(service_id, value)
  @service_id = service_id
  @value = value

  if @service_id == "push"
    # Push notifications have a special URI
    @service_uri = "account/ios/identifiers/updatePushService.action"
  else
    # Default service URI
    @service_uri = "account/ios/identifiers/updateService.action"
  end
end
new_service(id, values: { on: true, off: false }) click to toggle source
# File spaceship/lib/spaceship/portal/app_service.rb, line 33
def self.new_service(id, values: { on: true, off: false })
  m = Module.new
  values.each do |k, v|
    m.define_singleton_method(k) do
      AppService.new(id, v)
    end
  end
  return m
end

Private Instance Methods

==(other) click to toggle source
# File spaceship/lib/spaceship/portal/app_service.rb, line 79
def ==(other)
  self.class == other.class &&
    self.service_id == other.service_id &&
    self.value == other.value &&
    self.service_uri == other.service_uri
end