nsca 0.1.3 → 0.1.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -170,14 +170,14 @@ module NSCA
170
170
  end
171
171
 
172
172
  class <<self
173
- def create service, hostname = nil, perfdatas = nil
173
+ def new service, hostname = nil, perfdatas = nil
174
174
  cl = Class.new Base
175
175
  cl.init service, hostname, perfdatas
176
176
  cl
177
177
  end
178
178
 
179
- def new service, hostname = nil, perfdatas = nil
180
- cl = create service, hostname, perfdatas
179
+ def create service, hostname = nil, perfdatas = nil
180
+ cl = new service, hostname, perfdatas
181
181
  clname = NSCA::Helper.class_name_gen service.to_s
182
182
  self.const_set clname, cl if clname
183
183
  cl
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "nsca"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Denis Knauf"]
@@ -3,12 +3,12 @@ require 'helper'
3
3
  class TestNSCA < Test::Unit::TestCase
4
4
  class TestChecks
5
5
  extend NSCA::Checks
6
- perfdata :PD1, :pd1_in_sec, :s, 10, 20, 0, 30
7
- perfdata :PD2, :pd2_in_1, 1, 0.99, 0.98, 0, 1
8
- perfdata :PD3, :pd3_count, :c, 3, 5, 0
9
- check :T0, 'TestNSCA0', 'uxnags01-sbe.net.mobilkom.at'
10
- check :T1, 'TestNSCA1', 'uxnags01-sbe.net.mobilkom.at', [PD1, PD2]
11
- check :T2, :TestNSCA2, 'uxnags01-sbe.net.mobilkom.at', [PD1, PD2, PD3]
6
+ PD1 = perfdata :pd1_in_sec, :s, 10, 20, 0, 30
7
+ PD2 = perfdata :pd2_in_1, 1, 0.99, 0.98, 0, 1
8
+ PD3 = perfdata :pd3_count, :c, 3, 5, 0
9
+ T0 = check 'TestNSCA0', 'uxnags01-sbe.net.mobilkom.at'
10
+ T1 = check 'TestNSCA1', 'uxnags01-sbe.net.mobilkom.at', [PD1, PD2]
11
+ T2 = check :TestNSCA2, 'uxnags01-sbe.net.mobilkom.at', [PD1, PD2, PD3]
12
12
  end
13
13
 
14
14
  context 'our test server' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nsca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  version: '0'
163
163
  segments:
164
164
  - 0
165
- hash: -292513535
165
+ hash: -1034310641
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  none: false
168
168
  requirements: