noreferrer 0.11 → 0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/noreferrer.rb +2 -1
  2. data/noreferrer.gemspec +1 -1
  3. 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
- opts = options.map{|k,v| "#{k}='#{v}'"}.join(' ')
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.11
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."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noreferrer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.11'
4
+ version: '0.12'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: