google-auth-library-ruby icon indicating copy to clipboard operation
google-auth-library-ruby copied to clipboard

suppress annoying warning

Open mohamedhafez opened this issue 1 year ago • 2 comments

This solves https://github.com/googleapis/google-auth-library-ruby/issues/424 for now. The issue has been open for over a year, so I'm guessing nobody has the bandwidth to fix it. This will keep it from spamming log files in the meantime

mohamedhafez avatar May 25 '24 01:05 mohamedhafez

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/

Unfortunately silence_warnings is a Rails-ism and not available in plain Ruby.

dazuma avatar Jun 10 '24 17:06 dazuma

module_function on an attr_accessor effectively just makes it private, ~so this should be fixed by moving the attr_accessor into a private section~

EDIT:

Making it private might not be the intended outcome. If this is meant to also be accessible on the module, then perhaps it should be:

mattr_accessor :default_connection
attr_accessor :default_connection

module_function

def connection
#...

Otherwise I think the module_function should just be removed entirely

danini-the-panini avatar Jan 10 '25 09:01 danini-the-panini

see #519

viacheslav-rostovtsev avatar Feb 15 '25 04:02 viacheslav-rostovtsev

We merged #519.

dazuma avatar Feb 19 '25 19:02 dazuma