smarta 0.2 → 0.3

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.
Files changed (3) hide show
  1. data/lib/smarta/version.rb +1 -1
  2. data/lib/smarta.rb +3 -7
  3. metadata +2 -2
@@ -1,3 +1,3 @@
1
1
  module Smarta
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
data/lib/smarta.rb CHANGED
@@ -35,19 +35,15 @@ class Sensor
35
35
  end
36
36
 
37
37
  def info(title, msg)
38
- emit("INFO", title, msg)
38
+ @sock.send("sensor/p 1 ##{@name}\n#{title}\n\n#{msg}", 0)
39
39
  end
40
40
 
41
41
  def warn(title, msg)
42
- emit("WARNING", title, msg)
42
+ @sock.send("sensor/p 2 ##{@name} WARNING\n#{title}\n\n#{msg}", 0)
43
43
  end
44
44
 
45
45
  def crit(title, msg)
46
- emit("CRITICAL", title, msg)
47
- end
48
-
49
- def emit(severity, title, msg)
50
- @sock.send("sensor/p #{@name}\n#{severity} - #{title}\n\n#{msg}", 0)
46
+ @sock.send("sensor/p 3 ##{@name} CRITICAL\n#{title}\n\n#{msg}", 0)
51
47
  end
52
48
 
53
49
  def inspect
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smarta
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-05 00:00:00.000000000Z
12
+ date: 2011-12-12 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Ruby smarta sensor
15
15
  email: ery.lee@gmail.com