pagy-cursor icon indicating copy to clipboard operation
pagy-cursor copied to clipboard

Pagy 8 support

Open jasl opened this issue 1 year ago • 4 comments

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

jasl avatar Apr 03 '24 14:04 jasl

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

jasl avatar Apr 08 '24 06:04 jasl

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.

Uysim avatar Apr 08 '24 07:04 Uysim

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 avatar Apr 08 '24 07:04 jasl

interesting... only Ruby 3.3 with Rails 7.1 failed

jasl avatar Apr 08 '24 09:04 jasl