will_paginate 2.3.11 → 2.3.12

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.
@@ -1,3 +1,32 @@
1
+ = 2.3.12, released 2009-12-01
2
+
3
+ * make view helpers "HTML safe" for Rails 2.3.5 with rails_xss plugin
4
+
5
+ = 2.3.11, released 2009-06-02
6
+
7
+ * fix `enable_actionpack`
8
+
9
+ = 2.3.10, released 2009-05-21
10
+
11
+ * count_by_sql: don't use table alias with any adapters starting with "oracle"
12
+ * Add back "AS count_table" alias to `paginate_by_sql` counter SQL
13
+
14
+ = 2.3.9, released 2009-05-29
15
+
16
+ * remove "AS count_table" alias from `paginate_by_sql` counter SQL
17
+ * Rails 2.3.2 compat: monkeypatch Rails issue #2189 (count breaks has_many :through)
18
+ * fix generation of page URLs that contain the "@" character
19
+ * check for method existance in a ruby 1.8- and 1.9-compatible way
20
+ * load will_paginate view helpers even if ActiveRecord is not loaded
21
+
22
+ == 2.3.8, released 2009-03-09
23
+
24
+ * Rails 2.3 compat: query parameter parsing with Rack
25
+
26
+ == 2.3.7, released 2009-02-09
27
+
28
+ * Removed all unnecessary &block variables since they cause serious memory damage and lots of subsequent gc runs.
29
+
1
30
  == 2.3.6, released 2008-10-26
2
31
 
3
32
  * Rails 2.2 fix: stop using `extract_attribute_names_from_match` inernal AR method, it no longer exists
@@ -2,7 +2,7 @@ module WillPaginate
2
2
  module VERSION
3
3
  MAJOR = 2
4
4
  MINOR = 3
5
- TINY = 11
5
+ TINY = 12
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -182,7 +182,11 @@ module WillPaginate
182
182
  ]
183
183
  end
184
184
  end
185
-
185
+
186
+ if respond_to? :safe_helper
187
+ safe_helper :will_paginate, :paginated_section, :page_entries_info
188
+ end
189
+
186
190
  def self.total_pages_for_collection(collection) #:nodoc:
187
191
  if collection.respond_to?('page_count') and !collection.respond_to?('total_pages')
188
192
  WillPaginate::Deprecation.warn %{
@@ -29,11 +29,8 @@ end
29
29
 
30
30
  # Wrap tests that use Mocha and skip if unavailable.
31
31
  def uses_mocha(test_name)
32
- unless Object.const_defined?(:Mocha)
33
- gem 'mocha', '>= 0.9.5'
34
- require 'mocha'
35
- end
36
- rescue LoadError => load_error
32
+ require 'mocha'
33
+ rescue LoadError
37
34
  $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
38
35
  else
39
36
  yield
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.11
4
+ version: 2.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Mislav Marohni\xC4\x87"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-02 00:00:00 +02:00
13
+ date: 2010-01-19 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -25,17 +25,7 @@ extra_rdoc_files:
25
25
  - LICENSE
26
26
  - CHANGELOG.rdoc
27
27
  files:
28
- - CHANGELOG.rdoc
29
- - LICENSE
30
- - README.rdoc
31
28
  - Rakefile
32
- - examples/apple-circle.gif
33
- - examples/index.haml
34
- - examples/index.html
35
- - examples/pagination.css
36
- - examples/pagination.sass
37
- - init.rb
38
- - lib/will_paginate.rb
39
29
  - lib/will_paginate/array.rb
40
30
  - lib/will_paginate/collection.rb
41
31
  - lib/will_paginate/core_ext.rb
@@ -44,6 +34,7 @@ files:
44
34
  - lib/will_paginate/named_scope_patch.rb
45
35
  - lib/will_paginate/version.rb
46
36
  - lib/will_paginate/view_helpers.rb
37
+ - lib/will_paginate.rb
47
38
  - test/boot.rb
48
39
  - test/collection_test.rb
49
40
  - test/console
@@ -68,6 +59,9 @@ files:
68
59
  - test/lib/view_test_process.rb
69
60
  - test/tasks.rake
70
61
  - test/view_test.rb
62
+ - README.rdoc
63
+ - LICENSE
64
+ - CHANGELOG.rdoc
71
65
  has_rdoc: true
72
66
  homepage: http://github.com/mislav/will_paginate/wikis
73
67
  licenses: []
@@ -76,7 +70,6 @@ post_install_message:
76
70
  rdoc_options:
77
71
  - --main
78
72
  - README.rdoc
79
- - --inline-source
80
73
  - --charset=UTF-8
81
74
  require_paths:
82
75
  - lib
@@ -98,29 +91,6 @@ rubyforge_project:
98
91
  rubygems_version: 1.3.5
99
92
  signing_key:
100
93
  specification_version: 3
101
- summary: Most awesome pagination solution for Rails
102
- test_files:
103
- - test/boot.rb
104
- - test/collection_test.rb
105
- - test/console
106
- - test/database.yml
107
- - test/finder_test.rb
108
- - test/fixtures/admin.rb
109
- - test/fixtures/developer.rb
110
- - test/fixtures/developers_projects.yml
111
- - test/fixtures/project.rb
112
- - test/fixtures/projects.yml
113
- - test/fixtures/replies.yml
114
- - test/fixtures/reply.rb
115
- - test/fixtures/schema.rb
116
- - test/fixtures/topic.rb
117
- - test/fixtures/topics.yml
118
- - test/fixtures/user.rb
119
- - test/fixtures/users.yml
120
- - test/helper.rb
121
- - test/lib/activerecord_test_case.rb
122
- - test/lib/activerecord_test_connector.rb
123
- - test/lib/load_fixtures.rb
124
- - test/lib/view_test_process.rb
125
- - test/tasks.rake
126
- - test/view_test.rb
94
+ summary: Pagination for Rails
95
+ test_files: []
96
+
Binary file
@@ -1,69 +0,0 @@
1
- !!!
2
- %html
3
- %head
4
- %title Samples of pagination styling for will_paginate
5
- %link{ :rel => 'stylesheet', :type => 'text/css', :href => 'pagination.css' }
6
- %style{ :type => 'text/css' }
7
- :sass
8
- html
9
- :margin 0
10
- :padding 0
11
- :background #999
12
- :font normal 76% "Lucida Grande", Verdana, Helvetica, sans-serif
13
- body
14
- :margin 2em
15
- :padding 2em
16
- :border 2px solid gray
17
- :background white
18
- :color #222
19
- h1
20
- :font-size 2em
21
- :font-weight normal
22
- :margin 0 0 1em 0
23
- h2
24
- :font-size 1.4em
25
- :margin 1em 0 .5em 0
26
- pre
27
- :font-size 13px
28
- :font-family Monaco, "DejaVu Sans Mono", "Bitstream Vera Mono", "Courier New", monospace
29
-
30
- - pagination = '<span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>'
31
- - pagination_no_page_links = '<span class="disabled prev_page">&laquo; Previous</span> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>'
32
-
33
- %body
34
- %h1 Samples of pagination styling for will_paginate
35
- %p
36
- Find these styles in <b>"examples/pagination.css"</b> of <i>will_paginate</i> library.
37
- There is a Sass version of it for all you sassy people.
38
- %p
39
- Read about good rules for pagination:
40
- %a{ :href => 'http://kurafire.net/log/archive/2007/06/22/pagination-101' } Pagination 101
41
- %p
42
- %em Warning:
43
- page links below don't lead anywhere (so don't click on them).
44
-
45
- %h2 Unstyled pagination <span style="font-weight:normal">(<i>ewww!</i>)</span>
46
- %div= pagination
47
-
48
- %h2 Digg.com
49
- .digg_pagination= pagination
50
-
51
- %h2 Digg-style, no page links
52
- .digg_pagination= pagination_no_page_links
53
- %p Code that renders this:
54
- %pre= '<code>%s</code>' % %[<%= will_paginate @posts, :page_links => false %>].gsub('<', '&lt;').gsub('>', '&gt;')
55
-
56
- %h2 Digg-style, extra content
57
- .digg_pagination
58
- .page_info Displaying entries <b>1&nbsp;-&nbsp;6</b> of <b>180</b> in total
59
- = pagination
60
- %p Code that renders this:
61
- %pre= '<code>%s</code>' % %[<div class="digg_pagination">\n <div clas="page_info">\n <%= page_entries_info @posts %>\n </div>\n <%= will_paginate @posts, :container => false %>\n</div>].gsub('<', '&lt;').gsub('>', '&gt;')
62
-
63
- %h2 Apple.com store
64
- .apple_pagination= pagination
65
-
66
- %h2 Flickr.com
67
- .flickr_pagination
68
- = pagination
69
- .page_info (118 photos)
@@ -1,92 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html>
3
- </html>
4
- <head>
5
- <title>Samples of pagination styling for will_paginate</title>
6
- <link href='pagination.css' rel='stylesheet' type='text/css' />
7
- <style type='text/css'>
8
- html {
9
- margin: 0;
10
- padding: 0;
11
- background: #999;
12
- font: normal 76% "Lucida Grande", Verdana, Helvetica, sans-serif; }
13
-
14
- body {
15
- margin: 2em;
16
- padding: 2em;
17
- border: 2px solid gray;
18
- background: white;
19
- color: #222; }
20
-
21
- h1 {
22
- font-size: 2em;
23
- font-weight: normal;
24
- margin: 0 0 1em 0; }
25
-
26
- h2 {
27
- font-size: 1.4em;
28
- margin: 1em 0 .5em 0; }
29
-
30
- pre {
31
- font-size: 13px;
32
- font-family: Monaco, "DejaVu Sans Mono", "Bitstream Vera Mono", "Courier New", monospace; }
33
- </style>
34
- </head>
35
- <body>
36
- <h1>Samples of pagination styling for will_paginate</h1>
37
- <p>
38
- Find these styles in <b>"examples/pagination.css"</b> of <i>will_paginate</i> library.
39
- There is a Sass version of it for all you sassy people.
40
- </p>
41
- <p>
42
- Read about good rules for pagination:
43
- <a href='http://kurafire.net/log/archive/2007/06/22/pagination-101'>Pagination 101</a>
44
- </p>
45
- <p>
46
- <em>Warning:</em>
47
- page links below don't lead anywhere (so don't click on them).
48
- </p>
49
- <h2>
50
- Unstyled pagination <span style="font-weight:normal">(<i>ewww!</i>)</span>
51
- </h2>
52
- <div>
53
- <span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>
54
- </div>
55
- <h2>Digg.com</h2>
56
- <div class='digg_pagination'>
57
- <span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>
58
- </div>
59
- <h2>Digg-style, no page links</h2>
60
- <div class='digg_pagination'>
61
- <span class="disabled prev_page">&laquo; Previous</span> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>
62
- </div>
63
- <p>Code that renders this:</p>
64
- <pre>
65
- <code>&lt;%= will_paginate @posts, :page_links =&gt; false %&gt;</code>
66
- </pre>
67
- <h2>Digg-style, extra content</h2>
68
- <div class='digg_pagination'>
69
- <div class='page_info'>
70
- Displaying entries <b>1&nbsp;-&nbsp;6</b> of <b>180</b> in total
71
- </div>
72
- <span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>
73
- </div>
74
- <p>Code that renders this:</p>
75
- <pre>
76
- <code>&lt;div class="digg_pagination"&gt;
77
- &lt;div clas="page_info"&gt;
78
- &lt;%= page_entries_info @posts %&gt;
79
- &lt;/div&gt;
80
- &lt;%= will_paginate @posts, :container =&gt; false %&gt;
81
- &lt;/div&gt;</code>
82
- </pre>
83
- <h2>Apple.com store</h2>
84
- <div class='apple_pagination'>
85
- <span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>
86
- </div>
87
- <h2>Flickr.com</h2>
88
- <div class='flickr_pagination'>
89
- <span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>
90
- <div class='page_info'>(118 photos)</div>
91
- </div>
92
- </body>
@@ -1,90 +0,0 @@
1
- .digg_pagination {
2
- background: white;
3
- /* self-clearing method: */ }
4
- .digg_pagination a, .digg_pagination span {
5
- padding: .2em .5em;
6
- display: block;
7
- float: left;
8
- margin-right: 1px; }
9
- .digg_pagination span.disabled {
10
- color: #999;
11
- border: 1px solid #DDD; }
12
- .digg_pagination span.current {
13
- font-weight: bold;
14
- background: #2E6AB1;
15
- color: white;
16
- border: 1px solid #2E6AB1; }
17
- .digg_pagination a {
18
- text-decoration: none;
19
- color: #105CB6;
20
- border: 1px solid #9AAFE5; }
21
- .digg_pagination a:hover, .digg_pagination a:focus {
22
- color: #003;
23
- border-color: #003; }
24
- .digg_pagination .page_info {
25
- background: #2E6AB1;
26
- color: white;
27
- padding: .4em .6em;
28
- width: 22em;
29
- margin-bottom: .3em;
30
- text-align: center; }
31
- .digg_pagination .page_info b {
32
- color: #003;
33
- background: #6aa6ed;
34
- padding: .1em .25em; }
35
- .digg_pagination:after {
36
- content: ".";
37
- display: block;
38
- height: 0;
39
- clear: both;
40
- visibility: hidden; }
41
- * html .digg_pagination {
42
- height: 1%; }
43
- *:first-child+html .digg_pagination {
44
- overflow: hidden; }
45
-
46
- .apple_pagination {
47
- background: #F1F1F1;
48
- border: 1px solid #E5E5E5;
49
- text-align: center;
50
- padding: 1em; }
51
- .apple_pagination a, .apple_pagination span {
52
- padding: .2em .3em; }
53
- .apple_pagination span.disabled {
54
- color: #AAA; }
55
- .apple_pagination span.current {
56
- font-weight: bold;
57
- background: transparent url(apple-circle.gif) no-repeat 50% 50%; }
58
- .apple_pagination a {
59
- text-decoration: none;
60
- color: black; }
61
- .apple_pagination a:hover, .apple_pagination a:focus {
62
- text-decoration: underline; }
63
-
64
- .flickr_pagination {
65
- text-align: center;
66
- padding: .3em; }
67
- .flickr_pagination a, .flickr_pagination span {
68
- padding: .2em .5em; }
69
- .flickr_pagination span.disabled {
70
- color: #AAA; }
71
- .flickr_pagination span.current {
72
- font-weight: bold;
73
- color: #FF0084; }
74
- .flickr_pagination a {
75
- border: 1px solid #DDDDDD;
76
- color: #0063DC;
77
- text-decoration: none; }
78
- .flickr_pagination a:hover, .flickr_pagination a:focus {
79
- border-color: #003366;
80
- background: #0063DC;
81
- color: white; }
82
- .flickr_pagination .page_info {
83
- color: #aaa;
84
- padding-top: .8em; }
85
- .flickr_pagination .prev_page, .flickr_pagination .next_page {
86
- border-width: 2px; }
87
- .flickr_pagination .prev_page {
88
- margin-right: 1em; }
89
- .flickr_pagination .next_page {
90
- margin-left: 1em; }
@@ -1,91 +0,0 @@
1
- .digg_pagination
2
- :background white
3
- a, span
4
- :padding .2em .5em
5
- :display block
6
- :float left
7
- :margin-right 1px
8
- span.disabled
9
- :color #999
10
- :border 1px solid #DDD
11
- span.current
12
- :font-weight bold
13
- :background #2E6AB1
14
- :color white
15
- :border 1px solid #2E6AB1
16
- a
17
- :text-decoration none
18
- :color #105CB6
19
- :border 1px solid #9AAFE5
20
- &:hover, &:focus
21
- :color #003
22
- :border-color #003
23
- .page_info
24
- :background #2E6AB1
25
- :color white
26
- :padding .4em .6em
27
- :width 22em
28
- :margin-bottom .3em
29
- :text-align center
30
- b
31
- :color #003
32
- :background = #2E6AB1 + 60
33
- :padding .1em .25em
34
-
35
- /* self-clearing method:
36
- &:after
37
- :content "."
38
- :display block
39
- :height 0
40
- :clear both
41
- :visibility hidden
42
- * html &
43
- :height 1%
44
- *:first-child+html &
45
- :overflow hidden
46
-
47
- .apple_pagination
48
- :background #F1F1F1
49
- :border 1px solid #E5E5E5
50
- :text-align center
51
- :padding 1em
52
- a, span
53
- :padding .2em .3em
54
- span.disabled
55
- :color #AAA
56
- span.current
57
- :font-weight bold
58
- :background transparent url(apple-circle.gif) no-repeat 50% 50%
59
- a
60
- :text-decoration none
61
- :color black
62
- &:hover, &:focus
63
- :text-decoration underline
64
-
65
- .flickr_pagination
66
- :text-align center
67
- :padding .3em
68
- a, span
69
- :padding .2em .5em
70
- span.disabled
71
- :color #AAA
72
- span.current
73
- :font-weight bold
74
- :color #FF0084
75
- a
76
- :border 1px solid #DDDDDD
77
- :color #0063DC
78
- :text-decoration none
79
- &:hover, &:focus
80
- :border-color #003366
81
- :background #0063DC
82
- :color white
83
- .page_info
84
- :color #aaa
85
- :padding-top .8em
86
- .prev_page, .next_page
87
- :border-width 2px
88
- .prev_page
89
- :margin-right 1em
90
- .next_page
91
- :margin-left 1em
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require 'will_paginate'