tiny_appstore_connect 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +8 -5
- data/lib/tiny_appstore_connect/client.rb +2 -0
- data/lib/tiny_appstore_connect/clients/device.rb +19 -0
- data/lib/tiny_appstore_connect/clients/profile.rb +20 -0
- data/lib/tiny_appstore_connect/model.rb +41 -29
- data/lib/tiny_appstore_connect/models/bundle_id.rb +22 -0
- data/lib/tiny_appstore_connect/models/bundle_id_capability.rb +97 -0
- data/lib/tiny_appstore_connect/models/device.rb +30 -11
- data/lib/tiny_appstore_connect/models/profile.rb +78 -0
- data/lib/tiny_appstore_connect/version.rb +1 -1
- data/lib/tiny_appstore_connect.rb +1 -1
- data/tiny_appstore_connect.gemspec +1 -0
- metadata +27 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6609d3f8bf5f6d601b8c81c459bedea9afbf2512fae752fc93acd89d1d09dca3
|
4
|
+
data.tar.gz: d14bc1789c738ada435831403b961b271518677b676b6850a2d362c98defe7b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e515886278c270c7a3d13467465edabb13998d98a46fbe28ac242c62b8f6b2b8b628986df07618ff51f56e3a428d09807468689368b8245d9df217ded6f08383
|
7
|
+
data.tar.gz: b21a545cf4bdaaf88be100c5a74bed63ab6210088a3c842944cc686c8063631c7d6bdb431c70e177740bb17675c72a9c68d30a5b5f25a122220bd5206a40fe78
|
data/Gemfile
CHANGED
@@ -5,8 +5,11 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in appstore_connect.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
|
9
|
-
gem '
|
10
|
-
gem '
|
11
|
-
gem '
|
12
|
-
gem '
|
8
|
+
group :development do
|
9
|
+
gem 'awesome_print', '~> 2.0.0.pre2'
|
10
|
+
gem 'rake', '~> 13.0'
|
11
|
+
gem 'rspec', '~> 3.0'
|
12
|
+
gem 'rubocop', '~> 1.21'
|
13
|
+
gem 'keycutter'
|
14
|
+
gem 'debug' # For ruby 3.0+
|
15
|
+
end
|
@@ -11,6 +11,7 @@ require 'tiny_appstore_connect/clients/build'
|
|
11
11
|
require 'tiny_appstore_connect/clients/device'
|
12
12
|
require 'tiny_appstore_connect/clients/certificate'
|
13
13
|
require 'tiny_appstore_connect/clients/user'
|
14
|
+
require 'tiny_appstore_connect/clients/profile'
|
14
15
|
|
15
16
|
module TinyAppstoreConnect
|
16
17
|
class Client
|
@@ -22,6 +23,7 @@ module TinyAppstoreConnect
|
|
22
23
|
include Device
|
23
24
|
include Certificate
|
24
25
|
include User
|
26
|
+
include Profile
|
25
27
|
|
26
28
|
attr_reader :connection
|
27
29
|
|
@@ -33,5 +33,24 @@ class TinyAppstoreConnect::Client
|
|
33
33
|
|
34
34
|
post('devices', body: body)
|
35
35
|
end
|
36
|
+
|
37
|
+
def rename_device(udid, new_name, status = nil)
|
38
|
+
exist_device = device(udid)
|
39
|
+
return if exist_device.nil?
|
40
|
+
|
41
|
+
device_id = exist_device.id
|
42
|
+
body = {
|
43
|
+
data: {
|
44
|
+
type: 'devices',
|
45
|
+
id: device_id,
|
46
|
+
attributes: {
|
47
|
+
name: new_name,
|
48
|
+
status: status
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
patch("devices/#{device_id}", body: body).to_model
|
54
|
+
end
|
36
55
|
end
|
37
56
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Inspried from fastlane/spaceship
|
4
|
+
# License by fastlane team (https://github.com/fastlane/fastlane)
|
5
|
+
|
6
|
+
class TinyAppstoreConnect::Client
|
7
|
+
module Profile
|
8
|
+
def profiles(**query)
|
9
|
+
# query[:include] = TinyAppstoreConnect::Model::Profile::ESSENTIAL_INCLUDES
|
10
|
+
|
11
|
+
get('profiles', **query)
|
12
|
+
end
|
13
|
+
|
14
|
+
def profile(id, **query)
|
15
|
+
# query[:include] = TinyAppstoreConnect::Model::Profile::ESSENTIAL_INCLUDES
|
16
|
+
|
17
|
+
get("profiles/#{id}", **query).to_model
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -28,12 +28,11 @@ module TinyAppstoreConnect
|
|
28
28
|
end
|
29
29
|
|
30
30
|
attr_accessor :id
|
31
|
-
|
31
|
+
attr_accessor :included
|
32
32
|
attr_reader :rate
|
33
33
|
|
34
34
|
def initialize(id, attributes, rate)
|
35
35
|
@id = id
|
36
|
-
@attributes = attributes
|
37
36
|
@rate = rate
|
38
37
|
|
39
38
|
update_attributes(attributes)
|
@@ -41,18 +40,21 @@ module TinyAppstoreConnect
|
|
41
40
|
|
42
41
|
def update_attributes(attributes)
|
43
42
|
(attributes || []).each do |key, value|
|
44
|
-
|
45
43
|
method = "#{underscore(key.to_s)}=".to_sym
|
46
44
|
self.send(method, value) if self.respond_to?(method)
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
48
|
+
def update_include(included)
|
49
|
+
@include = included
|
50
|
+
end
|
51
|
+
|
50
52
|
private
|
51
53
|
|
52
54
|
def underscore(camel_cased_word)
|
53
|
-
return camel_cased_word
|
55
|
+
return camel_cased_word unless /[A-Z-]/.match?(camel_cased_word)
|
54
56
|
|
55
|
-
word = ''
|
57
|
+
word = +''
|
56
58
|
camel_cased_word.each_char do |char|
|
57
59
|
if /[A-Z]/.match?(char)
|
58
60
|
word << '_' << char.downcase
|
@@ -77,10 +79,11 @@ module TinyAppstoreConnect
|
|
77
79
|
raise ConnectAPIError, 'No data' unless data
|
78
80
|
|
79
81
|
included = body['included'] || []
|
80
|
-
|
82
|
+
case data
|
83
|
+
when Hash
|
81
84
|
inflate_model(data, included, rate: rate)
|
82
|
-
|
83
|
-
|
85
|
+
when Array
|
86
|
+
data.map do |model_data|
|
84
87
|
inflate_model(model_data, included, rate: rate)
|
85
88
|
end
|
86
89
|
else
|
@@ -100,27 +103,11 @@ module TinyAppstoreConnect
|
|
100
103
|
# Instantiate object and inflate relationships
|
101
104
|
relationships = model_data['relationships'] || []
|
102
105
|
type_instance = type_class.new(id, attributes, rate)
|
106
|
+
type_instance.included = included
|
103
107
|
|
104
108
|
inflate_model_relationships(type_instance, relationships, included)
|
105
109
|
end
|
106
|
-
|
107
|
-
def self.find_class(model_data)
|
108
|
-
# Initialize cache
|
109
|
-
@types_cache ||= {}
|
110
|
-
|
111
|
-
# Find class in cache
|
112
|
-
type_string = model_data['type']
|
113
|
-
type_class = @types_cache[type_string]
|
114
|
-
return type_class if type_class
|
115
|
-
|
116
|
-
# Find class in array
|
117
|
-
type_class = @types.find do |type|
|
118
|
-
type.type == type_string
|
119
|
-
end
|
120
|
-
|
121
|
-
# Cache and return class
|
122
|
-
type_class
|
123
|
-
end
|
110
|
+
private_class_method :inflate_model
|
124
111
|
|
125
112
|
def self.inflate_model_relationships(type_instance, relationships, included)
|
126
113
|
# Relationship attributes to set
|
@@ -158,14 +145,39 @@ module TinyAppstoreConnect
|
|
158
145
|
type_instance.update_attributes(attributes)
|
159
146
|
type_instance
|
160
147
|
end
|
148
|
+
private_class_method :inflate_model_relationships
|
149
|
+
|
150
|
+
def self.find_class(model_data)
|
151
|
+
# Initialize cache
|
152
|
+
@types_cache ||= {}
|
153
|
+
|
154
|
+
# Find class in cache
|
155
|
+
type_string = model_data['type']
|
156
|
+
type_class = @types_cache[type_string]
|
157
|
+
return type_class if type_class
|
158
|
+
|
159
|
+
# Find class in array
|
160
|
+
type_class = @types.find do |type|
|
161
|
+
type.type == type_string
|
162
|
+
end
|
163
|
+
|
164
|
+
# Cache and return class
|
165
|
+
@types_cache[type_string] = type_class
|
166
|
+
|
167
|
+
type_class
|
168
|
+
end
|
169
|
+
private_class_method :find_class
|
161
170
|
end
|
162
171
|
end
|
163
172
|
|
164
173
|
require_relative 'models/app'
|
165
174
|
require_relative 'models/app_store_version'
|
166
|
-
require_relative 'models/build'
|
167
|
-
require_relative 'models/pre_release_version'
|
168
175
|
require_relative 'models/app_store_version_submission'
|
169
|
-
require_relative 'models/
|
176
|
+
require_relative 'models/build'
|
177
|
+
require_relative 'models/bundle_id_capability'
|
178
|
+
require_relative 'models/bundle_id'
|
170
179
|
require_relative 'models/certificate'
|
180
|
+
require_relative 'models/device'
|
181
|
+
require_relative 'models/pre_release_version'
|
182
|
+
require_relative 'models/profile'
|
171
183
|
require_relative 'models/user'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Inspried from fastlane/spaceship
|
4
|
+
# License by fastlane team (https://github.com/fastlane/fastlane)
|
5
|
+
|
6
|
+
module TinyAppstoreConnect::Model
|
7
|
+
class BundleId
|
8
|
+
include TinyAppstoreConnect::Model
|
9
|
+
|
10
|
+
attr_accessor :identifier
|
11
|
+
attr_accessor :name
|
12
|
+
attr_accessor :seed_id
|
13
|
+
attr_accessor :platform
|
14
|
+
|
15
|
+
# include
|
16
|
+
attr_accessor :bundle_id_capabilities
|
17
|
+
|
18
|
+
def self.type
|
19
|
+
'bundleIds'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
module TinyAppstoreConnect::Model
|
2
|
+
class BundleIdCapability
|
3
|
+
include TinyAppstoreConnect::Model
|
4
|
+
|
5
|
+
attr_accessor :capability_type
|
6
|
+
attr_accessor :settings
|
7
|
+
|
8
|
+
module Type
|
9
|
+
ACCESS_WIFI_INFORMATION = 'ACCESS_WIFI_INFORMATION'
|
10
|
+
APP_ATTEST = 'APP_ATTEST'
|
11
|
+
APP_GROUPS = 'APP_GROUPS'
|
12
|
+
APPLE_PAY = 'APPLE_PAY'
|
13
|
+
ASSOCIATED_DOMAINS = 'ASSOCIATED_DOMAINS'
|
14
|
+
AUTOFILL_CREDENTIAL_PROVIDER = 'AUTOFILL_CREDENTIAL_PROVIDER'
|
15
|
+
CLASSKIT = 'CLASSKIT'
|
16
|
+
ICLOUD = 'ICLOUD'
|
17
|
+
USERNOTIFICATIONS_COMMUNICATION = 'USERNOTIFICATIONS_COMMUNICATION'
|
18
|
+
NETWORK_CUSTOM_PROTOCOL = 'NETWORK_CUSTOM_PROTOCOL'
|
19
|
+
DATA_PROTECTION = 'DATA_PROTECTION'
|
20
|
+
EXTENDED_VIRTUAL_ADDRESSING = 'EXTENDED_VIRTUAL_ADDRESSING'
|
21
|
+
FAMILY_CONTROLS = 'FAMILY_CONTROLS'
|
22
|
+
FILEPROVIDER_TESTINGMODE = 'FILEPROVIDER_TESTINGMODE'
|
23
|
+
FONT_INSTALLATION = 'FONT_INSTALLATION'
|
24
|
+
GAME_CENTER = 'GAME_CENTER'
|
25
|
+
GROUP_ACTIVITIES = 'GROUP_ACTIVITIES'
|
26
|
+
HEALTHKIT = 'HEALTHKIT'
|
27
|
+
HEALTHKIT_RECALIBRATE_ESTIMATES = 'HEALTHKIT_RECALIBRATE_ESTIMATES'
|
28
|
+
HLS_INTERSTITIAL_PREVIEW = 'HLS_INTERSTITIAL_PREVIEW'
|
29
|
+
HOMEKIT = 'HOMEKIT'
|
30
|
+
HOT_SPOT = 'HOT_SPOT'
|
31
|
+
IN_APP_PURCHASE = 'IN_APP_PURCHASE'
|
32
|
+
INTER_APP_AUDIO = 'INTER_APP_AUDIO'
|
33
|
+
COREMEDIA_HLS_LOW_LATENCY = 'COREMEDIA_HLS_LOW_LATENCY'
|
34
|
+
MDM_MANAGED_ASSOCIATED_DOMAINS = 'MDM_MANAGED_ASSOCIATED_DOMAINS'
|
35
|
+
MAPS = 'MAPS'
|
36
|
+
MULTIPATH = 'MULTIPATH'
|
37
|
+
NETWORK_EXTENSIONS = 'NETWORK_EXTENSIONS'
|
38
|
+
NFC_TAG_READING = 'NFC_TAG_READING'
|
39
|
+
PERSONAL_VPN = 'PERSONAL_VPN'
|
40
|
+
PUSH_NOTIFICATIONS = 'PUSH_NOTIFICATIONS'
|
41
|
+
APPLE_ID_AUTH = 'APPLE_ID_AUTH'
|
42
|
+
SIRIKIT = 'SIRIKIT'
|
43
|
+
SYSTEM_EXTENSION_INSTALL = 'SYSTEM_EXTENSION_INSTALL'
|
44
|
+
USERNOTIFICATIONS_TIMESENSITIVE = 'USERNOTIFICATIONS_TIMESENSITIVE'
|
45
|
+
USER_MANAGEMENT = 'USER_MANAGEMENT'
|
46
|
+
WALLET = 'WALLET'
|
47
|
+
WIRELESS_ACCESSORY_CONFIGURATION = 'WIRELESS_ACCESSORY_CONFIGURATION'
|
48
|
+
|
49
|
+
# Additional Capabilities
|
50
|
+
CARPLAY_PLAYABLE_CONTENT = 'CARPLAY_PLAYABLE_CONTENT'
|
51
|
+
CARPLAY_MESSAGING = 'CARPLAY_MESSAGING'
|
52
|
+
CARPLAY_NAVIGATION = 'CARPLAY_NAVIGATION'
|
53
|
+
CARPLAY_VOIP = 'CARPLAY_VOIP'
|
54
|
+
CRITICAL_ALERTS = 'CRITICAL_ALERTS'
|
55
|
+
HOTSPOT_HELPER_MANAGED = 'HOTSPOT_HELPER_MANAGED'
|
56
|
+
DRIVERKIT = 'DRIVERKIT'
|
57
|
+
DRIVERKIT_ENDPOINT_SECURITY = 'DRIVERKIT_ENDPOINT_SECURITY'
|
58
|
+
DRIVERKIT_HID_DEVICE = 'DRIVERKIT_HID_DEVICE'
|
59
|
+
DRIVERKIT_NETWORKING = 'DRIVERKIT_NETWORKING'
|
60
|
+
DRIVERKIT_SERIAL = 'DRIVERKIT_SERIAL'
|
61
|
+
DRIVERKIT_HID_EVENT_SERVICE = 'DRIVERKIT_HID_EVENT_SERVICE'
|
62
|
+
DRIVERKIT_HID = 'DRIVERKIT_HID'
|
63
|
+
IPAD_CAMERA_MULTITASKING = 'IPAD_CAMERA_MULTITASKING'
|
64
|
+
SFUNIVERSALLINK_API = 'SFUNIVERSALLINK_API'
|
65
|
+
VP9_DECODER = 'VP9_DECODER'
|
66
|
+
|
67
|
+
# App Services
|
68
|
+
MUSIC_KIT = 'MUSIC_KIT'
|
69
|
+
SHAZAM_KIT = 'SHAZAM_KIT'
|
70
|
+
|
71
|
+
# Undocumented as of 2020-06-09
|
72
|
+
MARZIPAN = 'MARZIPAN' # Catalyst
|
73
|
+
end
|
74
|
+
|
75
|
+
module Settings
|
76
|
+
ICLOUD_VERSION = 'ICLOUD_VERSION'
|
77
|
+
DATA_PROTECTION_PERMISSION_LEVEL = 'DATA_PROTECTION_PERMISSION_LEVEL'
|
78
|
+
APPLE_ID_AUTH_APP_CONSENT = 'APPLE_ID_AUTH_APP_CONSENT'
|
79
|
+
GAME_CENTER_SETTING = 'GAME_CENTER_SETTING'
|
80
|
+
end
|
81
|
+
|
82
|
+
module Options
|
83
|
+
XCODE_5 = 'XCODE_5'
|
84
|
+
XCODE_6 = 'XCODE_6'
|
85
|
+
COMPLETE_PROTECTION = 'COMPLETE_PROTECTION'
|
86
|
+
PROTECTED_UNLESS_OPEN = 'PROTECTED_UNLESS_OPEN'
|
87
|
+
PROTECTED_UNTIL_FIRST_USER_AUTH = 'PROTECTED_UNTIL_FIRST_USER_AUTH'
|
88
|
+
PRIMARY_APP_CONSENT = 'PRIMARY_APP_CONSENT'
|
89
|
+
GAME_CENTER_MAC = 'GAME_CENTER_MAC'
|
90
|
+
GAME_CENTER_IOS = 'GAME_CENTER_IOS'
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.type
|
94
|
+
return 'bundleIdCapabilities'
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -15,27 +15,46 @@ module TinyAppstoreConnect::Model
|
|
15
15
|
attr_accessor :udid
|
16
16
|
attr_accessor :added_date
|
17
17
|
|
18
|
+
def device
|
19
|
+
return model unless model.nil?
|
20
|
+
|
21
|
+
case device_class
|
22
|
+
when DeviceClass::APPLE_WATCH
|
23
|
+
'Apple Watch'
|
24
|
+
when DeviceClass::IPAD
|
25
|
+
'iPad'
|
26
|
+
when DeviceClass::IPHONE
|
27
|
+
'iPhone'
|
28
|
+
when DeviceClass::IPOD
|
29
|
+
'iPod Touch'
|
30
|
+
when DeviceClass::APPLE_TV
|
31
|
+
'Apple TV'
|
32
|
+
when DeviceClass::MAC
|
33
|
+
'macOS'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
18
37
|
# include
|
19
|
-
|
38
|
+
attr_accessor :app
|
20
39
|
# attr_accessor :app_store_version_submission
|
21
|
-
|
40
|
+
attr_accessor :build
|
22
41
|
|
23
42
|
module DeviceClass
|
24
|
-
APPLE_WATCH =
|
25
|
-
IPAD =
|
26
|
-
IPHONE =
|
27
|
-
IPOD =
|
28
|
-
APPLE_TV =
|
29
|
-
MAC =
|
43
|
+
APPLE_WATCH = 'APPLE_WATCH'
|
44
|
+
IPAD = 'IPAD'
|
45
|
+
IPHONE = 'IPHONE'
|
46
|
+
IPOD = 'IPOD'
|
47
|
+
APPLE_TV = 'APPLE_TV'
|
48
|
+
MAC = 'MAC'
|
30
49
|
end
|
31
50
|
|
32
51
|
module Status
|
33
|
-
ENABLED =
|
34
|
-
DISABLED =
|
52
|
+
ENABLED = 'ENABLED'
|
53
|
+
DISABLED = 'DISABLED'
|
35
54
|
end
|
36
55
|
|
37
56
|
def self.type
|
38
|
-
return
|
57
|
+
return 'devices'
|
39
58
|
end
|
40
59
|
|
41
60
|
def enabled?
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Inspried from fastlane/spaceship
|
4
|
+
# License by fastlane team (https://github.com/fastlane/fastlane)
|
5
|
+
|
6
|
+
module TinyAppstoreConnect::Model
|
7
|
+
class Profile
|
8
|
+
include TinyAppstoreConnect::Model
|
9
|
+
|
10
|
+
attr_accessor :name
|
11
|
+
attr_accessor :platform
|
12
|
+
attr_accessor :profile_type
|
13
|
+
attr_accessor :profile_state
|
14
|
+
attr_accessor :profile_content
|
15
|
+
attr_accessor :uuid
|
16
|
+
attr_accessor :created_date
|
17
|
+
attr_accessor :expiration_date
|
18
|
+
|
19
|
+
# include
|
20
|
+
attr_accessor :bundle_id
|
21
|
+
attr_accessor :certificates
|
22
|
+
attr_accessor :devices
|
23
|
+
|
24
|
+
ESSENTIAL_INCLUDES = [
|
25
|
+
'bundleId',
|
26
|
+
'certificates',
|
27
|
+
'devices'
|
28
|
+
].join(',')
|
29
|
+
|
30
|
+
module ProfileState
|
31
|
+
ACTIVE = 'ACTIVE'
|
32
|
+
INVALID = 'INVALID'
|
33
|
+
end
|
34
|
+
|
35
|
+
module ProfileType
|
36
|
+
IOS_APP_DEVELOPMENT = 'IOS_APP_DEVELOPMENT'
|
37
|
+
IOS_APP_STORE = 'IOS_APP_STORE'
|
38
|
+
IOS_APP_ADHOC = 'IOS_APP_ADHOC'
|
39
|
+
IOS_APP_INHOUSE = 'IOS_APP_INHOUSE'
|
40
|
+
MAC_APP_DEVELOPMENT = 'MAC_APP_DEVELOPMENT'
|
41
|
+
MAC_APP_STORE = 'MAC_APP_STORE'
|
42
|
+
MAC_APP_DIRECT = 'MAC_APP_DIRECT'
|
43
|
+
TVOS_APP_DEVELOPMENT = 'TVOS_APP_DEVELOPMENT'
|
44
|
+
TVOS_APP_STORE = 'TVOS_APP_STORE'
|
45
|
+
TVOS_APP_ADHOC = 'TVOS_APP_ADHOC'
|
46
|
+
TVOS_APP_INHOUSE = 'TVOS_APP_INHOUSE'
|
47
|
+
MAC_CATALYST_APP_DEVELOPMENT = 'MAC_CATALYST_APP_DEVELOPMENT'
|
48
|
+
MAC_CATALYST_APP_STORE = 'MAC_CATALYST_APP_STORE'
|
49
|
+
MAC_CATALYST_APP_DIRECT = 'MAC_CATALYST_APP_DIRECT'
|
50
|
+
end
|
51
|
+
|
52
|
+
def mobileprovision
|
53
|
+
@mobileprovision ||= -> () {
|
54
|
+
require 'cfpropertylist'
|
55
|
+
raw = CFPropertyList::List.new(data: striped_profile_content).value
|
56
|
+
CFPropertyList.native_types(raw)
|
57
|
+
}.call
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
PLIST_HEADER = '<?xml version='
|
63
|
+
PLIST_CLOSE_TAG = '</plist>'
|
64
|
+
|
65
|
+
def striped_profile_content
|
66
|
+
@striped_profile ||= -> () {
|
67
|
+
content = Base64.decode64(profile_content)
|
68
|
+
start_point = content.index(PLIST_HEADER)
|
69
|
+
end_point = content.index(PLIST_CLOSE_TAG) + PLIST_CLOSE_TAG.size - 1
|
70
|
+
content[start_point..end_point]
|
71
|
+
}.call
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.type
|
75
|
+
'profiles'
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -25,7 +25,7 @@ module TinyAppstoreConnect
|
|
25
25
|
messages = ["Check errors(#{errors.size}) from response:"]
|
26
26
|
errors.each_with_index do |error, i|
|
27
27
|
message = []
|
28
|
-
message << "#{i + 1}." << "[#{error['status']}:#{error['code']}]" << "#{error['title']}" <<
|
28
|
+
message << "#{i + 1}." << "[#{error['status']}:#{error['code']}]" << "#{error['title']}:" << error['detail']
|
29
29
|
message << "in #{error['source']}" unless error['source'].to_s.empty?
|
30
30
|
|
31
31
|
messages << message.join(' ')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_appstore_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- icyleaf
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -70,6 +70,26 @@ dependencies:
|
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '4'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: CFPropertyList
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "<"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 3.1.0
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.3.4
|
83
|
+
type: :runtime
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "<"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.1.0
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 2.3.4
|
73
93
|
description: Tiny AppStore Connect API
|
74
94
|
email:
|
75
95
|
- icyleaf.cn@gmail.com
|
@@ -91,15 +111,19 @@ files:
|
|
91
111
|
- lib/tiny_appstore_connect/clients/build.rb
|
92
112
|
- lib/tiny_appstore_connect/clients/certificate.rb
|
93
113
|
- lib/tiny_appstore_connect/clients/device.rb
|
114
|
+
- lib/tiny_appstore_connect/clients/profile.rb
|
94
115
|
- lib/tiny_appstore_connect/clients/user.rb
|
95
116
|
- lib/tiny_appstore_connect/model.rb
|
96
117
|
- lib/tiny_appstore_connect/models/app.rb
|
97
118
|
- lib/tiny_appstore_connect/models/app_store_version.rb
|
98
119
|
- lib/tiny_appstore_connect/models/app_store_version_submission.rb
|
99
120
|
- lib/tiny_appstore_connect/models/build.rb
|
121
|
+
- lib/tiny_appstore_connect/models/bundle_id.rb
|
122
|
+
- lib/tiny_appstore_connect/models/bundle_id_capability.rb
|
100
123
|
- lib/tiny_appstore_connect/models/certificate.rb
|
101
124
|
- lib/tiny_appstore_connect/models/device.rb
|
102
125
|
- lib/tiny_appstore_connect/models/pre_release_version.rb
|
126
|
+
- lib/tiny_appstore_connect/models/profile.rb
|
103
127
|
- lib/tiny_appstore_connect/models/user.rb
|
104
128
|
- lib/tiny_appstore_connect/response.rb
|
105
129
|
- lib/tiny_appstore_connect/token.rb
|
@@ -126,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
150
|
- !ruby/object:Gem::Version
|
127
151
|
version: '0'
|
128
152
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
153
|
+
rubygems_version: 3.4.10
|
130
154
|
signing_key:
|
131
155
|
specification_version: 4
|
132
156
|
summary: Tiny AppStore Connect API
|