Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagy 8 support #65

Merged
merged 5 commits into from
Aug 7, 2024
Merged

Pagy 8 support #65

merged 5 commits into from
Aug 7, 2024

Conversation

jasl
Copy link
Contributor

@jasl jasl commented Apr 3, 2024

This PR mixed a few of things:

  • Loosen requirement to support Pagy 8
  • Fix typo
  • Slightly restructure file organization
  • bump version
  • Add Ruby 3.3 to the CI matrix

pagy_cursor.gemspec Outdated Show resolved Hide resolved
@@ -1,3 +0,0 @@
module PagyCursor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrate this constant to pagy_cursor.rb for simplicity.
I can revert the change.

The PR was my personal hack originally, so combine a few of off-topic changes

@jasl
Copy link
Contributor Author

jasl commented Apr 8, 2024

BTW, this branch works for my projects, but I don't know why rake spec has problem

/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

An error occurred while loading spec_helper.
Failure/Error: require "rails/test_help"

NoMethodError:
  undefined method `config' for nil
# ./spec/spec_helper.rb:4:in `<top (required)>'
No examples found.


Finished in 0.00002 seconds (files took 0.63226 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

@Uysim
Copy link
Owner

Uysim commented Apr 8, 2024

BTW, this branch works for my projects, but I don't know why rake spec has problem

/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

An error occurred while loading spec_helper.
Failure/Error: require "rails/test_help"

NoMethodError:
  undefined method `config' for nil
# ./spec/spec_helper.rb:4:in `<top (required)>'
No examples found.


Finished in 0.00002 seconds (files took 0.63226 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

The error is here.
In gemspec we just need version. But after this change we require the whole library. Which will cause error for the first bundle.
For your case, you have install dependencies since before the code break. So you will be fine.

@jasl
Copy link
Contributor Author

jasl commented Apr 8, 2024

BTW, this branch works for my projects, but I don't know why rake spec has problem

/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

An error occurred while loading spec_helper.
Failure/Error: require "rails/test_help"

NoMethodError:
  undefined method `config' for nil
# ./spec/spec_helper.rb:4:in `<top (required)>'
No examples found.


Finished in 0.00002 seconds (files took 0.63226 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

The error is here. In gemspec we just need version. But after this change we require the whole library. Which will cause error for the first bundle. For your case, you have install dependencies since before the code break. So you will be fine.

I added back version.rb, but it still got the error. My project uses Ruby 3.3 with Rails 7.1 without issues.

@jasl
Copy link
Contributor Author

jasl commented Apr 8, 2024

interesting... only Ruby 3.3 with Rails 7.1 failed

@Uysim Uysim merged commit 4e57eaf into Uysim:master Aug 7, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants