data_collector 0.7.0 → 0.8.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: 6c364ef9791c9ac026f6c6d0e0b228d338a7753f597708485d6e66e01e07bb29
4
- data.tar.gz: fa7bfdeffc86728354607f7a58ab0d2fce5b64603506457d4f89acb5ca1107be
3
+ metadata.gz: 916e6d2ae77fc490169dc68bb13e84592fbe218fd3d1b4252f88136c9a00d3df
4
+ data.tar.gz: e935788b211b613d989f6342d15b34103486fadb5ee01322c769eb9f8ed59b68
5
5
  SHA512:
6
- metadata.gz: '071387ac380b1ec2498b233ab4e8923a414d2354779a9eb62014a5edec34fd75d0122e7d0c448f2ba4a5d43c774abc41081acd2be565b7b61af5c75dde07f7b2'
7
- data.tar.gz: a962c642f586e08b1bf2699a8a1d042edc2a9ccbb091ae774fb12e41c4197d18c6e08fa7a7ff1fbe1db433e64391eaa93c556ec2d874fc1efdc70cfb14d677d5
6
+ metadata.gz: 0303551a972a9d4bf6bb89f9a2896ea293429d2b00721fbdac2d048b35625c0037ad2db56cf9a7979c21bf0eaca51842d3ad89623e604ab598a678513a9f9c49
7
+ data.tar.gz: fbb017e1ae87a2d23e66e0ac335e7ad3f8eee3445468be48f921f6f0d504c4525f47d83500845430d64378f85f4ccb16f71319d202ee9cd262422b194f4842f9
@@ -42,9 +42,6 @@ module DataCollector
42
42
  data = rule_payload.select { |s| s.is_a?(String) }
43
43
  rule_payload = rule_payload.delete_if { |s| s.is_a?(String) }
44
44
  rule_payload = "@" if rule_payload.empty?
45
- # if rule_payload.size == 1
46
- # rule_payload = rule_payload.first
47
- # end
48
45
  end
49
46
  when /json_path\:/
50
47
  data = json_path_filter(rule_filter.gsub(/^json_path\:/), input_data)
@@ -91,7 +88,7 @@ module DataCollector
91
88
 
92
89
  output_data.compact! if output_data.is_a?(Array)
93
90
  output_data.flatten! if output_data.is_a?(Array)# || output_data.is_a?(Hash)
94
- output_data = output_data.first if output_data.is_a?(Array) && output_data.size == 1 && output_data.first.is_a?(Array)
91
+ output_data = output_data.first if output_data.is_a?(Array) && output_data.size == 1 && (output_data.first.is_a?(Array) || output_data.first.is_a?(Hash))
95
92
 
96
93
  output_data
97
94
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.7.0"
3
+ VERSION = "0.8.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.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Celik