Skip to content

add Faraday#Deprecate to 1.x - #1438

Merged
iMacTia merged 6 commits into
lostisland:1.xfrom
hyuraku:1.x_/add-Faraday#Deprecate
Aug 8, 2022
Merged

add Faraday#Deprecate to 1.x#1438
iMacTia merged 6 commits into
lostisland:1.xfrom
hyuraku:1.x_/add-Faraday#Deprecate

Conversation

@hyuraku

@hyuraku hyuraku commented Aug 4, 2022

Copy link
Copy Markdown
Contributor

Description

add Faraday#Deprecate to hide deprecate method's warning message

Fixes #1410

Todos

List any remaining work that needs to be done, i.e:

  • Tests
  • Documentation

Additional Notes

@iMacTia iMacTia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for bringing this back @hyuraku.
There are some changes that I wouldn't expect in this PR, please see my comment below.
Do you also think you could add some test coverage to check the warnings are correctly output when the skip is disabled?

Comment thread lib/faraday/error.rb Outdated
Comment thread lib/faraday/deprecate.rb Outdated
Comment thread lib/faraday/deprecate.rb Outdated
@iMacTia

iMacTia commented Aug 5, 2022

Copy link
Copy Markdown
Member

Thank you for addressing all the comments @hyuraku 🙌!
Are you planning to add unit tests as well as I mentioned above?

Do you also think you could add some test coverage to check the warnings are correctly output when the skip is disabled?

@hyuraku

hyuraku commented Aug 5, 2022

Copy link
Copy Markdown
Contributor Author

@iMacTia

check the warnings are correctly output when the skip is disabled?

I want to add the test when the skip is disabled? to spec/faraday/connection_spec.rb.

@iMacTia

iMacTia commented Aug 5, 2022

Copy link
Copy Markdown
Member

Or better, a generic test around the Faraday::Deprecate#deprecate method 👍!
If we know that works as expected (e.g. with an anonymous class defined in the specs), we don't need to test it everywhere we use it

@iMacTia iMacTia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realised we can now remove the require from error.rb as well

Comment thread lib/faraday/error.rb Outdated
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'faraday/deprecate'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary anymore 🙌 !

@hyuraku

hyuraku commented Aug 6, 2022

Copy link
Copy Markdown
Contributor Author

@iMacTia
I added the spec for Faraday::Deprecate#deprecate; could you review this PR?

@hyuraku hyuraku changed the title add Faraday#Deprecate add Faraday#Deprecate to 1.x Aug 6, 2022

@iMacTia iMacTia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work @hyuraku and great test coverage 💯👏
The rubocop offence is unrelated to the PR itself, I'll test this locally and merge if all tests are passing 👍

@iMacTia

iMacTia commented Aug 8, 2022

Copy link
Copy Markdown
Member

All tests pass locally ✅ 🎉

@kyrofa

kyrofa commented Aug 9, 2022

Copy link
Copy Markdown

Thank you both!

@kenichi-sonoda kenichi-sonoda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, mistake

please delete this message🙏

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

Successfully merging this pull request may close these issues.

4 participants