
- Re-factor - Remove code for notifications - Remove addons - Remove travis-core gem. - Ignore logs directory only - Move core tests to spec/lib
28 lines
489 B
Ruby
28 lines
489 B
Ruby
class Build
|
|
class Config
|
|
class OS
|
|
OS_LANGUAGE_MAP = {
|
|
'objective-c' => 'osx',
|
|
}
|
|
DEFAULT_OS = 'linux'
|
|
|
|
attr_reader :config
|
|
|
|
def initialize(config, _)
|
|
@config = config
|
|
end
|
|
|
|
def run
|
|
return config if config.key?(:os) || config.key?('os')
|
|
config.merge(os: os_for_language)
|
|
end
|
|
|
|
private
|
|
|
|
def os_for_language
|
|
OS_LANGUAGE_MAP.fetch(config[:language], DEFAULT_OS)
|
|
end
|
|
end
|
|
end
|
|
end
|