cupertino 1.2.4 → 1.3.0
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.lock +1 -1
- data/README.md +9 -10
- data/bin/ios +1 -0
- data/cupertino-1.2.4.gem +0 -0
- data/lib/cupertino/provisioning_portal/agent.rb +1 -1
- data/lib/cupertino/provisioning_portal/commands/app_ids.rb +30 -19
- data/lib/cupertino/provisioning_portal/commands/certificates.rb +25 -14
- data/lib/cupertino/provisioning_portal/commands/devices.rb +28 -15
- data/lib/cupertino/provisioning_portal/commands/profiles.rb +52 -29
- data/lib/cupertino/provisioning_portal/commands.rb +1 -0
- data/lib/cupertino/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 564497e96b96972b59f3aa641eb7ba834e4fd4ce
|
4
|
+
data.tar.gz: e130a2842a126f0a3a142beea86ac428f5f8f32c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a12c15e3a122bd363c139dc836fede7ba3bc397d62f4062c34adc4f5a981159099097064241eb1fdbd60a3ec863c144be47582b94265af1d514c362f45bd976
|
7
|
+
data.tar.gz: ef3244eac9b14c4ad643a973a5528bd77c0806e6e72fc57a38a416d6d31fef2cf0fb2708a22e97c80338489f06b74c2dbda4e2189cf3c6916c173f3c9d6f4540
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -139,6 +139,15 @@ $ ios certificates:download --type distribution
|
|
139
139
|
$ ios certificates:download NAME
|
140
140
|
```
|
141
141
|
|
142
|
+
## CSV Output
|
143
|
+
|
144
|
+
The following commands will format their output as [comma-separated values](http://en.wikipedia.org/wiki/Comma-separated_values) when the `--format csv` argument is passed:
|
145
|
+
|
146
|
+
- `app_ids:list`
|
147
|
+
- `devices:list`
|
148
|
+
- `profiles:list`
|
149
|
+
- `profiles:manage:devices:list`
|
150
|
+
|
142
151
|
## Commands
|
143
152
|
|
144
153
|
- `login`
|
@@ -156,16 +165,6 @@ $ ios certificates:download NAME
|
|
156
165
|
- `certificates:download`
|
157
166
|
- `app_ids:list`
|
158
167
|
|
159
|
-
### Disabled Commands
|
160
|
-
|
161
|
-
> With the latest updates to the Apple Developer Portal, the following functionality has been removed.
|
162
|
-
|
163
|
-
- `pass_type_ids:list`
|
164
|
-
- `pass_type_ids:add`
|
165
|
-
- `pass_type_ids:certificates:list`
|
166
|
-
- `pass_type_ids:certificates:add`
|
167
|
-
- `pass_type_ids:certificates:download`
|
168
|
-
|
169
168
|
## Proxies
|
170
169
|
|
171
170
|
Cupertino will access the provisioning portal through a proxy if the `HTTP_PROXY` environment variable is set, with optional credentials `HTTP_PROXY_USER` and `HTTP_PROXY_PASSWORD`.
|
data/bin/ios
CHANGED
data/cupertino-1.2.4.gem
ADDED
Binary file
|
@@ -11,26 +11,37 @@ command :'app_ids:list' do |c|
|
|
11
11
|
c.action do |args, options|
|
12
12
|
app_ids = try{agent.list_app_ids}
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
14
|
+
say_warning "No App IDs found" and abort if app_ids.empty?
|
15
|
+
|
16
|
+
output = case options.format
|
17
|
+
when :csv
|
18
|
+
CSV.generate do |csv|
|
19
|
+
csv << ["Bundle Seed ID", "Description"]
|
20
|
+
app_ids.each do |app_id|
|
21
|
+
csv << [app_id.bundle_seed_id, app_id.description]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
else
|
25
|
+
title = "Legend: #{COLORS_BY_PROPERTY_VALUES.collect{|k, v| k.send(v)}.join(', ')}"
|
26
|
+
Terminal::Table.new :title => title do |t|
|
27
|
+
t << ["Bundle Seed ID", "Description", "Development", "Distribution"]
|
28
|
+
app_ids.each do |app_id|
|
29
|
+
t << :separator
|
30
|
+
row = [app_id.bundle_seed_id, app_id.description]
|
31
|
+
[app_id.development_properties, app_id.distribution_properties].each do |properties|
|
32
|
+
values = []
|
33
|
+
properties.each do |key, value|
|
34
|
+
color = COLORS_BY_PROPERTY_VALUES[value] || :reset
|
35
|
+
values << key.sub(/\:$/, "").send(color)
|
36
|
+
end
|
37
|
+
row << values.join("\n")
|
38
|
+
end
|
39
|
+
t << row
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
32
43
|
|
33
|
-
puts
|
44
|
+
puts output
|
34
45
|
end
|
35
46
|
end
|
36
47
|
|
@@ -8,22 +8,33 @@ command :'certificates:list' do |c|
|
|
8
8
|
|
9
9
|
say_warning "No #{type} certificates found." and abort if certificates.empty?
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
status = case certificate.status
|
16
|
-
when "Issued"
|
17
|
-
certificate.status.green
|
18
|
-
else
|
19
|
-
certificate.status.red
|
20
|
-
end
|
11
|
+
output = case options.format
|
12
|
+
when :csv
|
13
|
+
CSV.generate do |csv|
|
14
|
+
csv << ["Name", "Type", "Expiration Date", "Status"]
|
21
15
|
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
certificates.each do |certificate|
|
17
|
+
csv << [certificate.name, certificate.type, certificate.expiration, certificate.status]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
else
|
21
|
+
Terminal::Table.new do |t|
|
22
|
+
t << ["Name", "Type", "Expiration Date", "Status"]
|
23
|
+
t.add_separator
|
24
|
+
certificates.each do |certificate|
|
25
|
+
status = case certificate.status
|
26
|
+
when "Issued"
|
27
|
+
certificate.status.green
|
28
|
+
else
|
29
|
+
certificate.status.red
|
30
|
+
end
|
31
|
+
|
32
|
+
t << [certificate.name, certificate.type, certificate.expiration, status]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
25
36
|
|
26
|
-
puts
|
37
|
+
puts output
|
27
38
|
end
|
28
39
|
end
|
29
40
|
|
@@ -5,23 +5,36 @@ command :'devices:list' do |c|
|
|
5
5
|
c.action do |args, options|
|
6
6
|
devices = try{agent.list_devices}
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
say_warning "No devices found" and abort if devices.empty?
|
9
|
+
|
10
|
+
output = case options.format
|
11
|
+
when :csv
|
12
|
+
CSV.generate do |csv|
|
13
|
+
csv << ["Device Name", "Device Identifier", "Enabled"]
|
14
|
+
|
15
|
+
devices.compact.each do |device|
|
16
|
+
csv << [device.name, device.udid, device.enabled]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
else
|
20
|
+
number_of_devices = devices.compact.length
|
21
|
+
number_of_additional_devices = devices.length - number_of_devices
|
22
|
+
|
23
|
+
title = "Listing #{pluralize(number_of_devices, 'device')} "
|
24
|
+
title += "(You can register #{pluralize(number_of_additional_devices, 'additional device')})" if number_of_additional_devices > 0
|
25
|
+
|
26
|
+
Terminal::Table.new :title => title do |t|
|
27
|
+
t << ["Device Name", "Device Identifier", "Enabled"]
|
28
|
+
t.add_separator
|
29
|
+
devices.compact.each do |device|
|
30
|
+
t << [device.name, device.udid, device.enabled]
|
31
|
+
end
|
21
32
|
|
22
|
-
|
33
|
+
t.align_column 2, :center
|
34
|
+
end
|
35
|
+
end
|
23
36
|
|
24
|
-
puts
|
37
|
+
puts output
|
25
38
|
end
|
26
39
|
end
|
27
40
|
|
@@ -10,22 +10,33 @@ command :'profiles:list' do |c|
|
|
10
10
|
|
11
11
|
say_warning "No #{type} provisioning profiles found." and abort if profiles.empty?
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
status = case profile.status
|
18
|
-
when "Invalid"
|
19
|
-
profile.status.red
|
20
|
-
else
|
21
|
-
profile.status.green
|
22
|
-
end
|
13
|
+
output = case options.format
|
14
|
+
when :csv
|
15
|
+
CSV.generate do |csv|
|
16
|
+
csv << ["Profile", "App ID", "UUID", "Expiration", "Status"]
|
23
17
|
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
profiles.each do |profile|
|
19
|
+
csv << [profile.name, profile.app_id, profile.identifier, profile.expiration, profile.status]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
else
|
23
|
+
Terminal::Table.new do |t|
|
24
|
+
t << ["Profile", "App ID", "UUID", "Expiration", "Status"]
|
25
|
+
t.add_separator
|
26
|
+
profiles.each do |profile|
|
27
|
+
status = case profile.status
|
28
|
+
when "Invalid"
|
29
|
+
profile.status.red
|
30
|
+
else
|
31
|
+
profile.status.green
|
32
|
+
end
|
33
|
+
|
34
|
+
t << [profile.name, profile.app_id, profile.identifier, profile.expiration, status]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
27
38
|
|
28
|
-
puts
|
39
|
+
puts output
|
29
40
|
end
|
30
41
|
end
|
31
42
|
|
@@ -196,22 +207,34 @@ command :'profiles:manage:devices:list' do |c|
|
|
196
207
|
|
197
208
|
list = agent.list_devices_for_profile(profile)
|
198
209
|
|
199
|
-
|
210
|
+
output = case options.format
|
211
|
+
when :csv
|
212
|
+
CSV.generate do |csv|
|
213
|
+
csv << ["Device Name", "Device Identifier", "Active"]
|
200
214
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
+
list.values.each do |devices|
|
216
|
+
devices.each do |device|
|
217
|
+
csv << [device.name, device.udid, "Y"]
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
else
|
222
|
+
title = "Listing devices for provisioning profile #{profile.name}"
|
223
|
+
Terminal::Table.new :title => title do |t|
|
224
|
+
t << ["Device Name", "Device Identifier", "Active"]
|
225
|
+
t.add_separator
|
226
|
+
list[:on].each do |device|
|
227
|
+
t << [device.name, device.udid, "Y"]
|
228
|
+
end
|
229
|
+
list[:off].each do |device|
|
230
|
+
t << [device.name, device.udid, "N"]
|
231
|
+
end
|
232
|
+
|
233
|
+
t.align_column 2, :center
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
puts output
|
215
238
|
end
|
216
239
|
end
|
217
240
|
|
@@ -8,6 +8,7 @@ global_option('-p', '--password PASSWORD', 'Password') { |arg| agent.password =
|
|
8
8
|
global_option('--team TEAM', 'Team') { |arg| agent.team = arg if arg }
|
9
9
|
global_option('--info', 'Set log level to INFO') { agent.log.level = Logger::INFO }
|
10
10
|
global_option('--debug', 'Set log level to DEBUG') { agent.log.level = Logger::DEBUG }
|
11
|
+
global_option('--format FORMAT', [:table, :csv], "Set output format (default: table)")
|
11
12
|
|
12
13
|
require 'cupertino/provisioning_portal/commands/certificates'
|
13
14
|
require 'cupertino/provisioning_portal/commands/devices'
|
data/lib/cupertino/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cupertino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- ./cupertino-1.2.1.gem
|
147
147
|
- ./cupertino-1.2.2.gem
|
148
148
|
- ./cupertino-1.2.3.gem
|
149
|
+
- ./cupertino-1.2.4.gem
|
149
150
|
- ./cupertino.gemspec
|
150
151
|
- ./Gemfile
|
151
152
|
- ./Gemfile.lock
|