logfile_interval 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/bin/readme.rb +3 -4
- data/lib/logfile_interval/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39928b6833d0ca8c626a982ce27793e46cd56e09
|
4
|
+
data.tar.gz: 5f439c3e89fdae163a11c2554e2ad0fb7db0bd9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cf9f1135d847234001e625a8141e27bd930ea2e56d2f3806d4fe1b97e771adc2274fd54e6c2ef472144b823a33e9dd11b19a3b9d68e8615fe7c6e481b2a8e86
|
7
|
+
data.tar.gz: 5045943977e66bc7ac8a5cc24776edcb71dd15c2dd4b85914025406a7bc62094d0b7f82a6cba85f7c3e2212345b44b5b70323ef36d5db4abf3d1007c082d7238
|
data/README.md
CHANGED
@@ -38,11 +38,9 @@ class AccessLog < LogfileInterval::LineParser::Base
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
|
42
|
-
file = LogfileInterval::Logfile.new('path_to_logfile', parser)
|
43
|
-
parsed_line_enum = file.each_parsed_line
|
41
|
+
logfile = LogfileInterval::Logfile.new('path_to_logfile', AccessLog)
|
44
42
|
|
45
|
-
builder = LogfileInterval::IntervalBuilder.new(
|
43
|
+
builder = LogfileInterval::IntervalBuilder.new(logfile, AccessLog, 5*60)
|
46
44
|
builder.each_interval do |interval|
|
47
45
|
next unless interval.size > 0
|
48
46
|
|
data/bin/readme.rb
CHANGED
@@ -21,14 +21,13 @@ class AccessLogParsedLine < LogfileInterval::ParsedLine::Base
|
|
21
21
|
end
|
22
22
|
|
23
23
|
path = ENV['ACCESS_LOG_PATH']
|
24
|
-
|
25
|
-
unless
|
24
|
+
logfile = LogfileInterval::Logfile.new(path, AccessLogParsedLine)
|
25
|
+
unless logfile.exist?
|
26
26
|
puts "#{path} is not found"
|
27
27
|
exit 1
|
28
28
|
end
|
29
|
-
parsed_line_enum = file.each_parsed_line
|
30
29
|
|
31
|
-
builder = LogfileInterval::IntervalBuilder.new(
|
30
|
+
builder = LogfileInterval::IntervalBuilder.new(logfile, AccessLogParsedLine, 5*60)
|
32
31
|
builder.each_interval do |interval|
|
33
32
|
next unless interval.size > 0
|
34
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logfile_interval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Le Rohellec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|