noreferrer 0.11 → 0.12
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.
- data/lib/noreferrer.rb +2 -1
- data/noreferrer.gemspec +1 -1
- metadata +1 -1
data/lib/noreferrer.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module NoReferrerHelper
|
2
2
|
def link_no_referrer title, url, options={}
|
3
|
-
|
3
|
+
proc = Proc.new{|key| key == 'target' ? 'data-target' : key}
|
4
|
+
opts = options.map{|k,v| "#{proc.call(k)}='#{v}'"}.join(' ')
|
4
5
|
"<a data-url='#{url}' #{opts}>#{title}</a>".html_safe
|
5
6
|
end
|
6
7
|
end
|
data/noreferrer.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "noreferrer"
|
7
|
-
gem.version = 0.
|
7
|
+
gem.version = 0.12
|
8
8
|
gem.authors = ["Rodney Carvalho"]
|
9
9
|
gem.email = ["rcarvalho@atlantistech.com"]
|
10
10
|
gem.description = "Removes referrer information on an html link."
|