actionview-link_to_block 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/Appraisals +8 -2
- data/Gemfile +1 -0
- data/README.md +24 -4
- data/actionview-link_to_block.gemspec +1 -1
- data/gemfiles/actionpack_3_2.gemfile +1 -0
- data/gemfiles/actionpack_4_0.gemfile +2 -1
- data/gemfiles/actionview_4_1.gemfile +3 -2
- data/gemfiles/actionview_master.gemfile +11 -0
- data/lib/action_view/link_to_block/version.rb +1 -1
- data/test/test_actionview-link_to_block.rb +3 -0
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe7c17d491790087ddd9dd7457f7b956ea5dcddd
|
4
|
+
data.tar.gz: b1a78114e4336ff166a8ca8e41c8d48e7acedb70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d740274133668ae46ffd1ee7c6f87a4b1a4f940bb8b066f8d848659250a0ce25efabf2ed431fd3fa74876a8628b13f39ebd0eddc8416fe3c137d96eacecc033f
|
7
|
+
data.tar.gz: 3c1128d801bd4f02ee64b7ee81c08c66d82f66aecc6c890c5ce9140d17fc11ce46329f0a5172d7d87b3018667eccd1f6398c61bb2d6b1b03858e13b7a77b5f15
|
data/.travis.yml
CHANGED
@@ -2,10 +2,14 @@ language: ruby
|
|
2
2
|
rvm:
|
3
3
|
- 1.9.3
|
4
4
|
- 2.0.0
|
5
|
+
- 2.1.1
|
6
|
+
before_install:
|
7
|
+
- gem update bundler
|
5
8
|
gemfile:
|
6
9
|
- gemfiles/actionpack_3_2.gemfile
|
7
10
|
- gemfiles/actionpack_4_0.gemfile
|
8
11
|
- gemfiles/actionview_4_1.gemfile
|
12
|
+
- gemfiles/actionview_master.gemfile
|
9
13
|
branches:
|
10
14
|
only:
|
11
15
|
- master
|
data/Appraisals
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
appraise '
|
1
|
+
appraise 'actionview_master' do
|
2
2
|
gem 'actionview', github: 'rails', branch: 'master'
|
3
3
|
gem 'actionpack', github: 'rails', branch: 'master'
|
4
4
|
end
|
5
5
|
|
6
|
+
appraise 'actionview_4_1' do
|
7
|
+
version = '~> 4.1.0'
|
8
|
+
gem 'actionview', version
|
9
|
+
gem 'actionpack', version
|
10
|
+
end
|
11
|
+
|
6
12
|
appraise 'actionpack_4_0' do
|
7
|
-
gem 'actionpack', '>= 4.0.
|
13
|
+
gem 'actionpack', '>= 4.0', '< 4.1'
|
8
14
|
end
|
9
15
|
|
10
16
|
appraise 'actionpack_3_2' do
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/actionview-link_to_block.png)](http://badge.fury.io/rb/actionview-link_to_block)
|
4
4
|
[![Build Status](https://api.travis-ci.org/sanemat/actionview-link_to_block.png?branch=master)](https://travis-ci.org/sanemat/actionview-link_to_block)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/sanemat/actionview-link_to_block.png)](https://codeclimate.com/github/sanemat/actionview-link_to_block)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/sanemat/actionview-link_to_block/badge.png?branch=master)](https://coveralls.io/r/sanemat/actionview-link_to_block)
|
6
7
|
|
7
8
|
Add helper method, `link_to_block`, `link_to_block_if`, `link_to_block_unless`, `link_to_block_unless_current`.
|
8
9
|
This is symmetrical to `link_to`, `link_to_if`, `link_to_unless`, `link_to_unless_current`.
|
@@ -29,7 +30,7 @@ Then use `link_to_block_if` below:
|
|
29
30
|
<%= link_to_block_if condition, user_path(@user) do %>
|
30
31
|
<i class="icon-ok icon-white"></i> Do it@
|
31
32
|
<% end %>
|
32
|
-
|
33
|
+
|
33
34
|
#=> if condition truthy, then shows html and link, else if condition falsy, then show only html.
|
34
35
|
|
35
36
|
## Installation
|
@@ -52,18 +53,37 @@ Or install it yourself as:
|
|
52
53
|
`actionview` extracts from `actionpack` on rails4.1.
|
53
54
|
You can see `Appraisals` file and `/gemfiles` directory.
|
54
55
|
|
55
|
-
actionview v4.
|
56
|
+
actionview v4.2(rails v4.2)
|
56
57
|
|
57
58
|
gem 'actionview', github: 'rails', branch: 'master'
|
58
59
|
gem 'actionpack', github: 'rails', branch: 'master'
|
59
60
|
|
61
|
+
actionview v4.1(rails v4.1)
|
62
|
+
|
63
|
+
gem 'actionpack', '~> 4.1.0'
|
64
|
+
|
60
65
|
actionpack v4.0(rails v4.0)
|
61
66
|
|
62
|
-
gem 'actionpack', '
|
67
|
+
gem 'actionpack', '~> 4.0.0'
|
63
68
|
|
64
69
|
actionpack v3.2(rails v3.2)
|
65
70
|
|
66
|
-
gem 'actionpack', '
|
71
|
+
gem 'actionpack', '~> 3.0'
|
72
|
+
|
73
|
+
## Testing
|
74
|
+
|
75
|
+
Test against actionpack v3.2, v4.0, v4.1 and v4.2, run below:
|
76
|
+
|
77
|
+
$ bundle
|
78
|
+
$ bundle exec appraisal install
|
79
|
+
$ bundle exec appraisal rake
|
80
|
+
|
81
|
+
Test for specific version:
|
82
|
+
|
83
|
+
$ bundle exec appraisal install
|
84
|
+
$ bundle exec appraisal actionpack_4_0 rake
|
85
|
+
|
86
|
+
Prepare actionpack_3_2(gem), actionpack_4_0(gem), actionview_4_1(gem), actionview_master(github)
|
67
87
|
|
68
88
|
## Contributing
|
69
89
|
|
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler",
|
21
|
+
spec.add_development_dependency "bundler", '>= 1.3'
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
end
|
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "coveralls", :require=>false
|
5
6
|
gem "pry"
|
6
7
|
gem "appraisal", :github=>"thoughtbot/appraisal"
|
7
|
-
gem "actionview",
|
8
|
-
gem "actionpack",
|
8
|
+
gem "actionview", "~> 4.1.0"
|
9
|
+
gem "actionpack", "~> 4.1.0"
|
9
10
|
|
10
11
|
gemspec :path=>".././"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "coveralls", :require=>false
|
6
|
+
gem "pry"
|
7
|
+
gem "appraisal", :github=>"thoughtbot/appraisal"
|
8
|
+
gem "actionview", :github=>"rails", :branch=>"master"
|
9
|
+
gem "actionpack", :github=>"rails", :branch=>"master"
|
10
|
+
|
11
|
+
gemspec :path=>".././"
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionview-link_to_block
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Link to with block
|
@@ -45,8 +45,8 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
49
|
-
- .travis.yml
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
50
|
- Appraisals
|
51
51
|
- Gemfile
|
52
52
|
- LICENSE.txt
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- gemfiles/actionpack_3_2.gemfile
|
57
57
|
- gemfiles/actionpack_4_0.gemfile
|
58
58
|
- gemfiles/actionview_4_1.gemfile
|
59
|
+
- gemfiles/actionview_master.gemfile
|
59
60
|
- lib/action_view/link_to_block/link_to_block.rb
|
60
61
|
- lib/action_view/link_to_block/railtie.rb
|
61
62
|
- lib/action_view/link_to_block/version.rb
|
@@ -71,17 +72,17 @@ require_paths:
|
|
71
72
|
- lib
|
72
73
|
required_ruby_version: !ruby/object:Gem::Requirement
|
73
74
|
requirements:
|
74
|
-
- -
|
75
|
+
- - ">="
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '0'
|
77
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
79
|
requirements:
|
79
|
-
- -
|
80
|
+
- - ">="
|
80
81
|
- !ruby/object:Gem::Version
|
81
82
|
version: '0'
|
82
83
|
requirements: []
|
83
84
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.2.2
|
85
86
|
signing_key:
|
86
87
|
specification_version: 4
|
87
88
|
summary: Link to with block
|