skinny_jeans 0.9.6 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.6
1
+ 0.10.0
@@ -51,11 +51,14 @@ module SkinnyJeans
51
51
  lineno += 1
52
52
  next if lineno_of_last_line_parsed && lineno <= lineno_of_last_line_parsed
53
53
 
54
+ next if line.strip == ""
55
+
54
56
  # try to block most of the bots
55
57
  _user_agent = line.split('"')[5] # parse out the user agent... this should be configurable for now
56
58
  next if !_user_agent[/Mozilla\/|Opera/] || !!_user_agent[/bot|crawler|spider|slurp/i]
57
59
 
58
60
  begin
61
+ next if line[/\s\d\d\d\s/].strip.to_i != 200
59
62
  path_match = line[@path_regexp, 1]
60
63
  next if path_match.nil?
61
64
  date_match = line[@date_regexp, 1]
@@ -189,6 +192,9 @@ end
189
192
 
190
193
  def insert_or_increment(_datetime_obj, _path, _search_keyword = nil)
191
194
 
195
+ # dont care about query parameters
196
+ _path.sub!(/\?.*/,'')
197
+
192
198
  date_string = _datetime_obj.strftime(("%Y-%m-%d"))
193
199
 
194
200
  # data for all pageviews
data/skinny_jeans.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "skinny_jeans"
8
- s.version = "0.9.6"
8
+ s.version = "0.10.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jonathan Otto"]
12
- s.date = "2012-10-07"
12
+ s.date = "2013-02-03"
13
13
  s.description = "Fast webserver log parser for persisting daily pageviews per path to sqlite"
14
14
  s.email = "jonathan.otto@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skinny_jeans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.10.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-07 00:00:00.000000000 Z
12
+ date: 2013-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3-ruby