simi / omniauth-facebook

Facebook OAuth2 Strategy for OmniAuth
https://simi.github.io/omniauth-facebook/
1.26k stars 403 forks source link

Silence Ruby 2.5 and Minitest 6 deprecation warnings #294

Closed niels closed 4 years ago

niels commented 6 years ago

Running the test suite in Ruby 2.5 yields a number of warnings:

Run options: --seed 11386

# Running:

../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
..../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
.../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
.../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/lib/omniauth/strategies/facebook.rb:79: warning: instance variable @authorization_code_from_signed_request_in_cookie not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
/home/niels/Projects/omniauth-facebook/lib/omniauth/strategies/facebook.rb:79: warning: instance variable @authorization_code_from_signed_request_in_cookie not initialized
./home/niels/Projects/omniauth-facebook/lib/omniauth/strategies/facebook.rb:79: warning: instance variable @authorization_code_from_signed_request_in_cookie not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
DEPRECATED: Use assert_nil if expecting nil from /home/niels/Projects/omniauth-facebook/test/strategy_test.rb:455. This will fail in Minitest 6.
....../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
......../home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
./home/niels/Projects/omniauth-facebook/test/helper.rb:48: warning: instance variable @options not initialized
.

Finished in 0.080105s, 911.2988 runs/s, 1435.6077 assertions/s.

73 runs, 115 assertions, 0 failures, 0 errors, 0 skips

This PR removes all of them.

simi commented 6 years ago

Thx for your PR! I still see some warnings for 2.5 (probably unrelated to our codebase) with this patch applied. Do you have any idea what can be the reason @niels?

niels commented 6 years ago

@simi Can you paste the warnings? I'm seeing none:

$ rake test                               
Run options: --seed 59522

# Running:

.........................................................................

Finished in 0.081911s, 891.2146 runs/s, 1403.9681 assertions/s.

73 runs, 115 assertions, 0 failures, 0 errors, 0 skips
simi commented 6 years ago

ahh, bundle update fixed that

niels commented 6 years ago

Good idea on the attr_accessor. PR updated (and also rebased).

Extending the test suite is out of scope for this PR, however. I have instead submitted an additional PR at https://github.com/mkdynamic/omniauth-facebook/pull/299. (It's based on master but the two PRs can be merged together without conflicts.)

simi commented 5 years ago

Hello @niels, thanks for this PR again. I did https://github.com/mkdynamic/omniauth-facebook/pull/331 based on your pull request. Feel free to check and close this one.

github-actions[bot] commented 4 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.