okcomputer 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ module OKComputer
2
2
  class SizeThresholdCheck < Check
3
3
  attr_accessor :size_proc
4
4
  attr_accessor :threshold
5
+ attr_accessor :name
5
6
 
6
7
  # Public: Initialize a check for a backed-up Resque queue
7
8
  #
@@ -3,7 +3,7 @@ module OKComputer
3
3
  CALL_DEPRECATION_MESSAGE = "Deprecation warning: Please define #check rather than defining #call"
4
4
 
5
5
  # to be set by Registry upon registration
6
- attr_accessor :name
6
+ attr_accessor :registrant_name
7
7
  # nil by default, only set to true if the check deems itself failed
8
8
  attr_accessor :failure_occurred
9
9
  # nil by default, set by #check to control the output
@@ -34,7 +34,7 @@ module OKComputer
34
34
  #
35
35
  # Returns a String
36
36
  def to_text
37
- "#{name}: #{message}"
37
+ "#{registrant_name}: #{message}"
38
38
  end
39
39
 
40
40
  # Public: The JSON output of performing the check
@@ -43,7 +43,7 @@ module OKComputer
43
43
  def to_json(*args)
44
44
  # NOTE swallowing the arguments that Rails passes by default since we don't care. This may prove to be a bad idea
45
45
  # Rails passes stuff like this: {:prefixes=>["ok_computer", "application"], :template=>"show", :layout=>#<Proc>}]
46
- {name => message}.to_json
46
+ {registrant_name => message}.to_json
47
47
  end
48
48
 
49
49
  # Public: Whether the check passed
@@ -27,7 +27,7 @@ module OKComputer
27
27
  # check_name - The name of the check to retrieve
28
28
  # check_object - Instance of Checker to register
29
29
  def self.register(check_name, check_object)
30
- check_object.name = check_name
30
+ check_object.registrant_name = check_name
31
31
  registry[check_name] = check_object
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module OKComputer
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okcomputer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: 2366679843974261042
122
+ hash: -2468765522552568080
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  none: false
125
125
  requirements:
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  segments:
130
130
  - 0
131
- hash: 2366679843974261042
131
+ hash: -2468765522552568080
132
132
  requirements: []
133
133
  rubyforge_project:
134
134
  rubygems_version: 1.8.24