Module: OKComputer
- Defined in:
- lib/okcomputer/registry.rb,
lib/okcomputer.rb,
lib/okcomputer/check.rb,
lib/okcomputer/engine.rb,
lib/okcomputer/version.rb,
lib/okcomputer/configuration.rb,
lib/okcomputer/check_collection.rb,
lib/okcomputer/built_in_checks/default_check.rb,
lib/okcomputer/built_in_checks/mongoid_check.rb,
lib/okcomputer/built_in_checks/resque_down_check.rb,
lib/okcomputer/built_in_checks/active_record_check.rb,
lib/okcomputer/built_in_checks/size_threshold_check.rb,
lib/okcomputer/built_in_checks/resque_backed_up_check.rb,
lib/okcomputer/built_in_checks/delayed_job_backed_up_check.rb
Overview
Private: Storage of the checks which have been registered with OKComputer.
No one is expected to interact directly with this class, but rather through the outer OKComputer interface.
Defined Under Namespace
Classes: ActiveRecordCheck, Check, CheckCollection, DefaultCheck, DelayedJobBackedUpCheck, Engine, MongoidCheck, Registry, ResqueBackedUpCheck, ResqueDownCheck, SizeThresholdCheck
Constant Summary collapse
- VERSION =
"0.3.7"
Class Method Summary collapse
-
.authenticate(username_try, password_try) ⇒ Object
Public: Attempt to authenticate against required username and password.
-
.require_authentication(username, password) ⇒ Object
Public: Configure HTTP Basic authentication.
-
.requires_authentication? ⇒ Boolean
Public: Whether OKComputer is configured to require authentication.
Class Method Details
.authenticate(username_try, password_try) ⇒ Object
Public: Attempt to authenticate against required username and password
username - Username to authenticate with password - Password to authenticate with
Returns a Boolean
17 18 19 20 21 |
# File 'lib/okcomputer/configuration.rb', line 17 def self.authenticate(username_try, password_try) return true unless requires_authentication? username == username_try && password == password_try end |
.require_authentication(username, password) ⇒ Object
Public: Configure HTTP Basic authentication
username - Username required to view checks password - Password required to view checks
6 7 8 9 |
# File 'lib/okcomputer/configuration.rb', line 6 def self.require_authentication(username, password) self.username = username self.password = password end |
.requires_authentication? ⇒ Boolean
Public: Whether OKComputer is configured to require authentication
Returns a Boolean
26 27 28 |
# File 'lib/okcomputer/configuration.rb', line 26 def self.requires_authentication? username && password end |