data_collector 0.30.0 → 0.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data_collector.gemspec +4 -4
- data/lib/data_collector/input/rpc.rb +15 -2
- data/lib/data_collector/output.rb +7 -4
- data/lib/data_collector/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a236c17cf807b2c641b9da834633dc9ed7a0d297b5638367726554c7f09f37b2
|
4
|
+
data.tar.gz: 95282bdbc813b58e9f15b4b4e24bb2f56ff9933ea8c209c60bbb9c368c0fd7a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cd169de59382390b9fba943bfa726d7f4c276ce4b7a18a8ab6cbbf115a040acf6c90ecc55b8367f4888962fe9829b2b952976e3911fcedfb253415939a16aac
|
7
|
+
data.tar.gz: d5b0c8f43c20b3870445dea95fc72819e5fc016aabf39e37c99b74207bdf289d84b2096a37e7e88599664015153d82dd3fbd38d524e92e5c3df5877b5fcb2538
|
data/data_collector.gemspec
CHANGED
@@ -36,18 +36,18 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
37
|
spec.require_paths = ['lib']
|
38
38
|
|
39
|
-
spec.add_runtime_dependency 'activesupport', '~>
|
39
|
+
spec.add_runtime_dependency 'activesupport', '~> 7.0'
|
40
40
|
spec.add_runtime_dependency 'http', '~> 5.1'
|
41
41
|
spec.add_runtime_dependency 'json', '~> 2.6'
|
42
|
-
spec.add_runtime_dependency 'json-ld', '~> 3.
|
42
|
+
spec.add_runtime_dependency 'json-ld', '~> 3.3'
|
43
43
|
spec.add_runtime_dependency 'jsonpath', '~> 1.1'
|
44
|
-
spec.add_runtime_dependency 'mime-types', '~> 3.
|
44
|
+
spec.add_runtime_dependency 'mime-types', '~> 3.5'
|
45
45
|
spec.add_runtime_dependency 'minitar', '= 0.9'
|
46
46
|
spec.add_runtime_dependency 'nokogiri', '~> 1.15'
|
47
47
|
spec.add_runtime_dependency 'nori', '~> 2.6'
|
48
48
|
spec.add_runtime_dependency 'iso8601', '~> 0.13'
|
49
49
|
spec.add_runtime_dependency 'listen', '~> 3.8'
|
50
|
-
spec.add_runtime_dependency 'bunny', '~> 2.
|
50
|
+
spec.add_runtime_dependency 'bunny', '~> 2.22'
|
51
51
|
spec.add_runtime_dependency 'bunny_burrow', '~> 1.5'
|
52
52
|
spec.add_runtime_dependency 'builder', '~> 3.2'
|
53
53
|
spec.add_runtime_dependency 'parse-cron', '~> 0.1'
|
@@ -14,6 +14,8 @@ module DataCollector
|
|
14
14
|
|
15
15
|
def running?
|
16
16
|
@running
|
17
|
+
rescue StandardError => e
|
18
|
+
DataCollector::Core.error(e.message)
|
17
19
|
end
|
18
20
|
|
19
21
|
def stop
|
@@ -21,10 +23,14 @@ module DataCollector
|
|
21
23
|
@listener.shutdown
|
22
24
|
@running = false
|
23
25
|
end
|
26
|
+
rescue StandardError => e
|
27
|
+
DataCollector::Core.error(e.message)
|
24
28
|
end
|
25
29
|
|
26
30
|
def pause
|
27
31
|
raise "PAUSE not implemented."
|
32
|
+
rescue StandardError => e
|
33
|
+
DataCollector::Core.error(e.message)
|
28
34
|
end
|
29
35
|
|
30
36
|
|
@@ -47,16 +53,23 @@ module DataCollector
|
|
47
53
|
else
|
48
54
|
yield block if block_given?
|
49
55
|
end
|
56
|
+
rescue StandardError => e
|
57
|
+
DataCollector::Core.error(e.message)
|
50
58
|
end
|
51
59
|
|
52
60
|
private
|
53
|
-
def create_listener
|
61
|
+
def create_listener(log = false)
|
54
62
|
@listener ||= BunnyBurrow::Server.new do |server|
|
55
63
|
parse_uri
|
56
64
|
server.rabbitmq_url = @bunny_uri.to_s
|
57
65
|
server.rabbitmq_exchange = @bunny_channel
|
58
|
-
|
66
|
+
|
67
|
+
server.logger = DataCollector::Core.logger if log
|
59
68
|
end
|
69
|
+
|
70
|
+
@listener
|
71
|
+
rescue StandardError => e
|
72
|
+
DataCollector::Core.error(e.message)
|
60
73
|
end
|
61
74
|
|
62
75
|
def parse_uri
|
@@ -6,6 +6,8 @@ require 'minitar'
|
|
6
6
|
require 'zlib'
|
7
7
|
require 'cgi'
|
8
8
|
require 'active_support/core_ext/hash'
|
9
|
+
require "active_support/isolated_execution_state"
|
10
|
+
require 'active_support/xml_mini'
|
9
11
|
require 'fileutils'
|
10
12
|
require_relative './output/rpc'
|
11
13
|
|
@@ -41,10 +43,11 @@ module DataCollector
|
|
41
43
|
@data[k] << v
|
42
44
|
end
|
43
45
|
else
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
if v.is_a?(Array) # merge with array
|
47
|
+
@data[k] = [@data[k]] + v
|
48
|
+
else
|
49
|
+
@data[k] = v
|
50
|
+
end
|
48
51
|
end
|
49
52
|
else
|
50
53
|
@data[k] = v
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Celik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '7.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: http
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.3'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: jsonpath
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.5'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.5'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: minitar
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '2.
|
173
|
+
version: '2.22'
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '2.
|
180
|
+
version: '2.22'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: bunny_burrow
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
333
333
|
- !ruby/object:Gem::Version
|
334
334
|
version: '0'
|
335
335
|
requirements: []
|
336
|
-
rubygems_version: 3.4.
|
336
|
+
rubygems_version: 3.4.19
|
337
337
|
signing_key:
|
338
338
|
specification_version: 4
|
339
339
|
summary: ETL helper library
|