okcomputer 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6fed0ca2f50d8a090b2264bd27f7908d7263b68b
4
- data.tar.gz: f2ccdd2c93336ee08c8e1195be27e79679995659
3
+ metadata.gz: 30beb5a8130ac0a3b620865483fa532a6be7a592
4
+ data.tar.gz: 5bd39d33d5cd603fcc4c38b480eeb709df8d31cb
5
5
  SHA512:
6
- metadata.gz: 3989f82168e393cfbe1baaaaad2ecfe6f393ec1c85585e44a87576b485e9b08c7e149b0a8df85af8a43868c0cf05b1baa59fdd4ac3f177ab2ccd775627561a3d
7
- data.tar.gz: 8e13747aba25230218b07627f16880d37cbad822e71f07501c1178a74db1f7762b11b538395b4fc5483204916911b341b5315d40b2fb48507df6a60fce9b347e
6
+ metadata.gz: 1616e50254ed732be4081370c06b745e89f859c9b668e5e02bb5ec420c573ff20f7a38dffc2c3696a6c13dd4b71479df30b48f6e05a666c95ca1836d73f5500a
7
+ data.tar.gz: a4bef47452c4805d6ac8151e512403683f89e72dcb181fef7933c566be299ad323d848384dfe99302acbb7481fcba232777b5fb360c7f6f70550b4fc5b6d26f0
@@ -57,6 +57,13 @@ Optionally require HTTP Basic authentication to view the results of checks in an
57
57
  OkComputer.require_authentication("username", "password")
58
58
  ```
59
59
 
60
+ To allow access to specific checks without a password, optionally specify the names of the checks:
61
+
62
+ ```ruby
63
+ # config/initializers/okcomputer.rb
64
+ OkComputer.require_authentication("username", "password", except: %w(default nonsecret))
65
+ ```
66
+
60
67
  ### Changing the OkComputer Route
61
68
 
62
69
  By default, OkComputer routes are mounted at `/okcomputer`. If you'd like to use an alternate route,
@@ -0,0 +1,19 @@
1
+ module OkComputer
2
+ class ResqueFailureThresholdCheck < SizeThresholdCheck
3
+ attr_accessor :threshold
4
+
5
+ # Public: Initialize a check for a backed-up Resque queue
6
+ #
7
+ # threshold - An Integer to compare the queue's count against to consider
8
+ # it backed up
9
+ def initialize(threshold)
10
+ self.threshold = Integer(threshold)
11
+ self.name = "Resque Failed Jobs"
12
+ end
13
+
14
+ # Public: The number of jobs in the check's queue
15
+ def size
16
+ Resque::Failure.count
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module OkComputer
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
@@ -10,6 +10,7 @@ require "ok_computer/built_in_checks/active_record_check"
10
10
  require "ok_computer/built_in_checks/default_check"
11
11
  require "ok_computer/built_in_checks/mongoid_check"
12
12
  require "ok_computer/built_in_checks/resque_backed_up_check"
13
+ require "ok_computer/built_in_checks/resque_failure_threshold_check"
13
14
  require "ok_computer/built_in_checks/resque_down_check"
14
15
  require "ok_computer/built_in_checks/delayed_job_backed_up_check"
15
16
  require "ok_computer/built_in_checks/ruby_version_check"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okcomputer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
11
+ date: 2014-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -74,6 +74,7 @@ files:
74
74
  - lib/ok_computer/built_in_checks/mongoid_check.rb
75
75
  - lib/ok_computer/built_in_checks/resque_backed_up_check.rb
76
76
  - lib/ok_computer/built_in_checks/resque_down_check.rb
77
+ - lib/ok_computer/built_in_checks/resque_failure_threshold_check.rb
77
78
  - lib/ok_computer/built_in_checks/ruby_version_check.rb
78
79
  - lib/ok_computer/built_in_checks/size_threshold_check.rb
79
80
  - lib/ok_computer/check.rb