kurchatov 0.0.3b → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ef29f02b788f61624ca94e4c7aa368d61a76a66
4
- data.tar.gz: c598df398b786ff76c0209b251af9a3db42121f4
3
+ metadata.gz: c9529d7f0aced383b9210d7461e8553f9296eccb
4
+ data.tar.gz: 210db1e9cefd1422af21c1a6f2e2957ec876318c
5
5
  SHA512:
6
- metadata.gz: ff81ef7dac058be10cd27d5d76c1af555c00590c55e79462758c71ec3a66bbd47a19d54e8b8d7c93da4ae41f4c40e7518bd856632d3002ee1989bd43aa7814ce
7
- data.tar.gz: 03c4652a250d662e609cbf2d44e9e239e2415c14c5c5209220d05caa38cd27588d4f8792b9e4b34e72c4625544a9808da3b72784e7b73e13cdd13b09bbf7f213
6
+ metadata.gz: 390d9c1b07eb76049ca4e32e5d5f70042b8eb2174cc1ca5430c12d6fbd71412f9fbf3a41416512a9601b1639af8e297a52d8bccb62f963d7437571f3d0bdf870
7
+ data.tar.gz: f83ac420653e68bf2861d8ae72929a775ab193b3a931584269098f57247ce68c0e52ff1c6952f7a5bdf7b00ee9c7e82bace0ce13113bd766353b22695483b38f
data/examples/iptables.rb CHANGED
@@ -15,7 +15,7 @@ collect do
15
15
  current_rules = shell_out!('iptables-save').stdout.split("\n").map do |x|
16
16
  x[0] == '#' ? nil : delete_counters(x)
17
17
  end.compact.join("\n")
18
- saved_rules = File.read(plugin.rules_file).split("\n").map do |x|
18
+ saved_rules = File.read(plugin.rule_file).split("\n").map do |x|
19
19
  x[0] == '#' ? nil : delete_counters(x) # delete counters and comments
20
20
  end.compact.join("\n")
21
21
 
@@ -10,7 +10,7 @@ module Kurchatov
10
10
  def event(hash = {})
11
11
  normilize_event(hash)
12
12
  Log.info("Mock message for test plugin: #{hash.inspect}") if Kurchatov::Config[:test_plugin]
13
- events << hash
13
+ events << hash unless hash[:miss]
14
14
  end
15
15
 
16
16
  protected
@@ -54,7 +54,7 @@ module Kurchatov
54
54
  hash[:metric] = hash[:metric] - old_metric
55
55
  else
56
56
  @history[hash[:service]] = hash[:metric]
57
- hash[:metric] = nil
57
+ hash[:miss] = true
58
58
  end
59
59
  end
60
60
 
@@ -1,3 +1,3 @@
1
1
  module Kurchatov
2
- VERSION = "0.0.3b"
2
+ VERSION = "0.0.3"
3
3
  end
data/tests/run.sh CHANGED
@@ -21,7 +21,7 @@ test:
21
21
  EOF
22
22
 
23
23
  cat > tmp/test1.rb <<EOF
24
- interval 3
24
+ interval 10
25
25
  name "test"
26
26
 
27
27
  default[:url] = 'http://notexists'
data/tests/server.rb CHANGED
@@ -2,7 +2,7 @@ require "socket"
2
2
  require "timeout"
3
3
 
4
4
  server = TCPServer.new('127.0.0.1', 5555)
5
- Timeout::timeout(20) {
5
+ Timeout::timeout(60) {
6
6
  loop {
7
7
  client = server.accept
8
8
  line = client.gets
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kurchatov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3b
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev Dmitry
@@ -201,9 +201,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  requirements:
204
- - - '>'
204
+ - - '>='
205
205
  - !ruby/object:Gem::Version
206
- version: 1.3.1
206
+ version: '0'
207
207
  requirements: []
208
208
  rubyforge_project:
209
209
  rubygems_version: 2.0.3