dvl-kaminari-views 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 16badc3c2411222d76446ebf4c24d7ea301588eb
4
+ data.tar.gz: 8bebaca6216b46cdcda9e6a8eb820c0e88619c96
5
+ SHA512:
6
+ metadata.gz: 9863c5798afc97fc09887f382c1c0257be6c01586f63d3759520ccc62e004d12413aa7e754918786fa30619974fca9d79f00d092cffacc17c25411efdb5decf0
7
+ data.tar.gz: eb21193ef3c1bbbc31db8c1161dcf68653d60e9764c00af9bd3ca0c7e5e7d7ef9b5ba9c6d6fc1e27795d21fdbbab600660fdc226ef3cc04c9dc436b46460b9b8
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle/
4
+ log/*.log
5
+ pkg/
6
+ test/
7
+ .config
8
+ .yardoc
9
+ Gemfile.lock
10
+ InstalledFiles
11
+ _yardoc
12
+ coverage
13
+ doc/
14
+ lib/bundler/man
15
+ pkg
16
+ rdoc
17
+ spec/reports
18
+ test/tmp
19
+ test/version_tmp
20
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in dvl-kaminari-views.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use debugger
14
+ # gem 'ruby-debug'
data/README.md ADDED
@@ -0,0 +1,15 @@
1
+ ## Dvl Kaminari Views
2
+
3
+ Integrates Kaminari and [dvl-core](https://github.com/dobtco/dvl-core).
4
+
5
+ ### Usage
6
+
7
+ ```rb
8
+ # Gemfile
9
+ gem 'kaminari'
10
+ gem 'dvl-kaminari-views'
11
+ ```
12
+
13
+ ### License
14
+
15
+ [MIT](http://dobtco.mit-license.org/)
@@ -0,0 +1,9 @@
1
+ module DvlKaminariHelper
2
+ def paginate(objects, options = {})
3
+ super(objects, options.reverse_merge(
4
+ theme: 'dvl',
5
+ window: 3,
6
+ outer_window: 2
7
+ ))
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ <li><span>&hellip;</span></li>
@@ -0,0 +1,7 @@
1
+ <% if current_page.last? %>
2
+ <li><span>&rsaquo;</span></li>
3
+ <% else %>
4
+ <li>
5
+ <%= link_to '&rsaquo;'.html_safe, url, :rel => 'next', :remote => remote %>
6
+ </li>
7
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <li class="<%= 'active' if page.current? %>">
2
+ <%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
3
+ </li>
@@ -0,0 +1,17 @@
1
+ <% pagination_class ||= "" %>
2
+
3
+ <%= paginator.render do -%>
4
+ <div class="pagination <%= pagination_class %>">
5
+ <ul>
6
+ <%= prev_page_tag %>
7
+ <% each_page do |page| -%>
8
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
9
+ <%= page_tag page %>
10
+ <% elsif !page.was_truncated? -%>
11
+ <%= gap_tag %>
12
+ <% end -%>
13
+ <% end -%>
14
+ <%= next_page_tag %>
15
+ </ul>
16
+ </div>
17
+ <% end -%>
@@ -0,0 +1,7 @@
1
+ <% if current_page.first? %>
2
+ <li><span>&lsaquo;</span></li>
3
+ <% else %>
4
+ <li>
5
+ <%= link_to '&lsaquo;'.html_safe, url, :rel => 'prev', :remote => remote %>
6
+ </li>
7
+ <% end %>
@@ -0,0 +1,20 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "dvl-kaminari-views/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "dvl-kaminari-views"
9
+ s.version = DvlKaminariViews::VERSION
10
+ s.authors = ["Adam Becker"]
11
+ s.email = ["adam@dobt.co"]
12
+ s.homepage = "http://github.com/dobtco/dvl-kaminari-views"
13
+ s.summary = "Integrates Kaminari and dvl-core."
14
+ s.description = "Integrates Kaminari and dvl-core."
15
+
16
+ s.license = 'MIT'
17
+ s.files = `git ls-files`.split("\n")
18
+
19
+ s.add_dependency "kaminari", ">= 0.13"
20
+ end
@@ -0,0 +1,3 @@
1
+ module DvlKaminariViews
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,4 @@
1
+ module DvlKaminariViews
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
data/script/release ADDED
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+ # Tag and push a release.
3
+
4
+ set -e
5
+
6
+ # Make sure we're in the project root.
7
+
8
+ cd $(dirname "$0")/..
9
+
10
+ # Build a new gem archive.
11
+
12
+ rm -rf dvl-kaminari-views-*.gem
13
+ gem build -q dvl-kaminari-views.gemspec
14
+
15
+ # Make sure we're on the master branch.
16
+
17
+ (git branch | grep -q '* master') || {
18
+ echo "Only release from the master branch."
19
+ exit 1
20
+ }
21
+
22
+ # Figure out what version we're releasing.
23
+
24
+ tag=v`ls dvl-kaminari-views-*.gem | sed 's/^dvl-kaminari-views-\(.*\)\.gem$/\1/'`
25
+
26
+ # Make sure we haven't released this version before.
27
+
28
+ git fetch -t origin
29
+
30
+ (git tag -l | grep -q "$tag") && {
31
+ echo "Whoops, there's already a '${tag}' tag."
32
+ exit 1
33
+ }
34
+
35
+ # Tag it and bag it.
36
+
37
+ gem push dvl-kaminari-views-*.gem && git tag "$tag" &&
38
+ git push origin master && git push origin "$tag"
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dvl-kaminari-views
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Adam Becker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: kaminari
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.13'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0.13'
27
+ description: Integrates Kaminari and dvl-core.
28
+ email:
29
+ - adam@dobt.co
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".gitignore"
35
+ - Gemfile
36
+ - README.md
37
+ - app/helpers/dvl_kaminari_helper.rb
38
+ - app/views/kaminari/dvl/_gap.html.erb
39
+ - app/views/kaminari/dvl/_next_page.html.erb
40
+ - app/views/kaminari/dvl/_page.html.erb
41
+ - app/views/kaminari/dvl/_paginator.html.erb
42
+ - app/views/kaminari/dvl/_prev_page.html.erb
43
+ - dvl-kaminari-views.gemspec
44
+ - lib/dvl-kaminari-views.rb
45
+ - lib/dvl-kaminari-views/version.rb
46
+ - script/release
47
+ homepage: http://github.com/dobtco/dvl-kaminari-views
48
+ licenses:
49
+ - MIT
50
+ metadata: {}
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubyforge_project:
67
+ rubygems_version: 2.2.2
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: Integrates Kaminari and dvl-core.
71
+ test_files: []
72
+ has_rdoc: