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

Remove anonymous support due to deprecation. #280

Merged
merged 4 commits into from
May 23, 2018

Conversation

estebanz01
Copy link
Contributor

@estebanz01 estebanz01 commented May 18, 2018

Fixes #275

This change is needed due to the deprecation warning/removal made by Github on the gist tool. See https://blog.github.com/2018-02-18-deprecation-notice-removing-anonymous-gist-creation/ for more info.

  • Move this check to the start so that if you do gist --anonymous it immediately fails without waiting for you to type a gist.
  • Also handle the case where the user has not yet logged in (You can test this by removing the file ~/.gist)
  • Remove the --anonymous option from the documentation.

Fixes defunkt#275

This change is needed due to the deprecation warning/removal made
by Github on the gist tool. See https://blog.github.com/2018-02-18-deprecation-notice-removing-anonymous-gist-creation/
for more info.
@estebanz01
Copy link
Contributor Author

pinging @rking and @ConradIrwin for review 😀

lib/gist.rb Outdated
@@ -127,7 +127,8 @@ def multi_gist(files, options={})

existing_gist = options[:update].to_s.split("/").last
if options[:anonymous]
access_token = nil
raise 'Anonymous gist support has been removed by Github. ' \
'See: https://blog.github.com/2018-02-18-deprecation-notice-removing-anonymous-gist-creation/'
Copy link
Collaborator

Choose a reason for hiding this comment

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

@estebanz01 Thanks for this — can we make this error explain to the user what to do about it?

raise 'Please log in with `gist --login`. (Github now requires credentials to gist https://bit.ly/2GBBxKw)'

@ConradIrwin
Copy link
Collaborator

@estebanz01 Thanks for your help! I'd like to fix this properly, could you please:

  • Move this check to the start so that if you do gist --anonymous it immediately fails without waiting for you to type a gist.
  • Also handle the case where the user has not yet logged in (You can test this by removing the file ~/.gist)
  • Remove the --anonymous option from the documentation.

Let me know if you need any help.

@estebanz01
Copy link
Contributor Author

Feedback addressed @ConradIrwin. Can you take another pass ? Thanks 👀

@ConradIrwin ConradIrwin merged commit 9e63eed into defunkt:master May 23, 2018
@ConradIrwin
Copy link
Collaborator

Thanks! released as gist 5.0.0

@estebanz01 estebanz01 deleted the issue-275 branch May 23, 2018 14:03
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.

2 participants