redir 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/rack/redir.rb +1 -1
- data/redir.gemspec +2 -2
- data/spec/unit/rack/redir_spec.rb +2 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -72,7 +72,7 @@ adds redirect_mongo_id=<Redirect._id>&redirect_log_mongo_id=<RedirectLog._id> to
|
|
72
72
|
|
73
73
|
Redirect.append_google_analytics
|
74
74
|
|
75
|
-
adds utm_source=<@@host>&utm_campaign=<Redirect._id>
|
75
|
+
adds utm_source=<@@host>&utm_campaign=<Redirect._id> to the end of the url being redirected to for google analytics tracking
|
76
76
|
|
77
77
|
Contributing
|
78
78
|
------------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/lib/rack/redir.rb
CHANGED
@@ -28,7 +28,7 @@ module Rack
|
|
28
28
|
if Redirect.append_google_analytics
|
29
29
|
redirect_to_url = append_parameter_separater redirect_to_url
|
30
30
|
redirect_to_url = "#{redirect_to_url}utm_source=#{Rack::Utils.escape Redirect.host}" +
|
31
|
-
"&utm_campaign=#{redirect_log.redirect_id}
|
31
|
+
"&utm_campaign=#{redirect_log.redirect_id}" +
|
32
32
|
"&utm_medium=referral"
|
33
33
|
end
|
34
34
|
[302, {'Location' => redirect_to_url}, self]
|
data/redir.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "redir"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Lance Gleason"]
|
12
|
-
s.date = "2012-10-
|
12
|
+
s.date = "2012-10-29"
|
13
13
|
s.description = "This gem adds functionality to shorten url's and gather data about requests going through it."
|
14
14
|
s.email = "lgleason@polyglotprogramminginc.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -124,7 +124,7 @@ describe :redir do
|
|
124
124
|
let (:redirect) {create :redirect, :original_url => 'www.google.com/?foo=bar'}
|
125
125
|
subject {last_request}
|
126
126
|
its (:url) {should eq "http://www.google.com/?foo=bar&utm_source=http%3A%2F%2Flocalhost%3A3000%2F" +
|
127
|
-
"&utm_campaign=#{redirect_log.redirect_id}
|
127
|
+
"&utm_campaign=#{redirect_log.redirect_id}" +
|
128
128
|
"&utm_medium=referral"}
|
129
129
|
end
|
130
130
|
|
@@ -132,7 +132,7 @@ describe :redir do
|
|
132
132
|
let (:redirect) {create :redirect, :original_url => 'www.google.com'}
|
133
133
|
subject {last_request}
|
134
134
|
its (:url) {should eq "http://www.google.com/?utm_source=http%3A%2F%2Flocalhost%3A3000%2F" +
|
135
|
-
"&utm_campaign=#{redirect_log.redirect_id}
|
135
|
+
"&utm_campaign=#{redirect_log.redirect_id}" +
|
136
136
|
"&utm_medium=referral"}
|
137
137
|
end
|
138
138
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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-
|
12
|
+
date: 2012-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongoid
|
@@ -197,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
segments:
|
199
199
|
- 0
|
200
|
-
hash:
|
200
|
+
hash: -228748398699135231
|
201
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
202
|
none: false
|
203
203
|
requirements:
|