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
warning: method redefined; discarding old management_console_endpoint #671
Comments
@pvdb one of those modules provides the configurable Octokit settings (available both as module-level and instance-level settings), the other provides the default values for those settings. In this case, we may be able to call Thoughts @gjtorikian? |
I believe we can go even simpler. Here's a diff that shuffles the attribute from diff --git a/lib/octokit/configurable.rb b/lib/octokit/configurable.rb
index a377523..b97a6c0 100644
--- a/lib/octokit/configurable.rb
+++ b/lib/octokit/configurable.rb
@@ -49,10 +49,10 @@ module Octokit
attr_accessor :access_token, :auto_paginate, :client_id,
:client_secret, :default_media_type, :connection_options,
- :management_console_endpoint, :management_console_password,
+ :management_console_password,
:middleware, :netrc, :netrc_file,
:per_page, :proxy, :user_agent
- attr_writer :password, :web_endpoint, :api_endpoint, :login
+ attr_writer :password, :web_endpoint, :api_endpoint, :management_console_endpoint, :login
class << self This, including the separate With this diff the warning goes away. It looks like |
Awesome, that should work. 👍 |
There's something really funky going on with the
management_console_endpoint
method, which is defined in two places:Octokit::Default.management_console_endpoint
Octokit::Configurable#management_console_endpoint
To illustrate the issue:
I can't say I understand the (TBH quite convoluted) code, but once I do I'll issue a PR, as one of the two versions is most likely superfluous and/or unused.
The text was updated successfully, but these errors were encountered: