make included_with_xcode? more testable
This commit is contained in:
Родитель
8b96d4f133
Коммит
ebd3b1b76a
|
@ -86,10 +86,13 @@ module MacOS
|
|||
shell_out!(XCVersion.list_simulators).stdout
|
||||
end
|
||||
|
||||
def show_sdks
|
||||
shell_out!('/usr/bin/xcodebuild -showsdks').stdout
|
||||
end
|
||||
|
||||
def included_with_xcode?
|
||||
version_matcher = /\d{1,2}\.\d{0,2}\.?\d{0,3}/
|
||||
sdks = shell_out!('/usr/bin/xcodebuild -showsdks').stdout
|
||||
included_simulator = sdks.match(/Simulator - iOS (?<version>#{version_matcher})/)
|
||||
included_simulator = show_sdks.match(/Simulator - iOS (?<version>#{version_matcher})/)
|
||||
@version.split.last.to_i == included_simulator[:version].to_i
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче