rslog 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rslog.rb +1 -1
- data/lib/rslog/container.rb +3 -3
- data/lib/rslog/data_parser.rb +1 -1
- data/lib/rslog/extractor.rb +2 -2
- data/lib/rslog/input_parser.rb +2 -2
- data/lib/rslog/opts.rb +1 -1
- data/lib/rslog/presenter.rb +3 -5
- data/lib/rslog/tools/array.rb +3 -3
- 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: 63ad3e3f8a8083ffde75f4d5ac3be44e17c82ed52ffb19868405b0255813f71d
|
|
4
|
+
data.tar.gz: f1d640feaac7ce8b2d8246dba170b972803f7a8a33f3e93ae5341742c441eab2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67d906c289b5917196f73f0cf2b4689587e3227a48b1b0d1ca1b520346d8361b75dace5e94ab298ac05877cd540f99719e27dd82bb02d577fc67ab82f93460a3
|
|
7
|
+
data.tar.gz: a04cba77c9309ebf5222f5876103c71be22245ffe6fc80e3cb3c35df6957b9722673eb017af22f58a469c8613f4c4ff7c4b1fc81ec5e16ef395fbc6cf5c33a85
|
data/lib/rslog.rb
CHANGED
data/lib/rslog/container.rb
CHANGED
data/lib/rslog/data_parser.rb
CHANGED
data/lib/rslog/extractor.rb
CHANGED
data/lib/rslog/input_parser.rb
CHANGED
|
@@ -25,8 +25,8 @@ class InputParser
|
|
|
25
25
|
|
|
26
26
|
def handle_opts
|
|
27
27
|
@opts.parse!(into: @container.options)
|
|
28
|
-
rescue OptionParser::InvalidOption =>
|
|
29
|
-
@container.add_error <<
|
|
28
|
+
rescue OptionParser::InvalidOption => e
|
|
29
|
+
@container.add_error << e
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def handle_args
|
data/lib/rslog/opts.rb
CHANGED
data/lib/rslog/presenter.rb
CHANGED
|
@@ -30,20 +30,18 @@ class Presenter
|
|
|
30
30
|
|
|
31
31
|
private
|
|
32
32
|
|
|
33
|
-
attr_reader :title, :suffix
|
|
34
|
-
|
|
35
33
|
def title
|
|
36
34
|
decorator[:title]
|
|
37
35
|
end
|
|
38
|
-
|
|
36
|
+
|
|
39
37
|
def suffix
|
|
40
38
|
decorator[:suffix]
|
|
41
39
|
end
|
|
42
|
-
|
|
40
|
+
|
|
43
41
|
def decorator
|
|
44
42
|
DECORATORS[@type]
|
|
45
43
|
end
|
|
46
|
-
|
|
44
|
+
|
|
47
45
|
def format_as_text
|
|
48
46
|
[
|
|
49
47
|
title,
|
data/lib/rslog/tools/array.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Monkey patch for Array class
|
|
4
|
-
#
|
|
3
|
+
# Monkey patch for Array class
|
|
4
|
+
#
|
|
5
5
|
class Array
|
|
6
6
|
def group_by_index(index = 0)
|
|
7
7
|
group_by { |str| str.split(' ')[index] }
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def to_multiline_string(suffix = '')
|
|
11
|
-
|
|
11
|
+
map { |item| "#{item} #{suffix}" }.join("\n")
|
|
12
12
|
end
|
|
13
13
|
end
|