7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/xcknife/xcscheme_analyzer.rb', line 7
def (xscheme_data)
ret = {}
xml_root = REXML::Document.new(xscheme_data).root
action = xml_root.elements["//TestAction"]
return ret if action.nil?
if action.attributes['shouldUseLaunchSchemeArgsEnv'] == "YES"
action = xml_root.elements["//LaunchAction"]
end
return ret if action.nil?
env_elements = action.elements[".//EnvironmentVariables"]
return ret if env_elements.nil?
env_elements.elements.each do |e|
attrs = e.attributes
if attrs["isEnabled"] == "YES"
ret[attrs["key"]] = attrs["value"]
end
end
ret
end
|