data_collector 0.43.0 → 0.44.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2c8102350695f8cfc598856372d9efd4bfa8b9cf4c3f84110b6dfbfdff3ee62
4
- data.tar.gz: 042bf4690116ba07f34459068e3afbc7e63f483c7e0518ecb1581833cb85b3ae
3
+ metadata.gz: c289298a8de94ccad3a239ed6d05bf33db68c36072015f8bdb2d2a857809bd0f
4
+ data.tar.gz: 1f30741dd80b5cabbf9062869260d319c9db647facec1de41fa8921640967600
5
5
  SHA512:
6
- metadata.gz: ff4a4c20f156dadbd665ff330f9c9f057a20391b2fc4fbab45afe59bb3071fd69aaaf6c67521b37a3d5d61b581761fcb21432be405d402a3571c32e47ce86f1b
7
- data.tar.gz: a52836f02b727c1ed679520492921bfed09892d79155bf56fa2b823792a04512cfae267d15c22210acc32a460a8f2ed2a350e6ece388e860a41b0fbb473e778d
6
+ metadata.gz: ac4f4d7d8906f11ea0840cf416058a665ac2139fd6d3cd0057986624c702e1774fa752c6984ae08c0bc9754c0bfdf9c8fe553635d96ec14cbcc67641e4f95792
7
+ data.tar.gz: af893f7320eaa88ff7026f3a2a04e74cface4cd1858db450d6204baa73751b9d6e6c6b743f979319f5e277a7b213ec0ef2989180ae99d1c54921ac07bf2d1817
@@ -33,31 +33,32 @@ module BunnyBurrow
33
33
  :connection_name
34
34
  )
35
35
 
36
- def initialize
37
- @connection_name = "#{Process.pid}-#{SecureRandom.uuid}"
38
- end
39
- # private
40
- #
41
- # def connection
42
- # Connection.instance.connection_name = @connection_name
43
- # Connection.instance.verify_peer = @verify_peer
44
- # Connection.instance.rabbitmq_url = @rabbitmq_url
45
- #
46
- # unless @connection
47
- # @connection = Connection.instance.connection
48
- # @connection.start unless @connection.open?
49
- # end
50
- #
51
- # @connection
52
- # end
53
- #
54
- # def channel
55
- # Connection.instance.connection_name = @connection_name
56
- # Connection.instance.verify_peer = @verify_peer
57
- # Connection.instance.rabbitmq_url = @rabbitmq_url
58
- #
59
- # @channel = Connection.instance.channel
36
+ # def initialize
37
+ # super
38
+ # @connection_name = "#{Process.pid}-#{SecureRandom.uuid}"
60
39
  # end
40
+ # private
41
+ #
42
+ # def connection
43
+ # Connection.instance.connection_name = @connection_name
44
+ # Connection.instance.verify_peer = @verify_peer
45
+ # Connection.instance.rabbitmq_url = @rabbitmq_url
46
+ #
47
+ # unless @connection
48
+ # @connection = Connection.instance.connection
49
+ # @connection.start unless @connection.open?
50
+ # end
51
+ #
52
+ # @connection
53
+ # end
54
+ #
55
+ # def channel
56
+ # Connection.instance.connection_name = @connection_name
57
+ # Connection.instance.verify_peer = @verify_peer
58
+ # Connection.instance.rabbitmq_url = @rabbitmq_url
59
+ #
60
+ # @channel = Connection.instance.channel
61
+ # end
61
62
  end
62
63
  end
63
64
 
@@ -49,7 +49,8 @@ module DataCollector
49
49
  if v.is_a?(Array) # merge with array
50
50
  @data[k] = [@data[k]] + v
51
51
  else
52
- @data[k] = [@data[k], v]
52
+ #@data[k] = [@data[k], v]
53
+ @data[k] = v
53
54
  end
54
55
  end
55
56
  else
@@ -22,8 +22,16 @@ module DataCollector
22
22
 
23
23
  case rule
24
24
  when Array
25
+ odata = {}
25
26
  rule.each do |sub_rule|
26
- apply_rule(tag, sub_rule, input_data, output_data, options)
27
+ d=apply_rule(tag, sub_rule, input_data, output_data, options)
28
+ next if d.nil?
29
+ odata.merge!(d) {|k,v, n|
30
+ [v,n].flatten
31
+ }
32
+ end
33
+ odata.each do |k,v|
34
+ output_data.data[k] = v
27
35
  end
28
36
  return output_data
29
37
  when String
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.43.0"
3
+ VERSION = "0.44.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.0
4
+ version: 0.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Celik