From a7dd9c405bc102245ff0f48ec54127ffd6f268fa Mon Sep 17 00:00:00 2001 From: Watson Date: Mon, 18 Aug 2014 12:26:12 +0900 Subject: [PATCH] [iOS8] fix a bug which invalid template path would be generated If specify template with `rake profile template="XXXX"', it will generate invalid template path which contains unnecessary `"' as following. XrayTemplatePath "/Applications/Xcode6-Beta5.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate --- lib/motion/project/xcode_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index f3c43c64..14cc53d2 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -301,7 +301,7 @@ EOS if File.exist?(template) template_path = template elsif !builtin_templates.grep(/#{template}/i).empty? - list = `/usr/bin/xcrun instruments -s 2>&1`.strip.split("\n").map { |line| line.sub(/^\s+"/, '').sub(/",*$/, '') } + list = `/usr/bin/xcrun instruments -s 2>&1`.strip.split("\n").map { |line| line.sub(/^\s*"/, '').sub(/",*$/, '') } template = template.downcase template_path = list.find { |path| File.basename(path, File.extname(path)).downcase == template } else