Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Feb 15, 2024
2 parents 42b99f8 + 8e6bc7b commit 00f166a
Show file tree
Hide file tree
Showing 238 changed files with 8,417 additions and 6,291 deletions.
2 changes: 1 addition & 1 deletion .github/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GEM=pagy
VERSION=6.4.4
VERSION=7.0.0
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ Before spending time creating a (potentially complex) Pull Request, you can [Con

If you Create A Pull Request, please ensure that the "All checks have passed" indicator gets green light on the Pull Request page (if it's not enabled, a maintainer will enable it for you).

For adding translations of locale dictionary files please follow
the [locales readme instructions here.](https://github.com/ddnexus/pagy/blob/master/lib/locales/README.md).

Thank you!
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/Code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ body:
...at least one of the following code supports reproducing the issue:
options:
- label: |
Simple step by step list that would work in IRB with the [Pagy::Console](https://ddnexus.github.io/pagy/docs/api/console)
Simple step by step list that would work in IRB with the [Pagy::Console](https://ddnexus.github
.io/pagy/docs/api/console) without invoking any external code
- label: |
Plain ruby file that can run as `ruby my-problem.rb`
- label: |
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ contact_links:
- name: Pagy Q&A Discussions
url: https://github.com/ddnexus/pagy/discussions/categories/q-a
about: Ask and answer questions here

4 changes: 2 additions & 2 deletions .github/chore-merge.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Chore PR merge

## Notes for collaborators

Consider the following git graph:

```mermaid
Expand Down Expand Up @@ -35,5 +37,3 @@ The process:
5. If rebased, check tests pass
6. Squash and merge
7. Repeat with the remaining chore PRs


3 changes: 1 addition & 2 deletions .github/gemfiles/default
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ source 'https://rubygems.org'
gem 'i18n'
gem 'oj', require: false # false is for testing with or without it
gem 'rack'
gem 'rackup'
gem 'rake'
gem 'rake-manifest'

group :test do
gem 'activesupport'
gem 'codecov', '>= 0.6', require: false # for some reason only ruby 3.2 install v 0.2 if not explicitly declared
gem 'minitest'
gem 'minitest-reporters'
gem 'rematch'
Expand All @@ -32,4 +32,3 @@ group :apps do
# gem 'slim'
# gem 'haml'
end

72 changes: 38 additions & 34 deletions .github/workflows/pagy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
matrix:
ruby-version: ['3.1', '3.2', '3.3']
fail-fast: false
env:
# Gemfile versions not locked, so tests may fail, forcing us to update the code
BUNDLE_GEMFILE: .github/gemfiles/default

steps:
- uses: actions/checkout@v4
Expand All @@ -45,45 +48,46 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Run Ruby Tests
- name: Check Tests
run: bundle exec rake test

- name: Run Rubocop
- name: Check Coverage # fails unless 100%
run: bundle exec rake check_coverage

- name: Check Rubocop compliance
run: bundle exec rubocop --format github

- name: Check gem manifest
run: bundle exec rake manifest:check


# Temporarily removed: no needed for fixup branch

# e2e_test:
# needs: should_run
# if: ${{ needs.should_run.outputs.should_skip != 'true' }}
# name: E2E Test
# runs-on: ubuntu-latest
# env:
# # absolute path to run sinatra for cypress in e2e working dir
# BUNDLE_GEMFILE: /home/runner/work/pagy/pagy/.github/gemfiles/default
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: '3.2'
# bundler-cache: true
#
# - name: Install Cypress and Test Dependencies
# working-directory: ./e2e
# run: npm i
#
# - name: Run Cypress Tests
# uses: cypress-io/github-action@v6.6.0
# with:
# config: baseUrl=http://0.0.0.0:4567,video=false
# start: bundle exec rackup -D -o 0.0.0.0 -p 4567 pagy_app.ru
# install: false
# wait-on: http://0.0.0.0:4567
# working-directory: e2e
e2e_test:
needs: should_run
if: ${{ needs.should_run.outputs.should_skip != 'true' }}
name: E2E Test
runs-on: ubuntu-latest
env:
# absolute path required to run sinatra for cypress in e2e working dir
BUNDLE_GEMFILE: /home/runner/work/pagy/pagy/.github/gemfiles/default

steps:
- uses: actions/checkout@v4

- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Install Cypress and Test Dependencies
working-directory: ./e2e
run: npm i

- name: Run Cypress Tests
uses: cypress-io/github-action@v6.6.0
with:
config: baseUrl=http://0.0.0.0:4567,video=false
start: bundle exec rackup -D -o 0.0.0.0 -p 4567 pagy_app.ru
install: false
wait-on: http://0.0.0.0:4567
working-directory: e2e
2 changes: 1 addition & 1 deletion .github/workflows/release-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
ruby-version: '3.3'
- run: bundle install

- name: Dotenv Action
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Exception to the gitignore rule:
# /.idea/* should be ignored at the user level,
# but that would remove the saved run configuration for the repoS
# that are quite a few and very useful not only for the author
/.idea/*
!/.idea/runConfigurations
/.bundle/
Expand Down
10 changes: 7 additions & 3 deletions .idea/runConfigurations/Rubocop_autocorrect.xml

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

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

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

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

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

20 changes: 20 additions & 0 deletions .idea/runConfigurations/update_top100.xml

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

2 changes: 1 addition & 1 deletion .idea/runConfigurations/version_bump_sh.xml

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

14 changes: 13 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require:

# trying to be good O:)
AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.1
NewCops: enable
Exclude:
# '___' prefixed dirs are excluded
Expand All @@ -27,6 +27,8 @@ Layout/ExtraSpacing:
Enabled: true
AllowBeforeTrailingComments:
Enabled: true
Exclude:
- test/**/*

Layout/EmptyLines:
Exclude:
Expand All @@ -41,10 +43,16 @@ Layout/EndAlignment:
Layout/HashAlignment:
Enabled: false

Layout/ClosingParenthesisIndentation:
Enabled: false

# bad for performance
Metrics:
Enabled: false

Naming/VariableNumber:
CheckSymbols: false

# not cool
Style/CommentedKeyword:
Enabled: false
Expand All @@ -56,6 +64,10 @@ Style/RedundantInitialize:
Exclude:
- test/mock_helpers/arel.rb

# Please!
Style/StringConcatenation:
Enabled: false

# these cops are disabled only in the test files in order to
# allow to copy and paste the failed output for test reconciliation
Style/StringLiterals:
Expand Down
29 changes: 29 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# frozen_string_literal: true

SimpleCov.formatter = if ENV['COVERAGE_REPORT'] == 'true'
SimpleCov::Formatter::HTMLFormatter
else
SimpleCov::Formatter::SimpleFormatter
end

SimpleCov.start do
command_name "Task##{$PROCESS_ID}" # best way to get a different id for the specific task
merge_timeout 60
enable_coverage :branch

add_group 'All Extras', %w[lib/pagy/extras]
add_group 'Core', %w[lib/pagy.rb
lib/pagy/backend.rb
lib/pagy/console.rb
lib/pagy/countless.rb
lib/pagy/exceptions.rb
lib/pagy/frontend.rb
lib/pagy/i18n.rb
lib/pagy/url_helpers.rb]
add_group 'Countless', %w[lib/pagy/countless.rb
lib/pagy/extras/countless.rb]
add_group 'Calendar', %w[lib/pagy/extras/calendar.rb
lib/pagy/calendar]
# add_filter "/test/"
add_group 'Tests', %w[test]
end
Loading

0 comments on commit 00f166a

Please sign in to comment.