lib/mastodon_healthchecker.rb in mastodon_healthchecker-0.1.0.pre.2 vs lib/mastodon_healthchecker.rb in mastodon_healthchecker-0.1.0.pre.3

- old
+ new

@@ -5,11 +5,11 @@ module MastodonHealthchecker Result = Struct.new('Result', :exists_record, :up, :info) def self.perform(host) records = DNSRecords.new(host) - info_v4 = InstanceInfo.fetch(host, records.v4_addresses) if records.v4_addresses.any? - info_v6 = InstanceInfo.fetch(host, records.v6_addresses) if records.v6_addresses.any? + info_v4 = InstanceInfo.fetch(host, records.v4_addresses) + info_v6 = InstanceInfo.fetch(host, records.v6_addresses) Result.new( { v4: records.v4_addresses.any?, v6: records.v6_addresses.any? }, { v4: !info_v4.nil?, v6: !info_v6.nil? }, info_v4 || info_v6 || nil