data_collector 0.27.0 → 0.28.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/input.rb +11 -5
- data/lib/data_collector/version.rb +1 -1
- data/lib/data_collector.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71b519b75704a9bb6e46601c8195ab69608f19fae12ecde7c6c57869b8fca450
|
4
|
+
data.tar.gz: aa4a0697ffb9f6bc21c45f2ecdfa13c9deca7c8b69f2e8159f4901ab6be8d646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44dbd4e953260ef2c66b31f8a2914f4378bbeb969c670207bfa2272c4c2d5096a8ec5b3352b913093fb601b6d6c15ebc14d029a936e88c65ddf3d6eabe32e4d2
|
7
|
+
data.tar.gz: ee74ae98b99ab8b88e81d1c2c5437d860c314683e517858dc739924049c55ce8a4614cbfa40a97ac8bcd619cd678b6121e2158f45813370ee2c36de185a7244e
|
data/lib/data_collector/input.rb
CHANGED
@@ -66,7 +66,13 @@ module DataCollector
|
|
66
66
|
else
|
67
67
|
data
|
68
68
|
end
|
69
|
-
rescue => e
|
69
|
+
rescue DataCollector::InputError => e
|
70
|
+
@logger.info(e.message)
|
71
|
+
raise e
|
72
|
+
rescue DataCollector::Error => e
|
73
|
+
@logger.info(e.message)
|
74
|
+
nil
|
75
|
+
rescue StandardError => e
|
70
76
|
@logger.info(e.message)
|
71
77
|
puts e.backtrace.join("\n")
|
72
78
|
nil
|
@@ -156,13 +162,13 @@ module DataCollector
|
|
156
162
|
raise '206 Partial Content' if http_response.code ==206
|
157
163
|
|
158
164
|
when 401
|
159
|
-
raise 'Unauthorized'
|
165
|
+
raise DataCollector::InputError, 'Unauthorized'
|
160
166
|
when 403
|
161
|
-
raise 'Forbidden'
|
167
|
+
raise DataCollector::InputError, 'Forbidden'
|
162
168
|
when 404
|
163
|
-
raise 'Not found'
|
169
|
+
raise DataCollector::InputError, 'Not found'
|
164
170
|
else
|
165
|
-
raise "Unable to process received status code = #{http_response.code}"
|
171
|
+
raise DataCollector::InputError, "Unable to process received status code = #{http_response.code}"
|
166
172
|
end
|
167
173
|
|
168
174
|
#[data, http_response.code]
|
data/lib/data_collector.rb
CHANGED
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.28.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-
|
11
|
+
date: 2023-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|