Class: RPlatform::Rails::APISecretStatusCheck

Inherits:
StatusCheck
  • Object
show all
Defined in:
lib/rplatform_rails/status_manager.rb

Instance Method Summary collapse

Methods inherited from StatusCheck

#message, #valid?

Constructor Details

#initialize(controller) ⇒ APISecretStatusCheck

Returns a new instance of APISecretStatusCheck.



254
255
256
257
258
259
260
261
262
263
# File 'lib/rplatform_rails/status_manager.rb', line 254

def initialize(controller)
  @controller = controller
  @valid = false
  begin
    if @controller.facebook_api_secret.size > 0
      @valid = true
    end
  rescue
  end
end

Instance Method Details

#invalid_messageObject



273
274
275
276
277
278
279
280
# File 'lib/rplatform_rails/status_manager.rb', line 273

def invalid_message
  begin
    FACEBOOK[:test]
    return "you need to put your API <strong>secret</strong> in facebook.yml"
  rescue
    return "you need to define s<strong>facebook_api_secret</strong> in your controller"
  end
end

#titleObject



265
266
267
# File 'lib/rplatform_rails/status_manager.rb', line 265

def title
  "facebook_api_secret"
end

#valid_messageObject



269
270
271
# File 'lib/rplatform_rails/status_manager.rb', line 269

def valid_message
  "XXXXXXXXXXXXXXXXXX#{@controller.facebook_api_secret[-4,4]}"
end