riemann-babbler 0.9.0 → 0.9.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/lib/riemann/babbler/monkey_patches.rb +23 -0
- data/lib/riemann/babbler/plugin.rb +6 -5
- data/lib/riemann/version.rb +1 -1
- metadata +4 -3
@@ -0,0 +1,23 @@
|
|
1
|
+
module Beefcake
|
2
|
+
class Buffer
|
3
|
+
|
4
|
+
def initialize(buf="")
|
5
|
+
if buf.respond_to?(:force_encoding)
|
6
|
+
self.buf = buf.force_encoding("BINARY")
|
7
|
+
else
|
8
|
+
self.buf = buf
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def append_string(s)
|
13
|
+
append_uint64(s.length)
|
14
|
+
if s.respond_to?(:force_encoding)
|
15
|
+
self << s.force_encoding("BINARY")
|
16
|
+
else
|
17
|
+
self << s
|
18
|
+
end
|
19
|
+
end
|
20
|
+
alias :append_bytes :append_string
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -1,6 +1,12 @@
|
|
1
1
|
#encoding: utf-8
|
2
2
|
|
3
3
|
require File.expand_path('../plugin_helpers', __FILE__)
|
4
|
+
require 'riemann/client'
|
5
|
+
require 'open3'
|
6
|
+
require 'timeout'
|
7
|
+
require 'rest_client'
|
8
|
+
require File.expand_path('../monkey_patches', __FILE__)
|
9
|
+
|
4
10
|
|
5
11
|
# Базовое описание плагина
|
6
12
|
module Riemann
|
@@ -14,11 +20,6 @@ module Riemann
|
|
14
20
|
registered_plugins << klass
|
15
21
|
end
|
16
22
|
|
17
|
-
require 'riemann/client'
|
18
|
-
require 'open3'
|
19
|
-
require 'timeout'
|
20
|
-
require 'rest_client'
|
21
|
-
|
22
23
|
attr_reader :logger
|
23
24
|
attr_reader :riemann
|
24
25
|
alias :r :riemann
|
data/lib/riemann/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riemann-babbler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
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: 2013-05-
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: riemann-client
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- bin/riemann-babbler
|
156
156
|
- config.yml
|
157
157
|
- lib/deep_merge.rb
|
158
|
+
- lib/riemann/babbler/monkey_patches.rb
|
158
159
|
- lib/riemann/babbler/plugin.rb
|
159
160
|
- lib/riemann/babbler/plugin_helpers.rb
|
160
161
|
- lib/riemann/babbler/plugins/cpu.rb
|
@@ -181,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
182
|
version: '0'
|
182
183
|
segments:
|
183
184
|
- 0
|
184
|
-
hash:
|
185
|
+
hash: 3251853057915452566
|
185
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
187
|
none: false
|
187
188
|
requirements:
|