./lib/cupertino/provisioning_portal/commands/profiles.rb in cupertino-0.7.1 vs ./lib/cupertino/provisioning_portal/commands/profiles.rb in cupertino-0.8.0
- old
+ new
@@ -45,14 +45,14 @@
agent.manage_devices_for_profile(profile) do |on, off|
lines = ["# Comment / Uncomment Devices to Turn Off / On for Provisioning Profile"]
lines += on.collect{|device| "#{device}"}
lines += off.collect{|device| "# #{device}"}
- result = ask_editor lines.join("\n")
+ (result = ask_editor lines.join("\n")) or abort("EDITOR undefined. Try run 'export EDITOR=vi'")
devices = []
result.split(/\n+/).each do |line|
- next if /^\#/ === line
+ next if /^#/ === line
components = line.split(/\s+/)
device = Device.new
device.udid = components.pop
device.name = components.join(" ")
devices << device