./lib/cupertino/provisioning_portal/commands/profiles.rb in cupertino-1.0.0 vs ./lib/cupertino/provisioning_portal/commands/profiles.rb in cupertino-1.0.1
- old
+ new
@@ -127,19 +127,19 @@
c.action do |args, options|
profiles = try{agent.list_profiles(:development) + agent.list_profiles(:distribution)}
profile = profiles.find{|p| p.name == args.first} || choose("Select a profile:", *profiles)
- names = args[1..-1].select{|arg| /\=/ === arg}.collect{|arg| arg.sub /\=.*/, ''}
+ names = args[1..-1].select{|arg| /\=/ === arg}.collect{|arg| arg.sub(/\=.*/, '')}
devices = []
agent.manage_devices_for_profile(profile) do |on, off|
names.each_with_index do |name, idx|
next if idx == 0 and name == profile.name
device = (on + off).detect{|d| d.name === name}
- say_warning "No device named #{name} was found." unless device
+ say_warning "No device named #{name} was found." and next unless device
devices << Device.new(name, device.udid, "Y", device.device_id)
end
on + devices
end
@@ -164,10 +164,10 @@
profiles = try{agent.list_profiles(:development) + agent.list_profiles(:distribution)}
profile = profiles.find{|p| p.name == args.first} || choose("Select a profile:", *profiles)
say_warning "No provisioning profiles named #{args.first} were found." and abort unless profile
- names = args.collect{|arg| arg.gsub /\=.*/, ''}
+ names = args.collect{|arg| arg.gsub(/\=.*/, '')}
devices = []
agent.manage_devices_for_profile(profile) do |on, off|
devices = on.delete_if{|device| names.include?(device.name)}
end