Module: Travis::Yaml::Nodes::LanguageSpecific

Included in:
DeployConditions, Matrix::Matcher, Root
Defined in:
lib/travis/yaml/nodes/language_specific.rb

Constant Summary collapse

LANGUAGE_SPECIFIC =
{
  bundler_args:     %w[ruby],
  compiler:         %w[c cpp],
  lein:             %w[clojure],
  otp_release:      %w[erlang],
  gobuild_args:     %w[go],
  go:               %w[go],
  jdk:              %w[clojure groovy java ruby scala android],
  ghc:              %w[haskell],
  node_js:          %w[node_js],
  ruby:             %w[ruby objective-c],
  xcode_sdk:        %w[objective-c],
  xcode_scheme:     %w[objective-c],
  xcode_project:    %w[objective-c],
  xcode_workspace:  %w[objective-c],
  xctool_args:      %w[objective-c],
  perl:             %w[perl],
  php:              %w[php],
  python:           %w[python],
  virtualenv:       %w[python],
  gemfile:          %w[ruby objective-c],
  composer_args:    %w[php],
  npm_args:         %w[node_js],
  android:          %w[android]
}

Instance Method Summary collapse

Instance Method Details

#verify_language(language) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/travis/yaml/nodes/language_specific.rb', line 30

def verify_language(language)
  LANGUAGE_SPECIFIC.each do |key, languages|
    next unless include? key and not languages.include? language.value
    mapping.delete mapped_key(key)
    warning "specified %p, but setting is not relevant for %p", key.to_s, language
  end

  mapping.each_value do |value|
    value.verify_language(language) if value.respond_to? :verify_language
  end

  verify_errors
end