will_paginate_renderers 0.0.1
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.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +35 -0
- data/LICENSE +20 -0
- data/README.md +42 -0
- data/Rakefile +12 -0
- data/autotest/discover.rb +1 -0
- data/lib/will_paginate_renderers/gmail.rb +83 -0
- data/lib/will_paginate_renderers/twitter.rb +34 -0
- data/lib/will_paginate_renderers/version.rb +3 -0
- data/lib/will_paginate_renderers.rb +37 -0
- data/spec/spec_helper.rb +56 -0
- data/spec/will_paginate_renderers/gmail_spec.rb +119 -0
- data/spec/will_paginate_renderers/twitter_spec.rb +54 -0
- data/will_paginate_renderers.gemspec +26 -0
- metadata +144 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
will_paginate_renderers (0.0.1)
|
5
|
+
will_paginate (= 3.0.pre2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
diff-lcs (1.1.2)
|
11
|
+
mocha (0.9.8)
|
12
|
+
rake
|
13
|
+
rake (0.8.7)
|
14
|
+
rspec (2.0.1)
|
15
|
+
rspec-core (~> 2.0.1)
|
16
|
+
rspec-expectations (~> 2.0.1)
|
17
|
+
rspec-mocks (~> 2.0.1)
|
18
|
+
rspec-core (2.0.1)
|
19
|
+
rspec-expectations (2.0.1)
|
20
|
+
diff-lcs (>= 1.1.2)
|
21
|
+
rspec-mocks (2.0.1)
|
22
|
+
rspec-core (~> 2.0.1)
|
23
|
+
rspec-expectations (~> 2.0.1)
|
24
|
+
will_paginate (3.0.pre2)
|
25
|
+
yard (0.6.1)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
mocha (~> 0.9)
|
32
|
+
rspec (~> 2.0.0)
|
33
|
+
will_paginate (= 3.0.pre2)
|
34
|
+
will_paginate_renderers!
|
35
|
+
yard
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 rspeicher
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Will Paginate Renderers
|
2
|
+
|
3
|
+
A collection of custom renderers for use with the
|
4
|
+
[will_paginate](http://github.com/mislav/will_paginate) view helper.
|
5
|
+
|
6
|
+
## Renderers Provided
|
7
|
+
|
8
|
+
### Gmail
|
9
|
+
|
10
|
+

|
11
|
+
|
12
|
+
### Twitter
|
13
|
+
|
14
|
+

|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
will_paginate_renderers requires the development version of will_paginate,
|
19
|
+
which is currently 3.0.pre2
|
20
|
+
|
21
|
+
### Rails 3
|
22
|
+
|
23
|
+
**Gemfile**
|
24
|
+
|
25
|
+
gem 'will_paginate_renderers'
|
26
|
+
|
27
|
+
**Views**
|
28
|
+
|
29
|
+
# Use the Twitter renderer
|
30
|
+
will_paginate(@posts, :renderer => WillPaginateRenderers::Twitter.new)
|
31
|
+
|
32
|
+
## Note on Patches/Pull Requests
|
33
|
+
|
34
|
+
* Fork
|
35
|
+
* Code
|
36
|
+
* Commit
|
37
|
+
* Push
|
38
|
+
* Pull Request
|
39
|
+
|
40
|
+
## Copyright
|
41
|
+
|
42
|
+
Copyright (c) 2010 Robert Speicher. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Autotest.add_discovery { "rspec2" }
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module WillPaginateRenderers
|
2
|
+
# = Gmail
|
3
|
+
#
|
4
|
+
# A custom WillPaginate link renderer that emulates the Gmail-style
|
5
|
+
# Oldest, Older, (info), Newer, Newest links
|
6
|
+
#
|
7
|
+
# == Customization
|
8
|
+
#
|
9
|
+
# Changing the labels:
|
10
|
+
# WillPaginateRenderers.pagination_options[:gmail_newest_label] = "Newest"
|
11
|
+
# WillPaginateRenderers.pagination_options[:gmail_newer_label] = "Newer"
|
12
|
+
# WillPaginateRenderers.pagination_options[:gmail_older_label] = "Older"
|
13
|
+
# WillPaginateRenderers.pagination_options[:gmail_oldest_label] = "Oldest"
|
14
|
+
#
|
15
|
+
# Changing the CSS class of the links:
|
16
|
+
# WillPaginateRenderers.pagination_options[:gmail_newest_class] = 'newest'
|
17
|
+
# WillPaginateRenderers.pagination_options[:gmail_newer_class] = 'newer'
|
18
|
+
# WillPaginateRenderers.pagination_options[:gmail_older_class] = 'older'
|
19
|
+
# WillPaginateRenderers.pagination_options[:gmail_oldest_class] = 'oldest'
|
20
|
+
# WillPaginateRenderers.pagination_options[:gmail_window_class] = 'window'
|
21
|
+
#
|
22
|
+
# == Option Defaults
|
23
|
+
#
|
24
|
+
# * +gmail_newest_label+: "« Newest"
|
25
|
+
# * +gmail_newer_label+: "< Newer"
|
26
|
+
# * +gmail_older_label+: "Older >"
|
27
|
+
# * +gmail_oldest_label+: "Oldest »"
|
28
|
+
# * +gmail_newest_class+: "gmail_newest"
|
29
|
+
# * +gmail_newer_class+: "gmail_newer"
|
30
|
+
# * +gmail_older_class+: "gmail_older"
|
31
|
+
# * +gmail_oldest_class+: "gmail_oldest"
|
32
|
+
# * +gmail:window_class+: "gmail_window"
|
33
|
+
class Gmail < ::WillPaginate::ViewHelpers::LinkRenderer
|
34
|
+
def pagination
|
35
|
+
[:newest, :newer, :window, :older, :oldest]
|
36
|
+
end
|
37
|
+
|
38
|
+
protected
|
39
|
+
|
40
|
+
def newest
|
41
|
+
return unless @collection.current_page > 2
|
42
|
+
|
43
|
+
previous_or_next_page(1,
|
44
|
+
WillPaginateRenderers.pagination_options[:gmail_newest_label],
|
45
|
+
WillPaginateRenderers.pagination_options[:gmail_newest_class])
|
46
|
+
end
|
47
|
+
|
48
|
+
def newer
|
49
|
+
return unless @collection.previous_page
|
50
|
+
|
51
|
+
previous_or_next_page(@collection.previous_page,
|
52
|
+
WillPaginateRenderers.pagination_options[:gmail_newer_label],
|
53
|
+
WillPaginateRenderers.pagination_options[:gmail_newer_class])
|
54
|
+
end
|
55
|
+
|
56
|
+
def older
|
57
|
+
return unless @collection.next_page
|
58
|
+
|
59
|
+
previous_or_next_page(@collection.next_page,
|
60
|
+
WillPaginateRenderers.pagination_options[:gmail_older_label],
|
61
|
+
WillPaginateRenderers.pagination_options[:gmail_older_class])
|
62
|
+
end
|
63
|
+
|
64
|
+
def oldest
|
65
|
+
return unless @collection.current_page < @collection.total_pages - 1
|
66
|
+
|
67
|
+
previous_or_next_page(@collection.total_pages,
|
68
|
+
WillPaginateRenderers.pagination_options[:gmail_oldest_label],
|
69
|
+
WillPaginateRenderers.pagination_options[:gmail_oldest_class])
|
70
|
+
end
|
71
|
+
|
72
|
+
# Renders the "x - y of z" text
|
73
|
+
def window
|
74
|
+
base = @collection.offset
|
75
|
+
high = base + @collection.per_page
|
76
|
+
high = @collection.total_entries if high > @collection.total_entries
|
77
|
+
|
78
|
+
# TODO: What's the best way to allow customization of this text, particularly "of"?
|
79
|
+
tag(:span, " #{base + 1} - #{high} of #{@collection.total_entries} ",
|
80
|
+
:class => WillPaginateRenderers.pagination_options[:gmail_window_class])
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module WillPaginateRenderers
|
2
|
+
# = Twitter
|
3
|
+
#
|
4
|
+
# A custom WillPaginate link renderer that emulates the Twitter style
|
5
|
+
# "More" link.
|
6
|
+
#
|
7
|
+
# == Customization
|
8
|
+
#
|
9
|
+
# Changing the label:
|
10
|
+
# WillPaginateRenderers.pagination_options[:twitter_label] = "View More"
|
11
|
+
#
|
12
|
+
# Changing the CSS class of the link:
|
13
|
+
# WillPaginateRenderers.pagination_options[:twitter_class] = 'custom_css'
|
14
|
+
#
|
15
|
+
# == Option Defaults
|
16
|
+
#
|
17
|
+
# * +twitter_label+: "More"
|
18
|
+
# * +twitter_class+: +twitter_pagination+
|
19
|
+
class Twitter < ::WillPaginate::ViewHelpers::LinkRenderer
|
20
|
+
def pagination
|
21
|
+
[:next_page]
|
22
|
+
end
|
23
|
+
|
24
|
+
protected
|
25
|
+
|
26
|
+
def next_page
|
27
|
+
return unless @collection.next_page
|
28
|
+
|
29
|
+
previous_or_next_page(@collection.next_page,
|
30
|
+
WillPaginateRenderers.pagination_options[:twitter_label],
|
31
|
+
WillPaginateRenderers.pagination_options[:twitter_class])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'will_paginate/view_helpers/link_renderer'
|
2
|
+
|
3
|
+
# = Will Paginate Renderers
|
4
|
+
#
|
5
|
+
# A collection of custom renderers for the +will_paginate+ helper.
|
6
|
+
#
|
7
|
+
# == Renderers
|
8
|
+
#
|
9
|
+
# === Gmail
|
10
|
+
#
|
11
|
+
# Oldest/Older and Newer/Newest links as needed, as well as
|
12
|
+
# "(start) - (end) of (total)" text.
|
13
|
+
#
|
14
|
+
# === Twitter
|
15
|
+
#
|
16
|
+
# A single "More" button when there are more results in the collection.
|
17
|
+
module WillPaginateRenderers
|
18
|
+
autoload :Gmail, 'will_paginate_renderers/gmail'
|
19
|
+
autoload :Twitter, 'will_paginate_renderers/twitter'
|
20
|
+
|
21
|
+
def self.pagination_options() @pagination_options; end
|
22
|
+
def self.pagination_options=(value) @pagination_options = value; end
|
23
|
+
self.pagination_options = {
|
24
|
+
:twitter_label => 'More',
|
25
|
+
:twitter_class => 'twitter_pagination',
|
26
|
+
|
27
|
+
:gmail_newest_label => "« Newest",
|
28
|
+
:gmail_newer_label => "< Newer",
|
29
|
+
:gmail_older_label => "Older >",
|
30
|
+
:gmail_oldest_label => "Oldest »",
|
31
|
+
:gmail_newest_class => "gmail_newest",
|
32
|
+
:gmail_newer_class => "gmail_newer",
|
33
|
+
:gmail_older_class => "gmail_older",
|
34
|
+
:gmail_oldest_class => "gmail_oldest",
|
35
|
+
:gmail_window_class => "gmail_window",
|
36
|
+
}
|
37
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
$:.unshift(File.expand_path('../../lib', __FILE__))
|
2
|
+
|
3
|
+
require 'will_paginate_renderers'
|
4
|
+
|
5
|
+
require 'will_paginate/collection'
|
6
|
+
require 'will_paginate/view_helpers/base'
|
7
|
+
|
8
|
+
# Copied from will_paginate's spec_helper
|
9
|
+
module MyExtras
|
10
|
+
protected
|
11
|
+
|
12
|
+
def collection(params = {})
|
13
|
+
if params[:total_pages]
|
14
|
+
params[:per_page] = 1
|
15
|
+
params[:total_entries] = params[:total_pages]
|
16
|
+
end
|
17
|
+
WillPaginate::Collection.new(params[:page] || 1, params[:per_page] || 30, params[:total_entries])
|
18
|
+
end
|
19
|
+
|
20
|
+
def have_deprecation
|
21
|
+
DeprecationMatcher.new
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# Copied from will_paginate's spec_helper
|
26
|
+
class DeprecationMatcher
|
27
|
+
def initialize
|
28
|
+
@old_behavior = WillPaginate::Deprecation.behavior
|
29
|
+
@messages = []
|
30
|
+
WillPaginate::Deprecation.behavior = lambda { |message, callstack|
|
31
|
+
@messages << message
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def matches?(block)
|
36
|
+
block.call
|
37
|
+
!@messages.empty?
|
38
|
+
ensure
|
39
|
+
WillPaginate::Deprecation.behavior = @old_behavior
|
40
|
+
end
|
41
|
+
|
42
|
+
def failure_message
|
43
|
+
"expected block to raise a deprecation warning"
|
44
|
+
end
|
45
|
+
|
46
|
+
def negative_failure_message
|
47
|
+
"expected block not to raise deprecation warnings, #{@messages.size} raised"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
RSpec.configure do |c|
|
52
|
+
c.mock_with :mocha
|
53
|
+
|
54
|
+
c.include(WillPaginate::ViewHelpers::Base)
|
55
|
+
c.include(MyExtras)
|
56
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module WillPaginateRenderers
|
4
|
+
describe Gmail do
|
5
|
+
before do
|
6
|
+
@renderer = Gmail.new
|
7
|
+
@renderer.stubs(:url).returns('')
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should raise error when unprepared" do
|
11
|
+
expect { @renderer.send :param_name }.to raise_error
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should prepare with collection and options" do
|
15
|
+
prepare({}, :param_name => 'mypage')
|
16
|
+
@renderer.send(:current_page).should eql(1)
|
17
|
+
@renderer.send(:param_name).should eql('mypage')
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should have total_pages accessor" do
|
21
|
+
prepare :total_pages => 42
|
22
|
+
expect { @renderer.send(:total_pages).should eql(42) }.to_not have_deprecation
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should have pagination definition" do
|
26
|
+
prepare({ :total_pages => 1 }, :page_links => true)
|
27
|
+
@renderer.pagination.should eql([:newest, :newer, :window, :older, :oldest])
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should be empty when no more pages" do
|
31
|
+
prepare(:total_pages => 1)
|
32
|
+
@renderer.stubs(:window).returns('')
|
33
|
+
@renderer.to_html.should eql("")
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should not have 'newest' or 'newer', but should have 'older' and 'oldest' when on page 1" do
|
37
|
+
prepare({:total_pages => 10, :page => 1})
|
38
|
+
|
39
|
+
html = @renderer.to_html
|
40
|
+
html.should_not match(/Newer/)
|
41
|
+
html.should_not match(/Newest/)
|
42
|
+
html.should match(/Older/)
|
43
|
+
html.should match(/Oldest/)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should have 'newer', 'older' and 'oldest' but not 'newest' when on page 2" do
|
47
|
+
prepare({:total_pages => 10, :page => 2})
|
48
|
+
|
49
|
+
html = @renderer.to_html
|
50
|
+
html.should match(/Newer/)
|
51
|
+
html.should_not match(/Newest/)
|
52
|
+
html.should match(/Older/)
|
53
|
+
html.should match(/Oldest/)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should not have 'older' or 'oldest' when on the last page" do
|
57
|
+
prepare({:total_pages => 10, :page => 10})
|
58
|
+
|
59
|
+
html = @renderer.to_html
|
60
|
+
html.should match(/Newest/)
|
61
|
+
html.should match(/Newer/)
|
62
|
+
html.should_not match(/Older/)
|
63
|
+
html.should_not match(/Oldest/)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should have 'older' but not 'oldest' when on second to last page" do
|
67
|
+
prepare({:total_pages => 10, :page => 9})
|
68
|
+
|
69
|
+
html = @renderer.to_html
|
70
|
+
html.should match(/Newest/)
|
71
|
+
html.should match(/Newer/)
|
72
|
+
html.should match(/Older/)
|
73
|
+
html.should_not match(/Oldest/)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should have the correct window text when on page 1" do
|
77
|
+
prepare({:per_page => 100, :total_entries => 895, :page => 1})
|
78
|
+
@renderer.to_html.should match(/1 - 100 of 895/)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should have the correct window text on page 2" do
|
82
|
+
prepare({:per_page => 100, :total_entries => 895, :page => 2})
|
83
|
+
@renderer.to_html.should match(/101 - 200 of 895/)
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should have the correct window text on the last page" do
|
87
|
+
prepare({:per_page => 100, :total_entries => 895, :page => 9})
|
88
|
+
@renderer.to_html.should match(/801 - 895 of 895/)
|
89
|
+
end
|
90
|
+
|
91
|
+
context "options" do
|
92
|
+
before do
|
93
|
+
prepare({:per_page => 100, :total_entries => 895, :page => 5})
|
94
|
+
|
95
|
+
%w(newest newer older oldest).each do |name|
|
96
|
+
WillPaginateRenderers.pagination_options[:"gmail_#{name}_label"] = "custom_#{name}_label"
|
97
|
+
WillPaginateRenderers.pagination_options[:"gmail_#{name}_class"] = "custom_#{name}_class"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
subject { @renderer.to_html }
|
102
|
+
|
103
|
+
it { should match(/custom_newest_label/) }
|
104
|
+
it { should match(/custom_newer_label/) }
|
105
|
+
it { should match(/custom_older_label/) }
|
106
|
+
it { should match(/custom_oldest_label/) }
|
107
|
+
it { should match(/custom_newest_class/) }
|
108
|
+
it { should match(/custom_newer_class/) }
|
109
|
+
it { should match(/custom_older_class/) }
|
110
|
+
it { should match(/custom_oldest_class/) }
|
111
|
+
end
|
112
|
+
|
113
|
+
protected
|
114
|
+
|
115
|
+
def prepare(collection_options, options = {})
|
116
|
+
@renderer.prepare(collection(collection_options), options, '')
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module WillPaginateRenderers
|
4
|
+
describe Twitter do
|
5
|
+
before do
|
6
|
+
@renderer = Twitter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should raise error when unprepared" do
|
10
|
+
expect { @renderer.send :param_name }.to raise_error
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should prepare with collection and options" do
|
14
|
+
prepare({}, :param_name => 'mypage')
|
15
|
+
@renderer.send(:current_page).should eql(1)
|
16
|
+
@renderer.send(:param_name).should eql('mypage')
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should have total_pages accessor" do
|
20
|
+
prepare :total_pages => 42
|
21
|
+
expect { @renderer.send(:total_pages).should eql(42) }.to_not have_deprecation
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should have pagination definition" do
|
25
|
+
prepare({ :total_pages => 1 }, :page_links => true)
|
26
|
+
@renderer.pagination.should eql([:next_page])
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should be empty when no more pages" do
|
30
|
+
prepare(:total_pages => 1)
|
31
|
+
@renderer.to_html.should eql("")
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should use the :twitter_label option" do
|
35
|
+
WillPaginateRenderers.pagination_options[:twitter_label] = 'Custom Label'
|
36
|
+
prepare :total_pages => 2
|
37
|
+
@renderer.expects(:url).returns('')
|
38
|
+
@renderer.to_html.should match(/Custom Label/)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should use the :twitter_class option" do
|
42
|
+
WillPaginateRenderers.pagination_options[:twitter_class] = 'custom_class'
|
43
|
+
prepare :total_pages => 2
|
44
|
+
@renderer.expects(:url).returns('')
|
45
|
+
@renderer.to_html.should match(/custom_class/)
|
46
|
+
end
|
47
|
+
|
48
|
+
protected
|
49
|
+
|
50
|
+
def prepare(collection_options, options = {})
|
51
|
+
@renderer.prepare(collection(collection_options), options, '')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "will_paginate_renderers/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "will_paginate_renderers"
|
7
|
+
s.version = WillPaginateRenderers::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ['Robert Speicher']
|
10
|
+
s.email = ['rspeicher@gmail.com']
|
11
|
+
s.homepage = "http://rubygems.org/gems/will_paginate_renderers"
|
12
|
+
s.summary = %q{A collection of renderers for use with will_paginate}
|
13
|
+
s.description = %q{A collection of renderers for use with will_paginate.}
|
14
|
+
|
15
|
+
s.rubyforge_project = "will_paginate_renderers"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
|
22
|
+
s.add_dependency "will_paginate", "3.0.pre2"
|
23
|
+
s.add_development_dependency "mocha", "~> 0.9"
|
24
|
+
s.add_development_dependency "rspec", "~> 2.0.0"
|
25
|
+
s.add_development_dependency "yard"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: will_paginate_renderers
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Robert Speicher
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-10-23 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: will_paginate
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - "="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: -1876988247
|
30
|
+
segments:
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
- pre2
|
34
|
+
version: 3.0.pre2
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: mocha
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 25
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 9
|
49
|
+
version: "0.9"
|
50
|
+
type: :development
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: rspec
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 15
|
61
|
+
segments:
|
62
|
+
- 2
|
63
|
+
- 0
|
64
|
+
- 0
|
65
|
+
version: 2.0.0
|
66
|
+
type: :development
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: yard
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
type: :development
|
81
|
+
version_requirements: *id004
|
82
|
+
description: A collection of renderers for use with will_paginate.
|
83
|
+
email:
|
84
|
+
- rspeicher@gmail.com
|
85
|
+
executables: []
|
86
|
+
|
87
|
+
extensions: []
|
88
|
+
|
89
|
+
extra_rdoc_files: []
|
90
|
+
|
91
|
+
files:
|
92
|
+
- .gitignore
|
93
|
+
- Gemfile
|
94
|
+
- Gemfile.lock
|
95
|
+
- LICENSE
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- autotest/discover.rb
|
99
|
+
- lib/will_paginate_renderers.rb
|
100
|
+
- lib/will_paginate_renderers/gmail.rb
|
101
|
+
- lib/will_paginate_renderers/twitter.rb
|
102
|
+
- lib/will_paginate_renderers/version.rb
|
103
|
+
- spec/spec_helper.rb
|
104
|
+
- spec/will_paginate_renderers/gmail_spec.rb
|
105
|
+
- spec/will_paginate_renderers/twitter_spec.rb
|
106
|
+
- will_paginate_renderers.gemspec
|
107
|
+
has_rdoc: true
|
108
|
+
homepage: http://rubygems.org/gems/will_paginate_renderers
|
109
|
+
licenses: []
|
110
|
+
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
hash: 3
|
122
|
+
segments:
|
123
|
+
- 0
|
124
|
+
version: "0"
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
none: false
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
hash: 3
|
131
|
+
segments:
|
132
|
+
- 0
|
133
|
+
version: "0"
|
134
|
+
requirements: []
|
135
|
+
|
136
|
+
rubyforge_project: will_paginate_renderers
|
137
|
+
rubygems_version: 1.3.7
|
138
|
+
signing_key:
|
139
|
+
specification_version: 3
|
140
|
+
summary: A collection of renderers for use with will_paginate
|
141
|
+
test_files:
|
142
|
+
- spec/spec_helper.rb
|
143
|
+
- spec/will_paginate_renderers/gmail_spec.rb
|
144
|
+
- spec/will_paginate_renderers/twitter_spec.rb
|