motion-provisioning 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -5
- data/lib/motion-provisioning/application.rb +3 -4
- data/lib/motion-provisioning/certificate.rb +10 -29
- data/lib/motion-provisioning/mobileprovision.rb +0 -2
- data/lib/motion-provisioning/provisioning_profile.rb +2 -2
- data/lib/motion-provisioning/spaceship/free_portal_client.rb +21 -30
- data/lib/motion-provisioning/spaceship/portal/certificate.rb +10 -0
- data/lib/motion-provisioning/spaceship/portal_client.rb +3 -5
- data/lib/motion-provisioning/utils.rb +15 -1
- data/lib/motion-provisioning/version.rb +1 -1
- data/lib/motion-provisioning.rb +5 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c059121bb4064c74fef8edd7607166484da18a9
|
4
|
+
data.tar.gz: 6b04043487931ed3f1f1072f5abb76ef50a55eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 323f9a8aaa00652f1a63ca601d92adf93e9eed4911801b5c02a7655211b3cf3b8e688a804eebd258e035337b0e9d4ab35e7df9a8fe55b19b97c7b6de55778e6f
|
7
|
+
data.tar.gz: 4b597603c530c67353989753221369d7c17b96b8aba9a2c057cb4d2640036c7092d1b93ae041da030204828a9ef7dd319df832a0fbdadbebcf7f27f2d507d35e
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/HipByte/motion-provisioning.svg?branch=master)](https://travis-ci.org/HipByte/motion-provisioning)
|
2
2
|
|
3
|
-
#
|
3
|
+
# motion-provisioning
|
4
4
|
|
5
5
|
Simplified provisioning for RubyMotion iOS, tvOS and macOS apps.
|
6
6
|
|
@@ -8,9 +8,9 @@ Getting started with iOS development has a very high barrier. Just
|
|
8
8
|
getting a app and device registered requires you to go through a *very*
|
9
9
|
complex web interface at developer.apple.com
|
10
10
|
|
11
|
-
|
11
|
+
motion-provisioning significantly alleviates the pain of these steps.
|
12
12
|
|
13
|
-
By providing your developer account,
|
13
|
+
By providing your developer account, motion-provisioning automatically performs
|
14
14
|
the following tasks in the Developer Portal for you:
|
15
15
|
|
16
16
|
- Creates an application matching your app's name and bundle
|
@@ -19,6 +19,8 @@ the following tasks in the Developer Portal for you:
|
|
19
19
|
- Creates development, distribution and adhoc profiles.
|
20
20
|
- Registers iOS devices.
|
21
21
|
|
22
|
+
For more awesomeness, use motion-provisioning along with [motion-appstore](https://github.com/HipByte/motion-appstore)!
|
23
|
+
|
22
24
|
![motion-provisioning in the terminal](img/motion-provisioning.gif)
|
23
25
|
|
24
26
|
## Installation
|
@@ -155,7 +157,7 @@ The distribution certificate (and it's corresponding private key) must
|
|
155
157
|
be shared between all team members who will be creating distribution
|
156
158
|
builds.
|
157
159
|
|
158
|
-
|
160
|
+
motion-provisioning will ask before revoking the existing distribution
|
159
161
|
certificate and creating a new one.
|
160
162
|
|
161
163
|
After you create a new distribution certificate, share the
|
@@ -174,7 +176,7 @@ For example, to recreate the development profile:
|
|
174
176
|
|
175
177
|
## Entitlements and App Services
|
176
178
|
|
177
|
-
|
179
|
+
motion-provisioning does not (yet) manage entitlements and app services (like
|
178
180
|
HealthKit, HomeKit or iCloud). To enable them, you need to go to the Developer
|
179
181
|
Portal. Then, recreate your provisioning profile and add the appropriate
|
180
182
|
entitlements to the `app.entitlements` hash in your Rakefile.
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module MotionProvisioning
|
2
2
|
class Application
|
3
|
-
|
4
3
|
# Finds or create app for the given bundle id and name
|
5
4
|
def self.find_or_create(bundle_id: nil, name: nil, mac: false)
|
6
5
|
app = Spaceship::Portal::App.find(bundle_id, mac: mac)
|
@@ -13,12 +12,12 @@ module MotionProvisioning
|
|
13
12
|
rescue Spaceship::Client::UnexpectedResponse => e
|
14
13
|
if e.to_s.include?("is not a valid identifier")
|
15
14
|
Utils.log("Error", "'#{bundle_id}' is not a valid identifier for an app. Please choose an identifier containing only alphanumeric characters, dots and asterisk")
|
16
|
-
exit
|
15
|
+
exit(1)
|
17
16
|
elsif e.to_s.include?("is not available")
|
18
17
|
Utils.log("Error", "'#{bundle_id}' has already been taken. Please enter a different string.")
|
19
|
-
exit
|
18
|
+
exit(1)
|
20
19
|
else
|
21
|
-
raise
|
20
|
+
raise(e)
|
22
21
|
end
|
23
22
|
end
|
24
23
|
end
|
@@ -1,17 +1,5 @@
|
|
1
|
-
module Spaceship
|
2
|
-
module Portal
|
3
|
-
class Certificate
|
4
|
-
# The PLIST request for the free certificate returns the certificate content
|
5
|
-
# in the certContent variable. It's stored in this attribute for later use.
|
6
|
-
attr_accessor :motionprovisioning_certContent,
|
7
|
-
:motionprovisioning_serialNumber
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
1
|
module MotionProvisioning
|
13
2
|
class Certificate
|
14
|
-
|
15
3
|
attr_accessor :type, :output_path, :platform
|
16
4
|
|
17
5
|
def client
|
@@ -41,7 +29,7 @@ module MotionProvisioning
|
|
41
29
|
# The certificate is not installed, so we install the cert and the key
|
42
30
|
import_file(private_key_path)
|
43
31
|
import_file(certificate_path)
|
44
|
-
name =
|
32
|
+
name = common_name(certificate_path)
|
45
33
|
Utils.log("Info", "Using certificate '#{name}'.")
|
46
34
|
return name
|
47
35
|
end
|
@@ -53,9 +41,6 @@ module MotionProvisioning
|
|
53
41
|
# Make sure a client is created and logged in
|
54
42
|
client
|
55
43
|
|
56
|
-
# All the certificates for the specified type
|
57
|
-
user_certificates = certificates
|
58
|
-
|
59
44
|
# Lets see if any of the user certificates is in the keychain
|
60
45
|
installed_certificate = nil
|
61
46
|
if !certificates.empty?
|
@@ -67,7 +52,7 @@ module MotionProvisioning
|
|
67
52
|
end
|
68
53
|
|
69
54
|
# There are no certificates in the server so we create a new one
|
70
|
-
if
|
55
|
+
if certificates.empty?
|
71
56
|
Utils.log("Warning", "Couldn't find any existing certificates... creating a new one.")
|
72
57
|
if certificate = create_certificate
|
73
58
|
return common_name(certificate)
|
@@ -77,23 +62,23 @@ module MotionProvisioning
|
|
77
62
|
end
|
78
63
|
# There are certificates in the server, but none is installed locally. Revoke all and create a new one.
|
79
64
|
elsif installed_certificate.nil?
|
80
|
-
Utils.log("Error", "None of the available certificates (#{
|
65
|
+
Utils.log("Error", "None of the available certificates (#{certificates.count}) is installed on the local machine. Revoking...")
|
81
66
|
|
82
67
|
# For distribution, ask before revoking
|
83
68
|
if self.type == :distribution
|
84
|
-
answer = Utils.ask("Info", "There are #{
|
69
|
+
answer = Utils.ask("Info", "There are #{certificates.count} distribution certificates in your account, but none installed locally.\n" \
|
85
70
|
"Before revoking and creating a new one, ask other team members who might have them installed to share them with you.\n" \
|
86
71
|
"Do you want to continue revoking the certificates? (Y/n):")
|
87
|
-
abort if answer.
|
72
|
+
abort if answer.no?
|
88
73
|
end
|
89
74
|
|
90
75
|
# Revoke all and create new one
|
91
76
|
if MotionProvisioning.free
|
92
|
-
|
77
|
+
certificates.each do |certificate|
|
93
78
|
client.revoke_development_certificate(certificate.motionprovisioning_serialNumber)
|
94
79
|
end
|
95
80
|
else
|
96
|
-
|
81
|
+
certificates.each(&:revoke!)
|
97
82
|
end
|
98
83
|
|
99
84
|
if certificate = create_certificate
|
@@ -106,20 +91,16 @@ module MotionProvisioning
|
|
106
91
|
else
|
107
92
|
Utils.log("Info", "Found certificate '#{installed_certificate.name}' which is installed in the local machine.")
|
108
93
|
|
109
|
-
path = store_certificate_raw(installed_certificate.motionprovisioning_certContent ||installed_certificate.download_raw)
|
94
|
+
path = store_certificate_raw(installed_certificate.motionprovisioning_certContent || installed_certificate.download_raw)
|
110
95
|
|
111
96
|
password = Utils.ask_password("Info", "Exporting private key from Keychain for certificate '#{installed_certificate.name}'. Choose a password (you will be asked for this password when importing this key into the Keychain in another machine):")
|
112
97
|
private_key_contents = private_key(common_name(path), sha1_fingerprint(path), password)
|
113
|
-
if private_key_contents.empty?
|
114
|
-
Utils.log("Error", "Could not export private key for certificate '#{installed_certificate.name}'.")
|
115
|
-
abort
|
116
|
-
end
|
117
98
|
File.write(private_key_path, private_key_contents)
|
118
99
|
|
119
100
|
# This certificate is installed on the local machine
|
120
101
|
Utils.log("Info", "Using certificate '#{installed_certificate.name}'.")
|
121
102
|
|
122
|
-
|
103
|
+
common_name(path)
|
123
104
|
end
|
124
105
|
end
|
125
106
|
|
@@ -219,7 +200,7 @@ module MotionProvisioning
|
|
219
200
|
end
|
220
201
|
Utils.ask("Info", "Press any key to continue...")
|
221
202
|
|
222
|
-
|
203
|
+
cert_path
|
223
204
|
end
|
224
205
|
|
225
206
|
def store_certificate_raw(raw_data)
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module MotionProvisioning
|
2
2
|
# Represents a .mobileprobision file on disk
|
3
3
|
class MobileProvision
|
4
|
-
|
5
4
|
attr_accessor :hash, :enabled_services, :certificates
|
6
5
|
|
7
6
|
# @param path (String): Path to the .mobileprovision file
|
@@ -42,6 +41,5 @@ module MotionProvisioning
|
|
42
41
|
|
43
42
|
true
|
44
43
|
end
|
45
|
-
|
46
44
|
end
|
47
45
|
end
|
@@ -55,7 +55,7 @@ module MotionProvisioning
|
|
55
55
|
ids.each do |id|
|
56
56
|
next if profile_devices.include?(id.downcase)
|
57
57
|
answer = Utils.ask("Info", "This computer is connected to an iOS device with ID '#{id}' which is not included in the profile. Do you want to register it? (Y/n):")
|
58
|
-
if answer.
|
58
|
+
if answer.yes?
|
59
59
|
Utils.log('Info', "Registering device with ID '#{id}'")
|
60
60
|
Spaceship::Portal::Device.create!(name: 'iOS Device', udid: id)
|
61
61
|
force_repair = true
|
@@ -66,7 +66,7 @@ module MotionProvisioning
|
|
66
66
|
existing = Spaceship::Portal::Device.find_by_udid(id)
|
67
67
|
next if existing
|
68
68
|
answer = Utils.ask("Info", "This computer is connected to an iOS device with ID '#{id}' which is not registered in the Developer Portal. Do you want to register it? (Y/n):")
|
69
|
-
if answer.
|
69
|
+
if answer.yes?
|
70
70
|
Utils.log('Info', "Registering device with ID '#{id}'")
|
71
71
|
client.create_device!('iOS Device', id)
|
72
72
|
end
|
@@ -2,19 +2,19 @@ module Spaceship
|
|
2
2
|
class FreePortalClient < Spaceship::PortalClient
|
3
3
|
|
4
4
|
def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
|
5
|
-
ensure_csrf
|
5
|
+
ensure_csrf(Spaceship::App)
|
6
6
|
|
7
7
|
params = {
|
8
8
|
teamId: team_id,
|
9
9
|
appIdId: app_id,
|
10
10
|
}
|
11
11
|
|
12
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
12
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/downloadTeamProvisioningProfile.action", params)
|
13
13
|
parse_response(r, 'provisioningProfile')
|
14
14
|
end
|
15
15
|
|
16
16
|
def download_provisioning_profile(profile_id, mac: false)
|
17
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
17
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/downloadProvisioningProfile.action", {
|
18
18
|
teamId: team_id,
|
19
19
|
provisioningProfileId: profile_id
|
20
20
|
})
|
@@ -26,7 +26,7 @@ module Spaceship
|
|
26
26
|
|
27
27
|
def devices(mac: false)
|
28
28
|
paging do |page_number|
|
29
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
29
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listDevices.action", {
|
30
30
|
teamId: team_id,
|
31
31
|
pageNumber: page_number,
|
32
32
|
pageSize: page_size,
|
@@ -37,19 +37,18 @@ module Spaceship
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def create_device!(device_name, device_id, mac: false)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/addDevice.action", {
|
41
|
+
teamId: team_id,
|
42
|
+
deviceNumber: device_id,
|
43
|
+
name: device_name
|
44
44
|
})
|
45
45
|
|
46
|
-
parse_response(
|
46
|
+
parse_response(r, 'device')
|
47
47
|
end
|
48
48
|
|
49
49
|
def apps(mac: false)
|
50
50
|
paging do |page_number|
|
51
|
-
|
52
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services/QH65B2/#{platform_slug(mac)}/listAppIds.action?clientId=XABBG36SBA", {
|
51
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listAppIds.action?clientId=XABBG36SBA", {
|
53
52
|
teamId: team_id,
|
54
53
|
pageNumber: page_number,
|
55
54
|
pageSize: page_size,
|
@@ -60,7 +59,7 @@ module Spaceship
|
|
60
59
|
end
|
61
60
|
|
62
61
|
def details_for_app(app)
|
63
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
62
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(app.mac?)}/getAppIdDetail.action", {
|
64
63
|
teamId: team_id,
|
65
64
|
identifier: app.app_id
|
66
65
|
})
|
@@ -74,14 +73,14 @@ module Spaceship
|
|
74
73
|
teamId: team_id
|
75
74
|
}
|
76
75
|
|
77
|
-
ensure_csrf
|
76
|
+
ensure_csrf(Spaceship::App)
|
78
77
|
|
79
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
78
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/addAppId.action?clientId=XABBG36SBA", params)
|
80
79
|
parse_response(r, 'appId')
|
81
80
|
end
|
82
81
|
|
83
82
|
def revoke_development_certificate(serial_number, mac: false)
|
84
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
83
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/revokeDevelopmentCert.action?clientId=XABBG36SBA", {
|
85
84
|
teamId: team_id,
|
86
85
|
serialNumber: serial_number,
|
87
86
|
})
|
@@ -89,9 +88,9 @@ module Spaceship
|
|
89
88
|
end
|
90
89
|
|
91
90
|
def create_development_certificate(csr, mac: false)
|
92
|
-
ensure_csrf
|
91
|
+
ensure_csrf(Spaceship::Certificate)
|
93
92
|
|
94
|
-
r = request_plist(:post, "https://developerservices2.apple.com/services
|
93
|
+
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/submitDevelopmentCSR.action?clientId=XABBG36SBA&teamId=#{team_id}", {
|
95
94
|
teamId: team_id,
|
96
95
|
csrContent: csr
|
97
96
|
})
|
@@ -101,23 +100,15 @@ module Spaceship
|
|
101
100
|
|
102
101
|
private
|
103
102
|
|
104
|
-
def ensure_csrf
|
105
|
-
if csrf_tokens.count == 0
|
106
|
-
# If we directly create a new resource (e.g. app) without querying anything before
|
107
|
-
# we don't have a valid csrf token, that's why we have to do at least one request
|
108
|
-
teams
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
103
|
def request_plist(method, url_or_path = nil, params = nil, headers = {}, &block)
|
113
104
|
headers['X-Xcode-Version'] = '7.3.1 (7D1014)'
|
114
105
|
headers['Content-Type'] = 'text/x-xml-plist'
|
115
|
-
params = params.to_plist if params
|
116
|
-
headers.merge!(csrf_tokens)
|
117
106
|
headers['User-Agent'] = USER_AGENT
|
118
|
-
|
119
|
-
return response
|
120
|
-
end
|
107
|
+
headers.merge!(csrf_tokens)
|
121
108
|
|
109
|
+
params = params.to_plist if params
|
110
|
+
|
111
|
+
send_request(method, url_or_path, params, headers, &block)
|
112
|
+
end
|
122
113
|
end
|
123
114
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Spaceship
|
2
|
+
module Portal
|
3
|
+
class Certificate
|
4
|
+
# The PLIST request for the free certificate returns the certificate content
|
5
|
+
# in the certContent variable. It's stored in this attribute for later use.
|
6
|
+
attr_accessor :motionprovisioning_certContent,
|
7
|
+
:motionprovisioning_serialNumber
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -1,23 +1,22 @@
|
|
1
1
|
module Spaceship
|
2
2
|
class PortalClient < Spaceship::Client
|
3
|
-
|
4
3
|
def distribution_certificates(mac: false)
|
5
4
|
paging do |page_number|
|
6
|
-
r = request(:post, "https://developerservices2.apple.com/services
|
5
|
+
r = request(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/downloadDistributionCerts.action?clientId=XABBG36SBA&teamId=#{team_id}")
|
7
6
|
parse_response(r, 'certificates')
|
8
7
|
end
|
9
8
|
end
|
10
9
|
|
11
10
|
def development_certificates(mac: false)
|
12
11
|
paging do |page_number|
|
13
|
-
r = request(:post, "https://developerservices2.apple.com/services
|
12
|
+
r = request(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listAllDevelopmentCerts.action?clientId=XABBG36SBA&teamId=#{team_id}")
|
14
13
|
parse_response(r, 'certificates')
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
17
|
# Fix a bug in Fastlane where the slug is hardcoded to ios
|
19
18
|
def create_certificate!(type, csr, app_id = nil)
|
20
|
-
ensure_csrf
|
19
|
+
ensure_csrf(Spaceship::Certificate)
|
21
20
|
|
22
21
|
mac = Spaceship::Portal::Certificate::MAC_CERTIFICATE_TYPE_IDS.keys.include?(type)
|
23
22
|
|
@@ -29,6 +28,5 @@ module Spaceship
|
|
29
28
|
})
|
30
29
|
parse_response(r, 'certRequest')
|
31
30
|
end
|
32
|
-
|
33
31
|
end
|
34
32
|
end
|
@@ -1,5 +1,19 @@
|
|
1
1
|
module MotionProvisioning
|
2
2
|
module Utils
|
3
|
+
class Answer
|
4
|
+
def initialize(answer)
|
5
|
+
@answer = answer.downcase
|
6
|
+
end
|
7
|
+
|
8
|
+
def yes?
|
9
|
+
@answer == 'y'
|
10
|
+
end
|
11
|
+
|
12
|
+
def no?
|
13
|
+
@answer == 'n'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
3
17
|
module_function
|
4
18
|
def log(what, msg)
|
5
19
|
require 'thread'
|
@@ -17,7 +31,7 @@ module MotionProvisioning
|
|
17
31
|
|
18
32
|
result = $stdin.gets
|
19
33
|
result.chomp! if result
|
20
|
-
result
|
34
|
+
Answer.new(result)
|
21
35
|
end
|
22
36
|
|
23
37
|
def ask_password(what, question)
|
data/lib/motion-provisioning.rb
CHANGED
@@ -6,6 +6,7 @@ require 'date'
|
|
6
6
|
require 'plist'
|
7
7
|
require 'security'
|
8
8
|
require 'spaceship'
|
9
|
+
require 'motion-provisioning/spaceship/portal/certificate'
|
9
10
|
require 'motion-provisioning/spaceship/portal_client'
|
10
11
|
require 'motion-provisioning/spaceship/free_portal_client'
|
11
12
|
|
@@ -28,7 +29,7 @@ module MotionProvisioning
|
|
28
29
|
|
29
30
|
if File.exist?('.gitignore') && File.read('.gitignore').match(/^provisioning$/).nil?
|
30
31
|
answer = Utils.ask("Info", "Do you want to add the 'provisioning' folder fo your '.gitignore' file? (Recommended) (Y/n):")
|
31
|
-
`echo provisioning >> .gitignore` if answer.
|
32
|
+
`echo provisioning >> .gitignore` if answer.yes?
|
32
33
|
end
|
33
34
|
|
34
35
|
client = if free
|
@@ -43,7 +44,7 @@ module MotionProvisioning
|
|
43
44
|
|
44
45
|
if ENV['MOTION_PROVISIONING_EMAIL'].nil? && !File.exist?(config_path)
|
45
46
|
answer = Utils.ask("Info", "Do you want to save the email to the config file ('provisioning/config.yaml') so you dont have to type it again? (Y/n):")
|
46
|
-
if answer.
|
47
|
+
if answer.yes?
|
47
48
|
FileUtils.mkdir_p(File.expand_path('./provisioning'))
|
48
49
|
File.write(config_path, { 'email' => email }.to_yaml)
|
49
50
|
end
|
@@ -68,7 +69,7 @@ module MotionProvisioning
|
|
68
69
|
rescue Spaceship::Client::InvalidUserCredentialsError => ex
|
69
70
|
Utils.log("Error", "There was an error logging into your account. Your password may be wrong.")
|
70
71
|
|
71
|
-
if Utils.ask("Info", 'Do you want to reenter your password? (Y/n):').
|
72
|
+
if Utils.ask("Info", 'Do you want to reenter your password? (Y/n):').yes?
|
72
73
|
|
73
74
|
# The 'delete' method is very verbose, temporarily disable output
|
74
75
|
orig_stdout = $stdout.dup
|
@@ -115,7 +116,7 @@ module MotionProvisioning
|
|
115
116
|
|
116
117
|
if File.exist?(config_path) && ENV['MOTION_PROVISIONING_TEAM_ID'].nil?
|
117
118
|
answer = Utils.ask("Info", "Do you want to save the team id (#{team_id}) in the config file ('provisioning/config.yaml') so you dont have to select it again? (Y/n):")
|
118
|
-
if answer.
|
119
|
+
if answer.yes?
|
119
120
|
config = YAML.load(File.read(config_path))
|
120
121
|
config['team_id'] = team_id
|
121
122
|
File.write(config_path, config.to_yaml)
|
@@ -194,7 +195,6 @@ module MotionProvisioning
|
|
194
195
|
Certificate.new.certificate_name(opts[:type], opts[:platform])
|
195
196
|
end
|
196
197
|
|
197
|
-
|
198
198
|
def self.profile(opts = {})
|
199
199
|
unless opts[:bundle_identifier]
|
200
200
|
Utils.log("Error", "'bundle_identifier' is required")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-provisioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Villacampa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spaceship
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.31.9
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.31.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: plist
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/motion-provisioning/mobileprovision.rb
|
155
155
|
- lib/motion-provisioning/provisioning_profile.rb
|
156
156
|
- lib/motion-provisioning/spaceship/free_portal_client.rb
|
157
|
+
- lib/motion-provisioning/spaceship/portal/certificate.rb
|
157
158
|
- lib/motion-provisioning/spaceship/portal_client.rb
|
158
159
|
- lib/motion-provisioning/tasks.rb
|
159
160
|
- lib/motion-provisioning/utils.rb
|
@@ -183,4 +184,3 @@ signing_key:
|
|
183
184
|
specification_version: 4
|
184
185
|
summary: Simplified provisioning for RubyMotion iOS, tvOS and macOS apps.
|
185
186
|
test_files: []
|
186
|
-
has_rdoc:
|