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

Incorrect Gemspec for Rails version? #13

Open
hle-skillz opened this issue May 10, 2022 · 4 comments
Open

Incorrect Gemspec for Rails version? #13

hle-skillz opened this issue May 10, 2022 · 4 comments

Comments

@hle-skillz
Copy link

I think this makes your gem require at minimum Rails 5.2:

spec.add_runtime_dependency 'rails', '~> 5.2.0'

Contrary to the README that says it should support 5.0, 5.1, 5.2.

Based on docs:

The specifier ~> has a special meaning, best shown by example. ~> 2.0.3 is identical to >= 2.0.3 and < 2.1. ~> 2.1 is identical to >= 2.1 and < 3.0. ~> 2.2.beta will match prerelease versions like 2.2.beta.12. ~> 0 is identical to >= 0.0 and < 1.0.

I think you want:

spec.add_runtime_dependency 'rails', '~> 5.0' 
@hle-skillz hle-skillz changed the title Incorrect Gemspec for Rails version Incorrect Gemspec for Rails version? May 10, 2022
@hle-skillz
Copy link
Author

Darn, never mind looks like aeac860 added flush_idle_connections which did not exist in 5.1.7 so this gem no longer supports Rails 5.0 or 5.1.

@hle-skillz
Copy link
Author

@hsgubert Would it be viable to guard flush_idle_connections with a respond_to? to support older Rails?

@hsgubert
Copy link
Owner

Hello @hle-skillz, I believe this gem has past versions (properly that support Rails 5.0 and 5.1.
I'm not sure if it is so easy to make a version that works for all versions.

Are you sure this is the only thing that needs to be changed? We might need to compare with previous versions that supported rails 5.0 and 5.1

@hle-skillz
Copy link
Author

hle-skillz commented May 12, 2022

In the release that bumped gemspec dependency to Rails 5.2 I only see the flush addition:
aeac860

but I guess respond_to? flush_idle_connections would only let you move this back to 5.1:

spec.add_runtime_dependency 'rails', '~> 5.1' 

It'd be much more difficult to track any breaking changes against 5.0... and it looks like that might've been a breaking change: 3552ba0#diff-b98f5a9c3ac583929bb3f59e62847c56ac72ff86182f5b6dddc5be9ec88aec7cR41

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

No branches or pull requests

2 participants