actionview-link_to_blank 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb564b079e74eeb75ea17d9e38410690350948ff
4
- data.tar.gz: 6ae9dabe35e02c24bdc472069c710b9a0ce4ee86
3
+ metadata.gz: 882f89144dc2e878857d65ac92b50d38ca234072
4
+ data.tar.gz: 3700974c556b62a290bff69c8fd5a061dbbce275
5
5
  SHA512:
6
- metadata.gz: b1c50769592c99831fef70e8ed6a303ebf561ac4ab5c25c98deb263ed2cde3dc9df63457303b5173271349720fced7d20ac58f51fe72bdc204c24cb42080e142
7
- data.tar.gz: 0f92f800e2d5d04d07de8339c81ebcb5f3801ba0a8b59b64d45f5c62d941bf519eee40031defa95e3fb743f11124f9b6ba71cc166a68382a3a3cb92f38c6b540
6
+ metadata.gz: d2299f2ee20a6a6f901f7ed8aabff6a2b002ac3d9d617f0435022969571598c16a1477ecb6d79a669811074b8a47c13dad4e8edcd4c793c48809c71fb3621385
7
+ data.tar.gz: 4332768310ecab9833f07ba114080efc482b54a59d6232f19c65b52a83033db84b1d4de70ade7d0268a61459a09ac0fe92bb36fbaa02c0107b6e0bfc1d6a7734
@@ -1,16 +1,16 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'actionview/link_to_blank/version'
4
+ require 'action_view/link_to_blank/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "actionview-link_to_blank"
8
- spec.version = Actionview::LinkToBlank::VERSION
8
+ spec.version = ActionView::LinkToBlank::VERSION
9
9
  spec.authors = ["sanemat"]
10
10
  spec.email = ["o.gata.ken@gmail.com"]
11
11
  spec.description = %q{Alias link_to with target _blank}
12
12
  spec.summary = %q{Alias link_to with target _blank}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/sanemat/actionview-link_to_blank"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+
24
+ spec.add_dependency 'actionpack'
23
25
  end
@@ -0,0 +1,24 @@
1
+ module LinkToBlank
2
+ module ::ActionView
3
+ module Helpers
4
+ module UrlHelper
5
+ def link_to_blank(*args, &block)
6
+ if block_given?
7
+ options = args.first || {}
8
+ html_options = args.second || {}
9
+ link_to_blank(capture(&block), options, html_options)
10
+ else
11
+ name = args[0]
12
+ options = args[1] || {}
13
+ html_options = args[2] || {}
14
+
15
+ # override
16
+ html_options.merge!(target: '_blank')
17
+
18
+ link_to(name, options, html_options)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,11 @@
1
+ module ActionView
2
+ module LinkToBlank
3
+ class Railtie < ::Rails::Railtie
4
+ initializer 'actionview-link_to_blank' do |app|
5
+ ActiveSupport.on_load(:action_view) do
6
+ require 'action_view/link_to_blank/link_to_blank'
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module ActionView
2
+ module LinkToBlank
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ require "action_view/link_to_blank/version"
2
+ require 'action_view/link_to_blank/railtie' if defined? Rails
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionview-link_to_blank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: actionpack
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Alias link_to with target _blank
42
56
  email:
43
57
  - o.gata.ken@gmail.com
@@ -51,9 +65,11 @@ files:
51
65
  - README.md
52
66
  - Rakefile
53
67
  - actionview-link_to_blank.gemspec
54
- - lib/actionview/link_to_blank.rb
55
- - lib/actionview/link_to_blank/version.rb
56
- homepage: ''
68
+ - lib/action_view/link_to_blank/link_to_blank.rb
69
+ - lib/action_view/link_to_blank/railtie.rb
70
+ - lib/action_view/link_to_blank/version.rb
71
+ - lib/actionview-link_to_blank.rb
72
+ homepage: https://github.com/sanemat/actionview-link_to_blank
57
73
  licenses:
58
74
  - MIT
59
75
  metadata: {}
@@ -1,7 +0,0 @@
1
- require "actionview/link_to_blank/version"
2
-
3
- module Actionview
4
- module LinkToBlank
5
- # Your code goes here...
6
- end
7
- end
@@ -1,5 +0,0 @@
1
- module Actionview
2
- module LinkToBlank
3
- VERSION = "0.0.1"
4
- end
5
- end