Skip to content
New issue

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

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

Already on GitHub? # to your account

Lib comaptibility w/ v1 and v2? #26

Closed
pboling opened this issue Dec 1, 2023 · 3 comments
Closed

Lib comaptibility w/ v1 and v2? #26

pboling opened this issue Dec 1, 2023 · 3 comments
Milestone

Comments

@pboling
Copy link

pboling commented Dec 1, 2023

When I use a "legacy" gemfile in this project I see the following when updating the bundle:

Using rack 2.2.8 (was 3.0.8)
Using rack-session 1.0.1 (was 2.0.0)

That is as expected.

I have this at the top of my spec_helper.rb, which is documented as the correct usage in the README.md of both the stable-v1 branch and the main branch:

require 'rack/session'

But when I run tests I get an error:

❯ BUNDLE_GEMFILE=gemfiles/legacy.gemfile bundle exec rspec spec

An error occurred while loading ./spec/lib/omniauth/strategies/jwt_spec.rb.
Failure/Error: require 'rack/session'

LoadError:
  cannot load such file -- rack/session
# ./spec/spec_helper.rb:5:in `<top (required)>'
# ./spec/lib/omniauth/strategies/jwt_spec.rb:1:in `<top (required)>'
@dentarg
Copy link
Contributor

dentarg commented Dec 1, 2023

This is expected. See #15

@pboling
Copy link
Author

pboling commented Dec 1, 2023

If that's the case (and it is, see also) then the README is misleading. It claims to be compatible, yet the instruction in the readme, require "rack/session" only works for one of those versions. It doesn't work with v1.

Ideally v1 could ship with a dummy NO-OP file there so we can use the same code in libraries targetting compatibility with both versions.

pboling added a commit to pboling/rack-session that referenced this issue Dec 1, 2023
pboling added a commit to pboling/omniauth-jwt2 that referenced this issue Dec 1, 2023
ioquatix pushed a commit that referenced this issue Dec 1, 2023
@pboling pboling closed this as completed Dec 2, 2023
@ioquatix
Copy link
Member

ioquatix commented Dec 2, 2023

Released in v1.0.2.

@ioquatix ioquatix added this to the v1.0.2 milestone Dec 2, 2023
pboling added a commit to pboling/omniauth-jwt2 that referenced this issue Dec 6, 2023
…v2 (#6)

* 🐛 Fix compatibility with omniauth v1 & v2, rack v2 & v3, rack-session v1 & v2

- Ref: rack/rack-session#26

* 👷 Add ancient build for Ruby 2.2 & 2.3

* 💚 Better handling of ancient ruby scenario

* 💚 Ancient ruby support

* ✨ Support Ruby 2.2 & 2.3
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants