ruby-grape / grape-swagger-rails

Swagger UI as Rails Engine for grape-swagger gem.
MIT License
252 stars 197 forks source link

Add ostruct to gemspec dependencies #122

Closed padde closed 2 months ago

padde commented 2 months ago

Fixes #121

This gem was historically included in the default gemset. Starting with Ruby 3.3.5 though, requiring ostruct without explicitly adding it as dependency generates the following warning:

warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
Also please contact the author of grape-swagger-rails-0.5.0 to request adding ostruct into its gemspec.
dblock commented 2 months ago

@padde Thanks! Will you please add Ruby 3.3 to CI and make sure it passes? https://github.com/ruby-grape/grape-swagger-rails/blob/master/.github/workflows/test.yml

grape-bot commented 2 months ago
1 Warning
:warning: Unless you're refactoring existing code or improving documentation, please update CHANGELOG.md.
1 Message
:book: We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Here's an example of a CHANGELOG.md entry:

* [#122](https://github.com/ruby-grape/grape-swagger-rails/pull/122): Add ostruct to gemspec dependencies - [@padde](https://github.com/padde).

Generated by :no_entry_sign: Danger

padde commented 2 months ago

Thanks @dblock

I think a lot of specs are failing here because with Rails 7, calling warn on the singleton instance of ActiveSupport::Deprecation is, well... deprecated. See rails/rails#47354

I will first work on that.

dblock commented 2 months ago

Thanks, lmk if you need help. Let's have a matrix with various rails versions eventually too.

padde commented 2 months ago

For reference: https://github.com/ruby-grape/grape-swagger-rails/pull/124

padde commented 2 months ago

@dblock good point about the CI matrix, I did that as well but in a separate PR: https://github.com/ruby-grape/grape-swagger-rails/pull/125

padde commented 2 months ago

And finally, this PR will then fix compatibility with the upcoming Ruby 3.5 release: https://github.com/ruby-grape/grape-swagger-rails/pull/126