kaminari-actionview 1.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +21 -0
- data/README.md +33 -0
- data/kaminari-actionview.gemspec +26 -0
- data/lib/kaminari/actionview.rb +10 -0
- data/lib/kaminari/actionview/action_view_extension.rb +21 -0
- data/lib/kaminari/actionview/version.rb +6 -0
- metadata +107 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 007bb5459587fc9e5daf36ffc515e1952c59efa9
|
4
|
+
data.tar.gz: 722a6991bba98d0e2513f733016ae9798873d40c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8e692b4bc98c0c68fe05df2b26a0011058f72cfaed58b73159483046639c943c3a3615fb1da548efcfe7ef4a9ec5bfc03ab171954be28f4d826f1662e145c4a5
|
7
|
+
data.tar.gz: f147d46caccfd739623a99008f7f28498f6a1912305ffeda7744c6ebb533a5aa8293743ac2921c9b842caf0d873e394891f43d1f14719008c03edcfd00c4f692
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Akira Matsuda
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Kaminari::Actionview
|
2
|
+
|
3
|
+
Kaminari Action View adapter.
|
4
|
+
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'kaminari-actionview'
|
12
|
+
```
|
13
|
+
|
14
|
+
And bundle.
|
15
|
+
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
This gem is basically an internal gem that will be automatically bundled from kaminari gem.
|
20
|
+
|
21
|
+
Or if you're using web frameworks other than Rails + Action View, you might need to explicitly bundle this gem.
|
22
|
+
|
23
|
+
See [Kaminari README (Other Framework/Library Support)](https://github.com/amatsuda/kaminari/blob/master/README.md#other-frameworklibrary-support) for details.
|
24
|
+
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
Pull requests are welcome on GitHub at https://github.com/amatsuda/kaminari.
|
29
|
+
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'kaminari/actionview/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "kaminari-actionview"
|
9
|
+
spec.version = Kaminari::Actionview::VERSION
|
10
|
+
spec.authors = ["Akira Matsuda"]
|
11
|
+
spec.email = ["ronnie@dio.jp"]
|
12
|
+
|
13
|
+
spec.summary = 'Kaminari Action View adapter'
|
14
|
+
spec.description = 'kaminari-actionview provides pagination helpers for your Action View templates'
|
15
|
+
spec.homepage = 'https://github.com/amatsuda/kaminari'
|
16
|
+
spec.license = "MIT"
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'kaminari-core', Kaminari::Actionview::VERSION
|
22
|
+
spec.add_dependency 'actionview'
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", ">= 1.12"
|
25
|
+
spec.add_development_dependency "rake", ">= 10.0"
|
26
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "kaminari/actionview/version"
|
3
|
+
require 'active_support/lazy_load_hooks'
|
4
|
+
|
5
|
+
ActiveSupport.on_load :action_view do
|
6
|
+
require 'kaminari/helpers/helper_methods'
|
7
|
+
::ActionView::Base.send :include, Kaminari::Helpers::HelperMethods
|
8
|
+
|
9
|
+
require 'kaminari/actionview/action_view_extension'
|
10
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'action_view'
|
3
|
+
require 'action_view/log_subscriber'
|
4
|
+
require 'action_view/context'
|
5
|
+
|
6
|
+
module Kaminari
|
7
|
+
# = Helpers
|
8
|
+
module ActionViewExtension
|
9
|
+
# Monkey-patching AV::LogSubscriber not to log each render_partial
|
10
|
+
module LogSubscriberSilencer
|
11
|
+
def render_partial(*)
|
12
|
+
super unless Thread.current[:kaminari_rendering]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# so that this instance can actually "render"
|
19
|
+
::Kaminari::Helpers::Paginator.send :include, ::ActionView::Context
|
20
|
+
|
21
|
+
ActionView::LogSubscriber.send :prepend, Kaminari::ActionViewExtension::LogSubscriberSilencer
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kaminari-actionview
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.beta2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Akira Matsuda
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: kaminari-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.0.beta2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0.beta2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionview
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
description: kaminari-actionview provides pagination helpers for your Action View
|
70
|
+
templates
|
71
|
+
email:
|
72
|
+
- ronnie@dio.jp
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- MIT-LICENSE
|
78
|
+
- README.md
|
79
|
+
- kaminari-actionview.gemspec
|
80
|
+
- lib/kaminari/actionview.rb
|
81
|
+
- lib/kaminari/actionview/action_view_extension.rb
|
82
|
+
- lib/kaminari/actionview/version.rb
|
83
|
+
homepage: https://github.com/amatsuda/kaminari
|
84
|
+
licenses:
|
85
|
+
- MIT
|
86
|
+
metadata: {}
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options: []
|
89
|
+
require_paths:
|
90
|
+
- lib
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 1.3.1
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project:
|
103
|
+
rubygems_version: 2.6.8
|
104
|
+
signing_key:
|
105
|
+
specification_version: 4
|
106
|
+
summary: Kaminari Action View adapter
|
107
|
+
test_files: []
|