desc 'Validate .travis.yml'
namespace :travis do
  task :lint do
    sh %(travis lint --exit-code) do |ok, res|
      fail("travis lint failed with exit status #{res.exitstatus}") unless ok
    end
  end
end

task spec: 'travis:lint'

desc 'Validate .travis.yml'
namespace :travis do
  task :lint do
    sh %(travis lint --no-interactive --exit-code) do |ok, res|
      fail("travis lint failed with exit status #{res.exitstatus}") unless ok
    end
  end
end

task spec: 'travis:lint'

Use non-interactive mode for travis lint.
Use non-interactive mode for travis lint.
