hancock_cms_goto 1.0.1.2 → 1.0.1.3

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: f956a9ac74f49b894820747722fb5ec59d717cb6
4
- data.tar.gz: 974fd7186cd94d06b1a523e3afabeb017c0b1b88
3
+ metadata.gz: 9771d8e1b490bf827afc4e10ab3e970cd6ed66da
4
+ data.tar.gz: f947668e1a9d7afdde70f4046e3a20261bff84bc
5
5
  SHA512:
6
- metadata.gz: 99d7f0dca2191629974d9a9cb33300f7aaa4b0ab49562ada7decb844b6e25af01b32c56e634cf40e0a9c4504534654f5b11e52626b6fa646a8f75633d8ec74ab
7
- data.tar.gz: 419ce55f77fdc954df1c7f7221ce35da3a9c82d91cfb1ccfa806f640fbcf6c0d38f35a358414860bf6471f53d56c7e2a7589563c3e0edb81fb470b8948ca4a78
6
+ metadata.gz: dc4e4f86484628d774e4e105167a22411e7a027852dd85cf4488065ae6645a1ea71a90dee736d4d27f9bb7a9ad108604f4c7f4cdd60c86afba8dddd305496ccf
7
+ data.tar.gz: 4a77dae4bd934d11d0e7ec3c456180f9d990f02c7186bbc87a516f95f1846e0f98baaee5f0ef1ff67df6f677d0af67400f1cddbb7950fcacf0e6400ab542740b
@@ -4,9 +4,9 @@ module Hancock::Goto::GotoHelper
4
4
  html_options, options, name = options, name, block if block_given?
5
5
  options ||= {}
6
6
 
7
- options.merge!({only_path: false}) if options.is_a?(Hash)
7
+ options.reverse_merge!({only_path: false}) if options.is_a?(Hash)
8
8
  options = {controller: "hancock/goto/transfers", action: 'index', url: url_for(options)}
9
- html_options.merge!({target: :_blank}) if html_options.is_a?(Hash)
9
+ html_options.reverse_merge!(Hancock::Goto.config.default_html_options) if html_options.is_a?(Hash)
10
10
 
11
11
  if block_given?
12
12
  link_to(options, html_options, &block)
@@ -41,6 +41,18 @@ module Hancock
41
41
  @user_abilities_support = !!defined?(RailsAdminUserAbilities)
42
42
  @ra_comments_support = !!defined?(RailsAdminComments)
43
43
  end
44
+
45
+ def default_html_options
46
+ return @default_html_options if @default_html_options
47
+ @default_html_options = {target: :_blank}
48
+ _rel = []
49
+ _rel << 'nofollow' if Hancock::Goto.config.add_nofollow
50
+ _rel << 'noindex' if Hancock::Goto.config.add_noindex
51
+ _rel << 'noreferrer' if Hancock::Goto.config.add_noreferrer
52
+ _rel << 'noopener' if Hancock::Goto.config.add_noopener
53
+ @default_html_options[:rel] = _rel.join(" ")
54
+ @default_html_options
55
+ end
44
56
  end
45
57
  end
46
58
  end
@@ -1,5 +1,5 @@
1
1
  module Hancock
2
2
  module Goto
3
- VERSION = "1.0.1.2".freeze
3
+ VERSION = "1.0.1.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hancock_cms_goto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.2
4
+ version: 1.0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-19 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler