class XCTasks::TestTask::Configuration
Constants
- HELPERS
- SETTINGS
Public Class Methods
new()
click to toggle source
# File lib/xctasks/test_task.rb, line 118 def initialize @sdk = :iphonesimulator @schemes_dir = nil @xctool_path = '/usr/local/bin/xctool' @xcodebuild_path = '/usr/bin/xcodebuild' @runner = :xcodebuild @settings = {} @platform = 'iOS Simulator' @destinations = [] @actions = %w{clean build test} @env = {} @redirect_stderr = false end
Public Instance Methods
destination(specifier = {}) { |destination| ... }
click to toggle source
# File lib/xctasks/test_task.rb, line 151 def destination(specifier = {}) if specifier.kind_of?(String) raise ArgumentError, "Cannot configure a destination via a block when a complete String specifier is provided" if block_given? @destinations << specifier.shellescape elsif specifier.kind_of?(Hash) destination = Destination.new(specifier) yield destination if block_given? @destinations << destination elsif specifier.kind_of?(Destination) @destinations << specifier else raise ArgumentError, "Cannot configure a destination with a #{specifier}" end end
dup()
click to toggle source
Deep copy any nested structures
Calls superclass method
# File lib/xctasks/test_task.rb, line 183 def dup copy = super copy.settings = settings.dup copy.destinations = destinations.dup return copy end
redirect_stderr=(redirect_stderr)
click to toggle source
# File lib/xctasks/test_task.rb, line 143 def redirect_stderr=(redirect_stderr) if redirect_stderr == true @redirect_stderr = '/dev/null' else @redirect_stderr = redirect_stderr end end
runner=(runner)
click to toggle source
# File lib/xctasks/test_task.rb, line 132 def runner=(runner) runner_bin = runner.to_s.split(' ')[0] raise ConfigurationError, "Must be :xcodebuild, :xctool or :xcpretty" unless %w{xctool xcodebuild xcpretty}.include?(runner_bin) @runner = runner end
sdk=(sdk)
click to toggle source
# File lib/xctasks/test_task.rb, line 138 def sdk=(sdk) raise ArgumentError, "Can only assign sdk from a String or Symbol" unless sdk.kind_of?(String) || sdk.kind_of?(Symbol) @sdk = sdk.to_sym end
validate!()
click to toggle source
# File lib/xctasks/test_task.rb, line 166 def validate! raise ConfigurationError, "Cannot specify iOS versions with an SDK of :macosx" if sdk == :macosx && ios_versions end
xcodebuild?()
click to toggle source
# File lib/xctasks/test_task.rb, line 174 def xcodebuild? runner =~ /^xcodebuild/ end
xcpretty?()
click to toggle source
# File lib/xctasks/test_task.rb, line 178 def xcpretty? runner =~ /^xcpretty/ end
xctool?()
click to toggle source
# File lib/xctasks/test_task.rb, line 170 def xctool? runner =~ /^xctool/ end