apache_log_report 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a790d10e531dbe48d5bff951de0e2a3bc47188dcffd03d952597019012e76bed
4
- data.tar.gz: 22ff24d2b7a292bd8ef58d0ca49d0f55aa3a12d9400568ba46da5f0280fed3b2
3
+ metadata.gz: 2a554ad8352b97f32dd81c004d6b78f1e7d8e2ea284bb7dc7ef18eb3fee7687a
4
+ data.tar.gz: 0d6e6243eabf89425e174a7ce76948cfd9517fbf3c226a2e77bb746bb43e8223
5
5
  SHA512:
6
- metadata.gz: abe3454d3679848d92f375f73b18efee2c090d83ba6d069146e3773542dccaa2c924b9b9813bc1311ad71ad82acb970d570a3f08674b4ffca00f6efbc80fde1a
7
- data.tar.gz: 60e70449964fb3460eec9a8c0ac6f155959ea697f694a65755e79beb13fe25a2199ebb8b17e01f941c022035791436f062fb909617c0eae785fd28f400a07fa0
6
+ metadata.gz: 75a8de1b3375eec45a4ffb41cfa37d834c89ec07e92155d31b2e872e5040fb22709f759bd5aa6bbfc5ed5c84852a9b26c6f603019cb2fb43d21a56a0d33f8eaf
7
+ data.tar.gz: baa9f268e1e7dcdb72463bf4b4aac1d585524b3ba7db2da1408259f8d54f59424003094372b491791b2788f9f7b3de68a8d1cec8919cd1991ccb5c856677b94c
@@ -116,12 +116,11 @@ module ApacheLogReport
116
116
 
117
117
  parser = ApacheLog::Parser.new(options[:format] || 'combined')
118
118
 
119
- content.collect { |line|
120
- hash = parser.parse line
119
+ content.each do |line|
120
+ begin
121
+ hash = parser.parse line
121
122
 
122
- if hash != {}
123
123
  ua = Browser.new(hash[:user_agent], accept_language: "en-us")
124
-
125
124
  ins.execute(
126
125
  hash[:datetime].iso8601,
127
126
  hash[:remote_host],
@@ -140,17 +139,14 @@ module ApacheLogReport
140
139
  (ua.platform.name || ""),
141
140
  (ua.platform.version || "")
142
141
  )
142
+ rescue
143
+ STDERR.puts "Apache Log parser error: could not parse #{line}"
143
144
  end
144
- }
145
-
145
+ end
146
+
146
147
  db
147
148
  end
148
149
 
149
-
150
- def self.reasonable_response_type ext
151
-
152
- end
153
-
154
150
  #
155
151
  # take a sqlite3 databae and analyze data
156
152
  #
@@ -1,3 +1,3 @@
1
1
  module ApacheLogReport
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apache_log_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adolfo Villafiorita