File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
lib/github-pages-health-check
spec/github_pages_health_check Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -245,13 +245,17 @@ def cname_to_github_user_domain?
245245
246246 # Check if the CNAME points to a Domain that points to pages
247247 # e.g. CNAME -> Domain -> Pages
248+ # rubocop:disable Metrics/AbcSize
248249 def cname_to_domain_to_pages?
250+ return false unless dns?
251+
249252 a_record_to_pages = dns . select { |d | d . type == Dnsruby ::Types ::A && d . name . to_s == host } . first
250253
251254 return false unless a_record_to_pages && cname? && !cname_to_pages_dot_github_dot_com? && @www_cname
252255
253256 CURRENT_IP_ADDRESSES . include? ( a_record_to_pages . address . to_s . downcase )
254257 end
258+ # rubocop:enable Metrics/AbcSize
255259
256260 # Is the given domain a CNAME to pages.github.(io|com)
257261 # instead of being CNAME'd to the user's subdomain?
Original file line number Diff line number Diff line change 22
33module GitHubPages
44 module HealthCheck
5- VERSION = "1.18.4 "
5+ VERSION = "1.18.5 "
66 end
77end
Original file line number Diff line number Diff line change 671671 end
672672 end
673673
674- context "Protocol redirections" do
674+ context "Protocol redirections" , :retry => 3 , :retry_wait => 1 do
675675 before do
676676 @out = [ ]
677677
@@ -724,7 +724,7 @@ def stop
724724 @servers . each ( &:stop )
725725 end
726726
727- it "it does not follow anything other than http/https by default" , :retry => 3 do
727+ it "it does not follow anything other than http/https by default" do
728728 Typhoeus . get (
729729 "http://localhost:#{ @servers [ 1 ] . port } " ,
730730 GitHubPages ::HealthCheck . typhoeus_options
@@ -733,7 +733,7 @@ def stop
733733 expect ( @out ) . to_not include ( "HIT #{ @servers [ 0 ] . port } " )
734734 end
735735
736- it "it follows ftp if requested (negative test)" , :retry => 3 do
736+ it "it follows ftp if requested (negative test)" do
737737 Typhoeus . get (
738738 "http://localhost:#{ @servers [ 1 ] . port } " ,
739739 GitHubPages ::HealthCheck . typhoeus_options . merge ( :redir_protocols => %i[ http https ftp ] )
You can’t perform that action at this time.
0 commit comments