cupertino 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +11 -0
- data/lib/cupertino.rb +1 -1
- data/lib/cupertino/provisioning_portal.rb +1 -1
- data/lib/cupertino/provisioning_portal/commands/profiles.rb +73 -13
- data/lib/cupertino/provisioning_portal/helpers.rb +7 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f34dafa2ee7735e8e2cfbbf1c288646d89d2630
|
4
|
+
data.tar.gz: 6cfae45ba3385252735c66ead7b958e48c8b2ebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce67fee76f47e88958ad9be8e82cfc35032153ab25e30f98ce93d162d3c300a91d6c0b5bc9e56885fbd588845725a61f6a1eedd1823be9be9e5902b002b90a58
|
7
|
+
data.tar.gz: fe06155709eeda1854b2c490ad0c644d506b04958f8b8ef09e573753c651e486e6c4fb1663417c5892148b0bc24adba8b9d2af713661577827c021459e9e61b2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -55,6 +55,15 @@ _Opens an editor with a list of devices, each of which can be commented / uncomm
|
|
55
55
|
Johnny Appleseed iPad 0123456789012345678901234567890123abcdef
|
56
56
|
# Johnny Appleseed iPhone abcdef0123456789012345678901234567890123
|
57
57
|
|
58
|
+
|
59
|
+
$ ios profiles:devices:add MyApp_Development_Profile "Johnny Appleseed iPad"=0123456789012345678901234567890123abcdef "Johnny Appleseed iPhone"=abcdef0123456789012345678901234567890123
|
60
|
+
|
61
|
+
_Adds (without an editor) a list of devices to a provisioning profile_
|
62
|
+
|
63
|
+
$ ios profiles:devices:remove MyApp_Development_Profile "Johnny Old iPad"=0123456789012345678901234567890123abcdef "Johnny Old iPhone"=abcdef0123456789012345678901234567890123
|
64
|
+
|
65
|
+
_Removes (without an editor) a list of devices from a provisioning profile_
|
66
|
+
|
58
67
|
### App IDs
|
59
68
|
|
60
69
|
$ ios app_ids:list
|
@@ -88,6 +97,8 @@ _Opens an editor with a list of devices, each of which can be commented / uncomm
|
|
88
97
|
- `devices:list`
|
89
98
|
- `profiles:list`
|
90
99
|
- `profiles:manage:devices`
|
100
|
+
- `profiles:manage:devices:add`
|
101
|
+
- `profiles:manage:devices:remove`
|
91
102
|
- `profiles:download`
|
92
103
|
- `certificates:list [development|distribution]`
|
93
104
|
- `certificates:download`
|
data/lib/cupertino.rb
CHANGED
@@ -14,7 +14,7 @@ module Cupertino
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class Certificate < Struct.new(:name, :type, :expiration_date, :status, :download_url)
|
17
|
+
class Certificate < Struct.new(:name, :type, :expiration_date, :status, :download_url)
|
18
18
|
def to_s
|
19
19
|
"#{self.name}"
|
20
20
|
end
|
@@ -30,6 +30,26 @@ end
|
|
30
30
|
|
31
31
|
alias_command :profiles, :'profiles:list'
|
32
32
|
|
33
|
+
command :'profiles:download' do |c|
|
34
|
+
c.syntax = 'ios profiles:download'
|
35
|
+
c.summary = 'Downloads the Provisioning Profiles'
|
36
|
+
c.description = ''
|
37
|
+
|
38
|
+
c.action do |args, options|
|
39
|
+
type = args.first.downcase.to_sym rescue nil
|
40
|
+
profiles = try{agent.list_profiles(type ||= :development)}
|
41
|
+
profiles = profiles.find_all{|profile| profile.status == 'Active'}
|
42
|
+
|
43
|
+
say_warning "No active #{type} profiles found." and abort if profiles.empty?
|
44
|
+
profile = choose "Select a profile to download:", *profiles
|
45
|
+
if filename = agent.download_profile(profile)
|
46
|
+
say_ok "Successfully downloaded: '#{filename}'"
|
47
|
+
else
|
48
|
+
say_error "Could not download profile"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
33
53
|
command :'profiles:manage:devices' do |c|
|
34
54
|
c.syntax = 'ios profiles:manage:devices'
|
35
55
|
c.summary = 'Manage active devices for a development provisioning profile'
|
@@ -66,24 +86,64 @@ command :'profiles:manage:devices' do |c|
|
|
66
86
|
end
|
67
87
|
end
|
68
88
|
|
69
|
-
alias_command :'profiles:
|
89
|
+
alias_command :'profiles:devices', :'profiles:manage:devices'
|
70
90
|
|
71
|
-
command :'profiles:
|
72
|
-
c.syntax = 'ios profiles:
|
73
|
-
c.summary = '
|
91
|
+
command :'profiles:manage:devices:add' do |c|
|
92
|
+
c.syntax = 'ios profiles:manage:devices:add PROFILE_NAME DEVICE_NAME=DEVICE_ID [...]'
|
93
|
+
c.summary = 'Add active devices to a Provisioning Profile'
|
74
94
|
c.description = ''
|
75
95
|
|
76
96
|
c.action do |args, options|
|
77
|
-
|
78
|
-
|
79
|
-
|
97
|
+
profiles = try{agent.list_profiles(:development) + agent.list_profiles(:distribution)}
|
98
|
+
profile = profiles.find {|profile| profile.name == args.first }
|
99
|
+
|
100
|
+
say_warning "No provisioning profiles named #{args.first} were found." and abort unless profile
|
101
|
+
|
102
|
+
devices = []
|
103
|
+
args[1..-1].each do |arg|
|
104
|
+
components = arg.strip.gsub(/\"/, '').split(/\=/)
|
105
|
+
device = Device.new
|
106
|
+
device.name = components.first
|
107
|
+
device.udid = components.last
|
108
|
+
devices << device
|
109
|
+
end
|
80
110
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
111
|
+
agent.manage_devices_for_profile(profile) do |on, off|
|
112
|
+
on + devices
|
113
|
+
end
|
114
|
+
|
115
|
+
say_ok "Successfully added devices to #{args.first}."
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
alias_command :'profiles:devices:add', :'profiles:manage:devices:add'
|
120
|
+
|
121
|
+
command :'profiles:manage:devices:remove' do |c|
|
122
|
+
c.syntax = 'ios profiles:manage:devices:remove PROFILE_NAME DEVICE_NAME=DEVICE_ID [...]'
|
123
|
+
c.summary = 'Remove active devices from a Provisioning Profile.'
|
124
|
+
c.description = ''
|
125
|
+
|
126
|
+
c.action do |args, options|
|
127
|
+
profiles = try{agent.list_profiles(:development) + agent.list_profiles(:distribution)}
|
128
|
+
profile = profiles.find {|profile| profile.name == args.first }
|
129
|
+
|
130
|
+
say_warning "No provisioning profiles named #{args.first} were found." and abort unless profile
|
131
|
+
|
132
|
+
devices = []
|
133
|
+
args[1..-1].each do |arg|
|
134
|
+
components = arg.strip.gsub(/\"/, '').split(/\=/)
|
135
|
+
device = Device.new
|
136
|
+
device.name = components.first
|
137
|
+
device.udid = components.last
|
138
|
+
devices << device
|
139
|
+
end
|
140
|
+
|
141
|
+
agent.manage_devices_for_profile(profile) do |on, off|
|
142
|
+
on.delete_if {|active| devices.any? {|inactive| inactive.udid == active.udid }}
|
87
143
|
end
|
144
|
+
|
145
|
+
say_ok "Successfully removed devices from #{args.first}."
|
88
146
|
end
|
89
147
|
end
|
148
|
+
|
149
|
+
alias_command :'profiles:devices:remove', :'profiles:manage:devices:remove'
|
@@ -24,17 +24,14 @@ module Cupertino
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def team
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
teams.each do |team|
|
32
|
-
# we can't use team.label as this only returns the last label
|
33
|
-
# Apple use two labels with the same for="", we want the first
|
34
|
-
formatted_teams[team.value] = page.search("label[for=\"#{team.dom_id}\"]").first.text.strip
|
27
|
+
teams_by_name = {}
|
28
|
+
page.form_with(:name => 'saveTeamSelection').radiobuttons.each do |radio|
|
29
|
+
name = page.search("label[for=\"#{radio.dom_id}\"]").first.text.strip
|
30
|
+
teams_by_name[name] = radio.value
|
35
31
|
end
|
36
|
-
|
37
|
-
|
32
|
+
|
33
|
+
name = choose "Select a team:", *teams_by_name.keys
|
34
|
+
@team ||= teams_by_name[name]
|
38
35
|
end
|
39
36
|
end
|
40
37
|
end
|