nagiosplugin 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -4,7 +4,7 @@ A simple framework for writing [Nagios](http://www.nagios.org/) Plugins.
4
4
 
5
5
  ## Installation
6
6
 
7
- `gem install nagiosplugin`
7
+ gem install nagiosplugin
8
8
 
9
9
  ## Usage
10
10
 
@@ -14,7 +14,7 @@ Create your executable file (which will be called by nagios), `require
14
14
  Then define a check method in your class which figures out the status
15
15
  for what you want to check and calls the corresponding status method
16
16
  (`ok`, `warning`, `critical` or `unknown`) to display a status message
17
- and exit imediately.
17
+ and exit immediately.
18
18
 
19
19
  Here's a simple example plugin named `check_u2d`:
20
20
 
@@ -46,6 +46,11 @@ module NagiosPlugin
46
46
  end
47
47
  end
48
48
 
49
+ # Overwrite this check method and call a status method within!
50
+ def check
51
+ unknown 'please overwrite the method `check` in your class'
52
+ end
53
+
49
54
  # Run check and return result in a nagios-compatible format.
50
55
  #
51
56
  # It will...
@@ -1,3 +1,3 @@
1
1
  module NagiosPlugin
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -23,6 +23,11 @@ describe NagiosPlugin::Plugin do
23
23
  @plugin.run
24
24
  end
25
25
 
26
+ it 'should output an appropriate message when check was not overwritten' do
27
+ @plugin.should_receive(:puts).with(/please overwrite the method `check` in your class/i)
28
+ @plugin.run
29
+ end
30
+
26
31
  context 'when an unknown exception was raised' do
27
32
  before do
28
33
  StandardError.any_instance.stub(:backtrace).and_return(%w[foo bar baz])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagiosplugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Bj\xC3\xB6rn Albers"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-29 00:00:00 Z
18
+ date: 2012-03-30 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :development
@@ -158,7 +158,7 @@ rubyforge_project:
158
158
  rubygems_version: 1.8.11
159
159
  signing_key:
160
160
  specification_version: 3
161
- summary: nagiosplugin-1.0.0
161
+ summary: nagiosplugin-1.0.1
162
162
  test_files:
163
163
  - features/plugin_output.feature
164
164
  - features/steps/dev_steps.rb