From 4241d44de87d8f04f593f683e913980bc746b3d6 Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Wed, 9 Nov 2016 18:06:38 -0800 Subject: Add support for checking YAML validity using Travis CI --- Rakefile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Rakefile (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..49c90d5e --- /dev/null +++ b/Rakefile @@ -0,0 +1,5 @@ +task default: %w[test] + +task :test do + ruby "tests/yaml.rb" +end -- cgit v1.2.3 From 58ffb4057fcd67e5c0ba33f76344cc8ad927c72b Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Wed, 9 Nov 2016 20:24:10 -0800 Subject: Add UTF-8 check test --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 49c90d5e..b41beab5 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,7 @@ task default: %w[test] task :test do - ruby "tests/yaml.rb" + Dir["./tests/*.rb"].each do |test_file| + ruby test_file + end end -- cgit v1.2.3 From 70d6977ccc07b667da0ed165b7706afbb5190816 Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Wed, 9 Nov 2016 20:57:13 -0800 Subject: Use charlock_holmes to do encoding detection. In my tests it has properly identified incorrect encodings that used to be present on older commits. This will help ensure this won't happen again, giving people instant feedback and allowing all pull requests to be checked --- Rakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index b41beab5..0193d816 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,10 @@ task default: %w[test] task :test do Dir["./tests/*.rb"].each do |test_file| - ruby test_file + begin + ruby test_file + rescue + puts "FAILED #{test_file}!" + end end end -- cgit v1.2.3