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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47a88bcc23a8fdc3922f22b3cb984eed3ea7b725d139e72b1f6f669d70ebb8e6
4
- data.tar.gz: 62a4c5775dca4cdd6c6776c6d8628a717d1eb021a314b663ac7f0b6c95e317ac
3
+ metadata.gz: a236c17cf807b2c641b9da834633dc9ed7a0d297b5638367726554c7f09f37b2
4
+ data.tar.gz: 95282bdbc813b58e9f15b4b4e24bb2f56ff9933ea8c209c60bbb9c368c0fd7a6
5
5
  SHA512:
6
- metadata.gz: 95cff72022a43f18c9495cfe6b1f3a66a1f086e196dcb03528152c5a3c4dc34b8e551d9f6fb2d576e758a9c61b34693632990342488b2406fcd3b44a003e4381
7
- data.tar.gz: 71abb93a64fbb419b5eb4f5e8e0ba6221f69b289fe8b133bbc5b208446e7b4b132d4199f769775170d69f2e5fb1051836ce9ce68222ca4a199eb0a0854978826
6
+ metadata.gz: 4cd169de59382390b9fba943bfa726d7f4c276ce4b7a18a8ab6cbbf115a040acf6c90ecc55b8367f4888962fe9829b2b952976e3911fcedfb253415939a16aac
7
+ data.tar.gz: d5b0c8f43c20b3870445dea95fc72819e5fc016aabf39e37c99b74207bdf289d84b2096a37e7e88599664015153d82dd3fbd38d524e92e5c3df5877b5fcb2538
@@ -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', '~> 6.1'
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.2'
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.4'
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.20'
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
- #server.logger = DataCollector::Core.logger
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
- @data[k] = v
45
- # HELP: why am I creating an array here?
46
- # t = data[k]
47
- # data[k] = Array.new([t, v])
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
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.30.0"
3
+ VERSION = "0.32.0"
4
4
  end
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.30.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-08-09 00:00:00.000000000 Z
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: '6.1'
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: '6.1'
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.2'
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.2'
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.4'
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.4'
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.20'
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.20'
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.13
336
+ rubygems_version: 3.4.19
337
337
  signing_key:
338
338
  specification_version: 4
339
339
  summary: ETL helper library