Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jul 3, 2024
2 parents 071699d + 49a8fd8 commit d76d809
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
attributes:
label: 👀 Before submitting...
options:
- label: I upgraded to pagy version 8.6.2
- label: I upgraded to pagy version 8.6.3
required: true
- label: I searched through the [Documentation](https://ddnexus.github.io/pagy/)
required: true
Expand Down
8 changes: 4 additions & 4 deletions .github/latest_release_body.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
- Deprecate the legacy nav bar, add features to the default faster nav bar series
- See the [CHANGELOG](https://ddnexus.github.io/pagy/changelog) for possible breaking changes

### Changes in 8.6.2
### Changes in 8.6.3

<!-- changes start -->
- Fix the legacy size in code and test
- Improve code readability and size check in series
- Fix the old terminology in the demo.ru app
- Add missing DEFAULT[:max_pages] hint to the config/pagy.rb
- Improve activerecord handling in playground apps
- Fix the missing "ar.pagy.aria_label.nav.other" (closes #577)
<!-- changes end -->

[CHANGELOG](https://ddnexus.github.io/pagy/changelog)
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ If you upgrade from version `< 8.0.0` see the following:
`require 'pagy/extras/size` to your `pagy.rb` initalizer for smooth upgrades. (see [size extra](https://ddnexus.github.io/pagy/docs/extras/size))
<hr>

## Version 8.6.3

- Add missing DEFAULT[:max_pages] hint to the config/pagy.rb
- Improve activerecord handling in playground apps
- Fix the missing "ar.pagy.aria_label.nav.other" (closes #577)

## Version 8.6.2

- Fix the legacy size in code and test
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: gem
specs:
pagy (8.6.2)
pagy (8.6.3)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -173,7 +173,7 @@ GEM
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.0)
rack (3.1.4)
rack (3.1.6)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
Expand Down
2 changes: 1 addition & 1 deletion README.md

Large diffs are not rendered by default.

Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion e2e/snapshots.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions gem/apps/calendar.ru
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#5-calendar-app

VERSION = '8.6.2'
VERSION = '8.6.3'

# Gemfile
require 'bundler/inline'
Expand Down Expand Up @@ -70,6 +70,7 @@ Groupdate.time_zone = false
Groupdate.week_start = :monday

# Activerecord initializer
ActiveRecord::Base.logger = Logger.new(OUTPUT)
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: "#{dir}/tmp/calendar.sqlite3")
ActiveRecord::Schema.define do
create_table :events, force: true do |t|
Expand Down Expand Up @@ -735,11 +736,10 @@ TIMES = <<~TIMES
TIMES

# DB seed
events = []
TIMES.each_line(chomp: true).with_index do |time, i|
Event.create(title: "Event ##{i + 1}", time:)
events << { title: "Event ##{i + 1}", time: }
end

# Down here to avoid logging the DB seed above at each restart
ActiveRecord::Base.logger = Logger.new(OUTPUT)
Event.insert_all(events)

run Calendar
2 changes: 1 addition & 1 deletion gem/apps/demo.ru
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#3-demo-app

VERSION = '8.6.2'
VERSION = '8.6.3'

require 'bundler/inline'
require 'bundler'
Expand Down
7 changes: 3 additions & 4 deletions gem/apps/rails.ru
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#2-rails-app

VERSION = '8.6.2'
VERSION = '8.6.3'

# Gemfile
require 'bundler/inline'
Expand Down Expand Up @@ -67,6 +67,8 @@ Pagy::DEFAULT[:items] = 10
Pagy::DEFAULT[:overflow] = :empty_page
Pagy::DEFAULT.freeze

# Activerecord initializer
ActiveRecord::Base.logger = Logger.new(OUTPUT)
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: "#{dir}/tmp/pagy-rails.sqlite3")
ActiveRecord::Schema.define do
create_table :posts, force: true do |t|
Expand Down Expand Up @@ -96,9 +98,6 @@ Post.all.each_with_index do |post, pi|
2.times { |ci| Comment.create(post:, body: "Comment #{ci + 1} to Post #{pi + 1}") }
end

# Down here to avoid logging the DB seed above at each restart
ActiveRecord::Base.logger = Logger.new(OUTPUT)

# Helpers
module CommentsHelper
include Pagy::Frontend
Expand Down
2 changes: 1 addition & 1 deletion gem/apps/repro.ru
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#1-repro-app

VERSION = '8.6.2'
VERSION = '8.6.3'

require 'bundler/inline'
require 'bundler'
Expand Down
2 changes: 1 addition & 1 deletion gem/bin/pagy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

VERSION = '8.6.2'
VERSION = '8.6.3'
APPS = %w[repro rails demo calendar].freeze
LINUX = RbConfig::CONFIG['host_os'].include?('linux')
HOST = '0.0.0.0'
Expand Down
3 changes: 2 additions & 1 deletion gem/config/pagy.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Pagy initializer file (8.6.2)
# Pagy initializer file (8.6.3)
# Customize only what you really need and notice that the core Pagy works also without any of the following lines.
# Should you just cherry pick part of this file, please maintain the require-order of the extras

Expand All @@ -15,6 +15,7 @@
# Pagy::DEFAULT[:ends] = true # default
# Pagy::DEFAULT[:page_param] = :page # default
# Pagy::DEFAULT[:count_args] = [] # example for non AR ORMs
# Pagy::DEFAULT[:max_pages] = 3000 # example


# Extras
Expand Down
2 changes: 1 addition & 1 deletion gem/javascripts/pagy-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const Pagy = (() => {
};
const trim = (a, param) => a.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
return {
version: "8.6.2",
version: "8.6.3",
init(arg) {
const target = arg instanceof Element ? arg : document;
const elements = target.querySelectorAll("[data-pagy]");
Expand Down
4 changes: 2 additions & 2 deletions gem/javascripts/pagy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gem/javascripts/pagy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d76d809

Please sign in to comment.