mirror of
https://github.com/unitedstates/contact-congress.git
synced 2025-12-19 09:27:29 -05:00
Check YAML files on Travis
This commit is contained in:
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
language: ruby
|
||||
rvm:
|
||||
- 2.0.0
|
||||
|
||||
script: ruby support/check_yaml.rb
|
||||
14
support/check_yaml.rb
Normal file
14
support/check_yaml.rb
Normal 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
|
||||
Reference in New Issue
Block a user