skinny_jeans 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -22,6 +22,7 @@ http://img696.imageshack.us/img696/75/skinnys3.jpg
22
22
 
23
23
  == WHY?
24
24
  * so you can query a database by date and path and get pageviews and have that data stored CHEAP
25
+ * so you can query a database by date and path and SEARCH KEYWORD
25
26
  * because i couldn't find anything simpler and Google Analytics is limited to 10,000 API requests per day
26
27
 
27
28
 
@@ -36,7 +37,7 @@ http://img696.imageshack.us/img696/75/skinnys3.jpg
36
37
  5. enjoy the skinny jeans
37
38
 
38
39
 
39
- == PERFORMANCE
40
+ == PERFORMANCE (without organic search tracking)
40
41
  * it parses 100,000 lines in < 2.5 seconds
41
42
  * persists 1,000 requests with 2 compound indexes in 15 seconds, or 10 seconds with home_run c extension
42
43
  * 25,000 rows == 4 megabyte sqlite database
@@ -45,5 +46,5 @@ http://img696.imageshack.us/img696/75/skinnys3.jpg
45
46
  * supports gzipped files
46
47
  * creates a temp copy of the log file before parsing
47
48
  * currently requires each line to be unique
48
- * this could be a problem if a single client manages to hit the same page more than once in less than 1 second.
49
- * this is only a problem if the last line parsed is one of the pages that was hit by the same client more than once in less than one second
49
+ * this could be a problem if a single client manages to hit the same page more than once in less than 1 second.
50
+ * this is only a problem if the last line parsed is one of the pages that was hit by the same client more than once in less than one second
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -42,7 +42,7 @@ class SkinnyJeansStringParser
42
42
  # pre: like http://example.org?q=cool&fun=no, "fun"
43
43
  # post: "no"
44
44
  def return_param_from_url(url, param_name)
45
- _uri = URI.parse(url)
45
+ _uri = URI.parse(URI.encode(url))
46
46
  if _uri.query.present?
47
47
  _cgi = CGI.parse(_uri.query)
48
48
  return _cgi[param_name].to_s.strip if _cgi[param_name]
data/skinny_jeans.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{skinny_jeans}
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
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 = %q{2010-12-06}
12
+ s.date = %q{2010-12-07}
13
13
  s.email = %q{jonathan.otto@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc",
@@ -15,6 +15,14 @@ class SkinnyJeansStringParserTest < Test::Unit::TestCase
15
15
  sjsp.all_urls.first
16
16
  end
17
17
 
18
+ def test_can_parse_crappy_url
19
+ _string=<<-EOF
20
+ http://www.bing.com/search?q=XPS+17+coupon&src={referrer:source?}
21
+ EOF
22
+ sjsp = SkinnyJeansStringParser.new(_string)
23
+ assert_equal "XPS 17 coupon", sjsp.get_search_keyword
24
+ end
25
+
18
26
  def test_return_nil_of_no_urls
19
27
  _string=<<-EOF
20
28
  207.46.12.204 - - [01/Dec/2010:11:48:00 -0800] "GET /deals/skullcandy-inkd-earbuds HTTP/1.1" 200 5732 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SLCC1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; .NET CLR 3.0.04506.648)" "-"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skinny_jeans
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Otto
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-06 00:00:00 -06:00
18
+ date: 2010-12-07 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency