lib/status_cat/checkers/profilesio.rb in status_cat-0.1.1 vs lib/status_cat/checkers/profilesio.rb in status_cat-5.0.0
- old
+ new
@@ -1,9 +1,12 @@
module StatusCat
module Checkers
class Profilesio < Base
+
+ cattr_accessor :api_key
+
def initialize
- @value = ENV['PROFILESIO_KEY']
+ @value = api_key
@status = fail_on_exception do
response = ::HTTParty.get('https://profiles.io/record/register')
response.code == 200 ? nil : 'fail'
end
end