will_paginate 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95d6a838948c59686c5768a47e8e7e52b99c55868775645285022bc0d7c0e280
4
- data.tar.gz: c92449392a8191a656e19d5e722314a2f2c1c50d646f5d98359b0d8193539dd2
3
+ metadata.gz: 147ccc8d263975ac53363e03b1ac0e8721a0d2dc3384541b12396335063dbdd5
4
+ data.tar.gz: 5dc1129aadadf3d861c99cebd6b664b9becf1113ec97f3ae6c2dfb58531b570d
5
5
  SHA512:
6
- metadata.gz: 4511c22cbbf023ab6e32fc457c487ec393c2fdf6f8a3910ee0c0d8385061a98307b6a8a8f02a25af33f9f648f735c5d20d942412b3a7ff5a40d2d7ba67491917
7
- data.tar.gz: a062b0bce8e25a24b818b926957b98f970e86b79f89fbb1e2cdfbce382a030d02b3f02800cce6dd1671d84d3251e33879095a1bbe669a7348df90a3664be95ec
6
+ metadata.gz: 3ebb1d0564768b4380bd06fceb2f9284065c292812a26c521b401b911bb7561dde76a90ce50024a39a22b63a40fc6f20ebac43364fc989f68bca70f57f39aa20
7
+ data.tar.gz: f021cb3e9fbbc704439323d41e93897f40d536fc2adfa5ee9c9101e56e4f1a65e1ad0c9cb268ed1a4f3d1eb1d485dbe1bf5d4fd7d082a1bef2c914cbb4970970
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  will_paginate is a pagination library that integrates with Ruby on Rails, Sinatra, Hanami::View, and Sequel.
4
4
 
5
5
  ``` ruby
6
- gem 'will_paginate', '~> 3.3'
6
+ gem 'will_paginate', '~> 4.0'
7
7
  ```
8
8
 
9
9
  See [installation instructions][install] on the wiki for more info.
@@ -41,10 +41,10 @@ New in Active Record 3:
41
41
 
42
42
  ``` ruby
43
43
  # paginate in Active Record now returns a Relation
44
- Post.where(:published => true).paginate(:page => params[:page]).order('id DESC')
44
+ Post.where(published: true).paginate(page: params[:page]).order(id: :desc)
45
45
 
46
46
  # the new, shorter page() method
47
- Post.page(params[:page]).order('created_at DESC')
47
+ Post.page(params[:page]).order(created_at: :desc)
48
48
  ```
49
49
 
50
50
  See [the wiki][wiki] for more documentation. [Report bugs][issues] on GitHub.
@@ -2,7 +2,7 @@ module WillPaginate #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 4
4
4
  MINOR = 0
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -103,13 +103,12 @@ module WillPaginate
103
103
  end
104
104
 
105
105
  def tag(name, value, attributes = {})
106
- string_attributes = attributes.inject('') do |attrs, pair|
106
+ string_attributes = attributes.map do |pair|
107
107
  unless pair.last.nil?
108
- attrs << %( #{pair.first}="#{CGI::escapeHTML(pair.last.to_s)}")
108
+ %( #{pair.first}="#{CGI::escapeHTML(pair.last.to_s)}")
109
109
  end
110
- attrs
111
110
  end
112
- "<#{name}#{string_attributes}>#{value}</#{name}>"
111
+ "<#{name}#{string_attributes.compact.join("")}>#{value}</#{name}>"
113
112
  end
114
113
 
115
114
  def rel_value(page)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mislav Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-29 00:00:00.000000000 Z
11
+ date: 2024-06-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: will_paginate provides a simple API for performing paginated queries
14
14
  with Active Record and Sequel, and includes helpers for rendering pagination links
@@ -47,9 +47,9 @@ licenses:
47
47
  - MIT
48
48
  metadata:
49
49
  bug_tracker_uri: https://github.com/mislav/will_paginate/issues
50
- changelog_uri: https://github.com/mislav/will_paginate/releases/tag/v4.0.0
51
- documentation_uri: https://www.rubydoc.info/gems/will_paginate/4.0.0
52
- source_code_uri: https://github.com/mislav/will_paginate/tree/v4.0.0
50
+ changelog_uri: https://github.com/mislav/will_paginate/releases/tag/v4.0.1
51
+ documentation_uri: https://www.rubydoc.info/gems/will_paginate/4.0.1
52
+ source_code_uri: https://github.com/mislav/will_paginate/tree/v4.0.1
53
53
  wiki_uri: https://github.com/mislav/will_paginate/wiki
54
54
  post_install_message:
55
55
  rdoc_options:
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.4.6
72
+ rubygems_version: 3.5.4
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Pagination plugin for web frameworks and other apps