Check YAML files on Travis

This commit is contained in:
Aaron Hill
2014-04-16 16:09:03 -04:00
parent 083fdbbe79
commit fd84ca7008
2 changed files with 19 additions and 0 deletions

5
.travis.yml Normal file
View File

@@ -0,0 +1,5 @@
language: ruby
rvm:
- 2.0.0
script: ruby support/check_yaml.rb

14
support/check_yaml.rb Normal file
View File

@@ -0,0 +1,14 @@
require 'yaml'
path = File.expand_path('../members', File.dirname(__FILE__))
Dir.glob(path + '/*.yaml') do |f|
begin
File.open(f) do |data|
YAML.load(data)
end
rescue Exception => e
puts "Error in file #{f}:"
puts e.message
end
end