Class: Spaceship::Portal::AppService

Inherits:
Object
  • Object
show all
Defined in:
lib/spaceship/portal/app_service.rb

Overview

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

Defined Under Namespace

Modules: AppGroup, AssociatedDomains, Cloud, CloudKit, DataProtection, HealthKit, HomeKit, InterAppAudio, Passbook, PushNotification, VPNConfiguration, WirelessAccessory

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_id, value) ⇒ AppService

Returns a new instance of AppService.



20
21
22
23
24
25
26
27
28
29
30
31
# File '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

Instance Attribute Details

#service_idString

Returns The identifier used by the Dev Portal to represent this service.

Examples:

"homeKit"

Returns:

  • (String)

    The identifier used by the Dev Portal to represent this service



8
9
10
# File 'lib/spaceship/portal/app_service.rb', line 8

def service_id
  @service_id
end

#service_uriString

Returns The service URI for this service.

Examples:

"account/ios/identifiers/updateService.action"

Returns:

  • (String)

    The service URI for this service



18
19
20
# File 'lib/spaceship/portal/app_service.rb', line 18

def service_uri
  @service_uri
end

#valueObject

Returns The current value for this service.

Examples:

false

Returns:

  • (Object)

    The current value for this service



13
14
15
# File 'lib/spaceship/portal/app_service.rb', line 13

def value
  @value
end

Class Method Details

.app_groupObject



34
35
36
# File 'lib/spaceship/portal/app_service.rb', line 34

def app_group
  self::AppGroup
end

.associated_domainsObject



38
39
40
# File 'lib/spaceship/portal/app_service.rb', line 38

def associated_domains
  self::AssociatedDomains
end

.cloud_kitObject



62
63
64
# File 'lib/spaceship/portal/app_service.rb', line 62

def cloud_kit
  self::CloudKit
end

.data_protectionObject



42
43
44
# File 'lib/spaceship/portal/app_service.rb', line 42

def data_protection
  self::DataProtection
end

.health_kitObject



46
47
48
# File 'lib/spaceship/portal/app_service.rb', line 46

def health_kit
  self::HealthKit
end

.home_kitObject



50
51
52
# File 'lib/spaceship/portal/app_service.rb', line 50

def home_kit
  self::HomeKit
end

.icloudObject



58
59
60
# File 'lib/spaceship/portal/app_service.rb', line 58

def icloud
  self::Cloud
end

.inter_app_audioObject



66
67
68
# File 'lib/spaceship/portal/app_service.rb', line 66

def inter_app_audio
  self::InterAppAudio
end

.passbookObject



70
71
72
# File 'lib/spaceship/portal/app_service.rb', line 70

def passbook
  self::Passbook
end

.push_notificationObject



74
75
76
# File 'lib/spaceship/portal/app_service.rb', line 74

def push_notification
  self::PushNotification
end

.vpn_configurationObject



78
79
80
# File 'lib/spaceship/portal/app_service.rb', line 78

def vpn_configuration
  self::VPNConfiguration
end

.wireless_accessoryObject



54
55
56
# File 'lib/spaceship/portal/app_service.rb', line 54

def wireless_accessory
  self::WirelessAccessory
end

Instance Method Details

#==(other) ⇒ Object



83
84
85
86
87
88
# File 'lib/spaceship/portal/app_service.rb', line 83

def ==(other)
  self.class == other.class &&
    self.service_id == other.service_id &&
    self.value == other.value &&
    self.service_uri == other.service_uri
end