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

Rails7にあげるとwarningが出るようになった #64

Closed
akichim21 opened this issue May 17, 2022 · 7 comments
Closed

Rails7にあげるとwarningが出るようになった #64

akichim21 opened this issue May 17, 2022 · 7 comments

Comments

@akichim21
Copy link

  • Rails7にあげるとwarningが出るようになりました。
/usr/local/bundle/gems/autodoc-0.7.6/lib/autodoc/document.rb:30: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.

/usr/local/bundle/gems/autodoc-0.7.6/lib/autodoc/document.rb:30: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

DEPRECATION WARNING: Rails 7.1 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead. (called from load at /usr/local/bundle/bin/rspec:25)

@r7kamura
Copy link
Owner

ありがとうございます。

なるほど。この辺が怪しい気がしますね。

when request.try(:content_type) == "multipart/form-data"
"multipart/form-data"

@r7kamura
Copy link
Owner

r7kamura commented May 17, 2022

@akichim21 次のPull Requestを用意してみたんですが、このブランチのバージョンのautodocで警告が出ないかどうか試せますか?Pull Requestの画面に表示されているように、feature/media-type ブランチのコードで試せます。

gem 'autodoc', github: 'r7kamura/autodoc', branch: 'feature/media-type'

Gemfileをこういう感じに変えて、bundle install すると試せるようになると思います。

@akichim21
Copy link
Author

ご対応ありがとうございます。
1つwarningが消えたようです。

/usr/local/bundle/bundler/gems/autodoc-ffb709c7a2f4/lib/autodoc/document.rb:30: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.

/usr/local/bundle/bundler/gems/autodoc-ffb709c7a2f4/lib/autodoc/document.rb:30: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

@r7kamura
Copy link
Owner

@akichim21 おお、ありがとうございます。

次のPull Requestの feature/erb というブランチで残りの警告にも対処してみたのですが、こちらはどうでしょう?

gem 'autodoc', github: 'r7kamura/autodoc', branch: 'feature/erb'

@akichim21
Copy link
Author

修正されたことを確認しました。
迅速な対応ありがとうございます!

@r7kamura
Copy link
Owner

こちらこそ助かりました。
では上のPull RequestもMergeして、新しいバージョンをリリースしようと思います 👍

@r7kamura
Copy link
Owner

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