croque 0.2.0 → 0.3.0
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/README.md +1 -0
- data/lib/croque.rb +2 -1
- data/lib/croque/aggregator.rb +5 -1
- data/lib/croque/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 105dff789e0bec3468751ee49d38917de7250566
|
4
|
+
data.tar.gz: ad5c0db9cd6d132979a8b4c05f88a78ac6b39987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f576eb07dfc939e867e7a20027bafb2c5f5a5f453865c2ad7d16ea2e1fc7c67ec1f934df0107d7683017a2bd7a675effda05b330e9f6d72ae013cf37e959513
|
7
|
+
data.tar.gz: ab87fec1e04d37ce03a0c583f28c9726af110f2706bfa72e2c4a57741dd0c632892c5df5e57c91b4b6093f8730f4e0c90458f11dd36631bdebec8f3bb43d5832
|
data/README.md
CHANGED
data/lib/croque.rb
CHANGED
@@ -19,7 +19,7 @@ module Croque
|
|
19
19
|
include ActiveSupport::Configurable
|
20
20
|
config_accessor :root_path, :log_dir_path, :store_path,
|
21
21
|
:log_file_matcher, :hour_matcher, :matcher, :severity_matcher,
|
22
|
-
:start_matcher, :end_matcher, :lower_time
|
22
|
+
:start_matcher, :end_matcher, :lower_time, :except_path_matcher
|
23
23
|
end
|
24
24
|
|
25
25
|
configure do |config|
|
@@ -33,6 +33,7 @@ module Croque
|
|
33
33
|
config.start_matcher = /\-\- : Started/
|
34
34
|
config.end_matcher = /\-\- : Completed/
|
35
35
|
config.lower_time = 1000 # ms
|
36
|
+
config.except_path_matcher = /\/assets\//
|
36
37
|
end
|
37
38
|
|
38
39
|
class << self
|
data/lib/croque/aggregator.rb
CHANGED
@@ -153,6 +153,10 @@ module Croque
|
|
153
153
|
Croque.config.end_matcher
|
154
154
|
end
|
155
155
|
|
156
|
+
def except_path_matcher
|
157
|
+
Croque.config.except_path_matcher
|
158
|
+
end
|
159
|
+
|
156
160
|
def convert_matcher(matcher:, date: nil, hour: nil, severity: nil)
|
157
161
|
# Regexp => String
|
158
162
|
matcher = matcher.source
|
@@ -265,7 +269,7 @@ module Croque
|
|
265
269
|
def get_start_indexes(lines)
|
266
270
|
# map index only matched line
|
267
271
|
lines.map.with_index do |line, index|
|
268
|
-
index if line.match(start_matcher)
|
272
|
+
index if line.match(start_matcher) && !line.match(except_path_matcher)
|
269
273
|
end.compact
|
270
274
|
end
|
271
275
|
|
data/lib/croque/version.rb
CHANGED