log_sense 1.8.0 → 1.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40a7ce48ddf73fc434bd0df0265e5d16d39e5034b62714f0324ea2a8b56950ca
4
- data.tar.gz: c6e4ce814d0276f3a2c2aeaa20051772695c8bf8c8f53cbe10440415bb301dec
3
+ metadata.gz: ccf396e27466411bfa603709787126290e24d0652ac5cc6b96bad008d11ccd6d
4
+ data.tar.gz: 4cee6242192c1c38273c7a9fa55c2d55ea18aa65c6328932a27f944fa8b25cbd
5
5
  SHA512:
6
- metadata.gz: 3b31c02a784d0e3059500f774b090fd40e099d1facd2382195096194ccdecebb5ce601b26b6c04874cc7446e6e625e91be15966d425fc050f3b0be50c67a6985
7
- data.tar.gz: 9b79e356ebcaa21b207c24c9ba4c78e39c6865deb4925413aca51b0ce1b705918ca30b61aa205be447547ac428e038239807f82046a9842f7a9d7753037c5fa5
6
+ metadata.gz: 25874781f2e012a40de832d553a1a3bd0cfa0fd232988e482a2e6ceaf6c3cdd632bbe5059bbb134f4fc3029add42ff0e51311d9c6c3a61feedebf69df1f9c8b6
7
+ data.tar.gz: 0e9733a78e5b972ed20c657983e04f7d238a14646e91a0c68e2d4594c4fbaecacc5271ec1c3e15949d590b86f04049b837e448b1473f9db60a8c2a3673074a02
data/CHANGELOG.org CHANGED
@@ -2,6 +2,10 @@
2
2
  #+AUTHOR: Adolfo Villafiorita
3
3
  #+STARTUP: showall
4
4
 
5
+ * 1.9.0
6
+
7
+ - Perform calculation on HTML pages only
8
+
5
9
  * 1.8.0
6
10
 
7
11
  - Various improvements to the Rails reports
@@ -31,47 +31,46 @@ module LogSense
31
31
  ts = @db.execute "SELECT #{human_readable_size} from LogLine where #{filter}"
32
32
  @total_size = ts[0][0]
33
33
 
34
+ html = "(extension like '.htm%')"
35
+ non_html = "(extension not like '.htm%')"
36
+ gs = "(status like '2%' or status like '3%')"
37
+ bs = "(status like '4%' or status like '5%')"
38
+
34
39
  @daily_distribution = @db.execute "SELECT date(datetime),
35
40
  #{human_readable_day},
36
41
  count(datetime),
37
42
  count(distinct(unique_visitor)),
38
- #{human_readable_size} from LogLine
39
- where #{filter}
43
+ #{human_readable_size}
44
+ from LogLine
45
+ where (#{filter} and #{html})
40
46
  group by date(datetime)"
41
47
 
42
48
  @time_distribution = @db.execute "SELECT strftime('%H', datetime),
43
49
  count(datetime),
44
50
  count(distinct(unique_visitor)),
45
51
  #{human_readable_size} from LogLine
46
- where #{filter}
52
+ where (#{filter} and #{html})
47
53
  group by strftime('%H', datetime)"
48
54
 
49
- html = "(extension like '.htm%')"
50
- non_html = "(extension not like '.htm%')"
51
- gs = "(status like '2%' or status like '3%')"
52
- bs = "(status like '4%' or status like '5%')"
53
-
54
55
  @most_requested_pages = @db.execute resource_query(html, gs)
55
56
  @most_requested_resources = @db.execute resource_query(non_html, gs)
56
57
  @missed_pages = @db.execute resource_query(html, bs)
57
58
  @missed_resources = @db.execute resource_query(non_html, bs)
58
59
 
59
60
  @missed_pages_by_ip = @db.execute "SELECT ip, path, status from LogLine
60
- where #{bs} and
61
- #{html} and
62
- #{filter}
61
+ where #{filter} and #{html} and #{bs}
63
62
  limit #{@options[:limit]}"
64
63
 
65
64
  @missed_resources_by_ip = @db.execute "SELECT ip, path, status
66
65
  from LogLine
67
- where #{bs} and #{filter}
66
+ where #{filter} and #{bs}
68
67
  limit #{@options[:limit]}"
69
68
 
70
69
  @browsers = @db.execute "SELECT browser,
71
70
  count(browser),
72
71
  count(distinct(unique_visitor)),
73
72
  #{human_readable_size} from LogLine
74
- where #{filter}
73
+ where #{filter} and #{html}
75
74
  group by browser
76
75
  order by count(browser) desc"
77
76
 
@@ -79,7 +78,7 @@ module LogSense
79
78
  count(platform),
80
79
  count(distinct(unique_visitor)),
81
80
  #{human_readable_size} from LogLine
82
- where #{filter}
81
+ where #{filter} and #{html}
83
82
  group by platform
84
83
  order by count(platform) desc"
85
84
 
@@ -89,7 +88,7 @@ module LogSense
89
88
  count(datetime),
90
89
  #{human_readable_size}
91
90
  from LogLine
92
- where #{filter}
91
+ where #{filter} and #{html}
93
92
  group by browser, platform, ip
94
93
  order by count(datetime) desc
95
94
  limit #{@options[:limit]}"
@@ -98,7 +97,7 @@ module LogSense
98
97
  count(referer),
99
98
  count(distinct(unique_visitor)),
100
99
  #{human_readable_size} from LogLine
101
- where #{filter}
100
+ where #{filter} and #{html}
102
101
  group by referer
103
102
  order by count(referer)
104
103
  desc limit #{@options[:limit]}"
@@ -1,3 +1,3 @@
1
1
  module LogSense
2
- VERSION = "1.8.0"
2
+ VERSION = "1.9.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_sense
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adolfo Villafiorita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser