rack-ga-track 0.4.0 → 0.5.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
  SHA1:
3
- metadata.gz: 93ddc3baec8a82c8c825ca814f3f200616fa832a
4
- data.tar.gz: 4edbd555eab633ea6c745c7bc76c6ca721158dfa
3
+ metadata.gz: 6a00ae792fc16422781a7c668a09218ef5d6ad5b
4
+ data.tar.gz: e64ab768ee4ff175ac7daf41e3f46af312361b29
5
5
  SHA512:
6
- metadata.gz: 85c93d08f15abd364558dba7aa121bb616c88d123a84740f135ef5291b22df256d820824a10c4b6e78b07139c4cd727aa5785d0587ebd379dcb155928b1b7973
7
- data.tar.gz: 3bf5fcf603a4df08c8c3a6efc5a4633937e5f73f75f85a3130cfc4172b3140fb781811818488318abd402104208014cb6bd2b5471aab5aaf960589211a3951dc
6
+ metadata.gz: a8de9721f2e5e6dc70b0ba3d30e7f9a1200f95d616abc2c371bdc62cf2a5fca39e4427aa7943231599b7de394f62c3dc94c8722f60b8e6d0147926c57882bcdf
7
+ data.tar.gz: 1adf57f727aeabae19a92a29cc41e613be5f8713b2503e34d226121f80fc5c81cf85b6682a8a2bdf50baad19197d8bda238ee2ec108b0c6da85d403f4c8296cc
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  Rack::GaTrack
2
2
  ================
3
+ [![Gem Version](https://badge.fury.io/rb/rack-ga-track.svg)](http://badge.fury.io/rb/rack-ga-track)
4
+ [![Code Climate](https://codeclimate.com/github/T1D/rack-ga-track.png)](https://codeclimate.com/github/T1D/rack-ga-track)
3
5
 
4
6
  Rack::GaTrack is a rack middleware that extracts Google Analytics Campaign
5
7
  params from the request. Specifically, it looks for a param utm\_source in the request.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
data/lib/rack-ga-track.rb CHANGED
@@ -27,7 +27,7 @@ module Rack
27
27
  def set_params(req)
28
28
  if req.params['utm_source']
29
29
  return params_hash(req.params)
30
- elsif req.cookies['ga_track']
30
+ elsif req.cookies['ga_track'] && !req.cookies['ga_track'].empty?
31
31
  return JSON.parse(req.cookies['ga_track'])
32
32
  end
33
33
  false
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: rack-ga-track 0.4.0 ruby lib
5
+ # stub: rack-ga-track 0.5.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "rack-ga-track"
9
- s.version = "0.4.0"
9
+ s.version = "0.5.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Daniel Nolan"]
14
- s.date = "2014-07-21"
14
+ s.date = "2014-07-23"
15
15
  s.description = "If the user visits via a Google Analytics Campaign link,\n this middleware will track utm_source, utm_content, utm_term, utm_medium, utm_campaign, and time."
16
16
  s.email = "dnolan@t1dexchange.org"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-ga-track
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Nolan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack