Skip to content

Commit

Permalink
Update pagy requirement from >= 6, < 9 to >= 6, < 10 (#548)
Browse files Browse the repository at this point in the history
Updates the requirements on [pagy](https://github.com/ddnexus/pagy) to
permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ddnexus/pagy/releases">pagy's
releases</a>.</em></p>
<blockquote>
<h2>Version 9.0.5</h2>
<!-- raw HTML omitted -->
<h3>✴ What's new in 9.0+ ✴</h3>
<ul>
<li>Wicked-fast <a
href="https://ddnexus.github.io/pagy/docs/api/keyset/">Keyset
Pagination</a> for big data! It works with
<code>ActiveRecord::Relation</code> and <code>Sequel::Dataset</code>
sets.</li>
<li>More <a href="https://ddnexus.github.io/pagy/playground/">Playground
Apps</a> to showcase, clone and develop pagy APPs without any setup on
your side</li>
<li>Lots of refactorings and optimizations</li>
<li>See the <a
href="https://ddnexus.github.io/pagy/changelog">Changelog</a> for
possible breaking changes</li>
</ul>
<!-- raw HTML omitted -->
<h3>Changes in 9.0.5</h3>
<!-- raw HTML omitted -->
<ul>
<li>Fix for missing variables passed to pagy_anchor from pagy_nav
(closes <a
href="https://redirect.github.com/ddnexus/pagy/issues/728">#728</a>)</li>
</ul>
<!-- raw HTML omitted -->
<p><a href="https://ddnexus.github.io/pagy/changelog">CHANGELOG</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md">pagy's
changelog</a>.</em></p>
<blockquote>
<h2>Version 9.0.5</h2>
<ul>
<li>Fix for missing variables passed to pagy_anchor from pagy_nav
(closes <a
href="https://redirect.github.com/ddnexus/pagy/issues/728">#728</a>)</li>
</ul>
<h2>Version 9.0.4</h2>
<ul>
<li>Fix groupdate timezone error on certain machines/config</li>
<li>Fix gem containing tmp files</li>
</ul>
<h2>Version 9.0.3</h2>
<ul>
<li>Remove legacy and unused javascript files</li>
<li>Improve pagy_get_page with force_integer option</li>
<li>Fix jsonapi with keyset</li>
<li>Complete the internal refactoring of version 9:
<ul>
<li>Remove the pagy*_get_vars methods now useless</li>
<li>Use to_i on the page variable for the search extras</li>
</ul>
</li>
</ul>
<h2>Version 9.0.2</h2>
<ul>
<li>Rename and document the link header to pagy_link_header</li>
<li>Add first and next url helpers to the keyset extra; add the keyset
section to config/pagy.rb</li>
<li>Fix nil page in keyset URL not overriding the params page</li>
<li>Extracted shared method</li>
</ul>
<h2>Version 9.0.1</h2>
<ul>
<li>Fix countless executing the count query</li>
<li>Rename row_comparison &gt; tuple_comparison; ignore mixed
orders</li>
</ul>
<h2>Version 9.0.0</h2>
<h3>Breaking Changes</h3>
<h4>Dropped support for deprecated stuff</h4>
<ul>
<li>The <code>foundation</code>, <code>materialize</code>,
<code>semantic</code> and <code>uikit</code> CSS extras have been
removed:
(See the <a
href="https://github.com/ddnexus/pagy/discussions/672#discussioncomment-9212328">reasons</a>)</li>
<li><strong>Javascript renamed files</strong>
<ul>
<li><code>pagy.js</code>: use <code>pagy.min.js</code></li>
<li><code>pagy-module.js</code>: use <code>pagy.mjs</code></li>
<li><code>pagy-dev.js</code>: use the <code>pagy.min.js</code>with the
<code>pagy.min.js.map</code></li>
<li><code>pagy-module.d.ts</code>: use <code>pagy.d.ts</code></li>
</ul>
</li>
<li>The Array type for the <code>:size</code> (e.g. <code>size: [1, 4,
4, 1]</code>) that generates the classic bar is not supported anymore:
use the
<code>:size</code> set to an integer with the <code>ends: true</code>
variable (which are the default since 8.4.6). If a legacy bar remains
REALLY
a requirement, add <code>require 'pagy/extras/size</code> to your
<code>pagy.rb</code> initalizer. (See the
<a href="https://ddnexus.github.io/pagy/docs/extras/size">size
extra</a>)</li>
</ul>
<h4>Simple renaming</h4>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ddnexus/pagy/commit/2f351fc5cdf3aefeeca83035d968934971a4150d"><code>2f351fc</code></a>
Merge branch 'dev'</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/50447222a53e66ccb4bf34d88a429903ab82d585"><code>5044722</code></a>
Version 9.0.5</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/4a0193e66ac58bc5c7cb1b2798461339e2a60682"><code>4a0193e</code></a>
Update gems</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/4ba0e86f1ff2c3786c23360a8e23c8a0c6ec6133"><code>4ba0e86</code></a>
Fix for missing variables passed to pagy_anchor from pagy_nav
(closes</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/32f3945bf234aea23a7bd9e03da932c5e4639e49"><code>32f3945</code></a>
Merge branch 'dev'</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/4e48daed15fe87b1ebfd4b38e40e1a96fcde3527"><code>4e48dae</code></a>
Version 9.0.4</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/0b4b3488c1aea4bbab6b1fe0d5a81dcd9de656cc"><code>0b4b348</code></a>
Improve bump script</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/1c0fcaf9a437d6aa0f6d8e56cfe4f36eb3c262cd"><code>1c0fcaf</code></a>
Fix groupdate timezone error on certain machines/config</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/931e0d85e0be7a34d409088a2ba6eb398073c548"><code>931e0d8</code></a>
Fix gem containing tmp files</li>
<li><a
href="https://github.com/ddnexus/pagy/commit/78949dac431ced0ad5d51c8a62c6bda37fdc934b"><code>78949da</code></a>
Merge branch 'dev'</li>
<li>Additional commits viewable in <a
href="https://github.com/ddnexus/pagy/compare/6.0.0...9.0.5">compare
view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>
  • Loading branch information
peteryates authored Aug 13, 2024
2 parents ada743c + 57465fd commit 9551f85
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion govuk-components.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.files = Dir["{app,config,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]

spec.add_dependency("html-attributes-utils", "~> 1.0.0", ">= 1.0.0")
spec.add_dependency("pagy", ">= 6", "< 9")
spec.add_dependency("pagy", ">= 6", "< 10")
spec.add_dependency("view_component", ">= 3.9", "< 3.13")

spec.add_development_dependency "deep_merge"
Expand Down
2 changes: 1 addition & 1 deletion guide/lib/examples/pagination_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def pagination_lots_of_pages

def pagination_lots_of_pages_data
<<~PAGINATION_DATA
{ pagy: Pagy.new(count: 100, page: 9, size: [1, 1, 1, 1], items: 5) }
{ pagy: Pagy.new(count: 100, page: 9, size: [1, 1, 1, 1], limit: 5) }
PAGINATION_DATA
end

Expand Down
1 change: 1 addition & 0 deletions lib/govuk/components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
require "govuk/components/engine"
require "html_attributes_utils"
require "pagy"
require "pagy/extras/size"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

RSpec.describe(GovukComponent::PaginationComponent, type: :component) do
let(:pagy) { Pagy.new(page: 2, count: 20, items: 5, size: [1, 1, 1, 1]) }
let(:pagy) { Pagy.new(page: 2, count: 20, limit: 5, size: [1, 1, 1, 1]) }
let(:kwargs) { { pagy: } }

describe "configuration" do
Expand Down
4 changes: 2 additions & 2 deletions spec/components/govuk_component/pagination_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

RSpec.describe(GovukComponent::PaginationComponent, type: :component) do
let(:count) { 30 }
let(:items) { 5 }
let(:limit) { 5 }
let(:size) { [1, 2, 2, 1] }
let(:defaults) { { count:, items:, size: } }
let(:defaults) { { count:, limit:, size: } }
let(:current_page) { 2 }
let(:pagy) { Pagy.new(page: current_page, **defaults) }
let(:component_css_class) { 'govuk-pagination' }
Expand Down

0 comments on commit 9551f85

Please sign in to comment.