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 +4 -4
- data/lib/data_collector/rules_ng.rb +1 -4
- data/lib/data_collector/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 916e6d2ae77fc490169dc68bb13e84592fbe218fd3d1b4252f88136c9a00d3df
|
4
|
+
data.tar.gz: e935788b211b613d989f6342d15b34103486fadb5ee01322c769eb9f8ed59b68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|