From 5e8b82e3b25c3f7d72228e5d560028f3471b1eba Mon Sep 17 00:00:00 2001 From: Gianfranco Palumbo Date: Sun, 3 Dec 2017 18:47:01 +0200 Subject: [PATCH] fix(build): skip udemy links validation if they return 403 http status --- validate.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/validate.rb b/validate.rb index 23a4bbeb..24ff3edf 100644 --- a/validate.rb +++ b/validate.rb @@ -7,7 +7,13 @@ def check_link(uri) HTTParty.head(uri, :verify => false).code.to_i.tap do |status| - raise "Request had status #{status}" if (400..422).include?(status) + if (400..422).include?(status) + if status != 403 && !uri.exclude?('udemy.com') + raise "Request had status #{status}" + else + putc('S') + end + end end end