diagnostics 0.0.3 → 0.0.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.
- data/Gemfile.lock +1 -1
- data/features/diagnostic_checks.feature +32 -1
- data/lib/diagnostics/check.rb +3 -1
- data/lib/diagnostics/version.rb +1 -1
- metadata +5 -5
data/Gemfile.lock
CHANGED
@@ -6,7 +6,7 @@ Feature: Diagnostic checks
|
|
6
6
|
They can also contain metadata info such as attributes,
|
7
7
|
lists, texts, and tables.
|
8
8
|
|
9
|
-
Scenario:
|
9
|
+
Scenario: Available status methods on a check
|
10
10
|
Given a file named "status_methods.rb" with:
|
11
11
|
"""
|
12
12
|
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
@@ -37,6 +37,33 @@ Feature: Diagnostic checks
|
|
37
37
|
|
38
38
|
"""
|
39
39
|
|
40
|
+
Scenario: A "passed" method that fails
|
41
|
+
Given a file named "failing_passed_method.rb" with:
|
42
|
+
"""
|
43
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
44
|
+
require 'diagnostics'
|
45
|
+
|
46
|
+
class FailingPassedMethod
|
47
|
+
include DiagnosticsCheck
|
48
|
+
|
49
|
+
def passed; false end
|
50
|
+
end
|
51
|
+
|
52
|
+
check = diagnostic_check(:FailingPassedMethod)
|
53
|
+
|
54
|
+
puts check.passed?
|
55
|
+
puts check.failed?
|
56
|
+
puts check.status.inspect
|
57
|
+
"""
|
58
|
+
When I run "ruby failing_passed_method.rb"
|
59
|
+
Then the output should contain exactly:
|
60
|
+
"""
|
61
|
+
false
|
62
|
+
true
|
63
|
+
:failed
|
64
|
+
|
65
|
+
"""
|
66
|
+
|
40
67
|
Scenario: Attributes on a check
|
41
68
|
Given a file named "attributes.rb" with:
|
42
69
|
"""
|
@@ -63,6 +90,8 @@ Feature: Diagnostic checks
|
|
63
90
|
check.data.attributes.map do |attribute|
|
64
91
|
puts "#{attribute.name}---#{attribute.value}"
|
65
92
|
end
|
93
|
+
puts
|
94
|
+
puts check.status.inspect
|
66
95
|
"""
|
67
96
|
When I run "ruby attributes.rb"
|
68
97
|
Then the output should contain exactly:
|
@@ -76,6 +105,8 @@ Feature: Diagnostic checks
|
|
76
105
|
Master---Up
|
77
106
|
Slave---Down
|
78
107
|
|
108
|
+
:none
|
109
|
+
|
79
110
|
"""
|
80
111
|
|
81
112
|
Scenario: Lists on a check
|
data/lib/diagnostics/check.rb
CHANGED
data/lib/diagnostics/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diagnostics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Ko
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-30 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -216,7 +216,7 @@ rubyforge_project: diagnostics
|
|
216
216
|
rubygems_version: 1.4.2
|
217
217
|
signing_key:
|
218
218
|
specification_version: 3
|
219
|
-
summary: diagnostics-0.0.
|
219
|
+
summary: diagnostics-0.0.4
|
220
220
|
test_files:
|
221
221
|
- features/diagnostic_checks.feature
|
222
222
|
- features/step_definitions/aruba.rb
|