-
Notifications
You must be signed in to change notification settings - Fork 17
Add list command #14
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
Add list command #14
Conversation
* We're introducing a "list" method which requires no username argument
* Shout out to @avdi for his awesome RubyTapas! * http://www.rubytapas.com/episodes/29-Redirecting-Output
lib/github/auth/keys_file.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my only area of concern. I don't consider myself incredible with regular expressions, so I'm afraid this might be lacking. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will often include a rubular link that shows how the regex works when I have to do things like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I heard that suggestion on Ruby Rogues... great idea!
* This returns a list of only the github users which have been added to your keys file.
* This will list all the users you've added to your keys file with this gem.
lib/github/auth/keys_file.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, good call 👍 I think we can be even more choosey here and just take non-whitespace characters. Thoughts? Something like:
# http://rubular.com/r/zXCkewmm0i
github\.com\/(\S+)|
@iamvery Awesome, thanks much for making this happen. ✨ Sorry it took a couple weeks for me to have a look. Looking forward to merging this in. I left a few comments. |
* This improves the "flow" of the examples by showing the use of `list` at the point in the example where two users have been added. [chrishunt#14]
* Per the natural flow of the example: 1. Add users 2. List users 3. Remove users 4. List users [chrishunt#14]
|
@chrishunt Yeah man! I'm stoked to help out 😄. No worries on the time. 👍 |
* There is a subtle difference in functionality, but it doesn't affect the implementation here. * See https://github.com/chrishunt/github-auth/pull/14/files#r7122394 for more information. [chrishunt#14]
* There is a subtle difference in functionality, but it doesn't affect the implementation here. * See chrishunt#14 (comment) for more information. [chrishunt#14]
|
@chrishunt fixed up the weird explicit return in the spec helper. Also sorry about the duplicate reference above. I wanted to make sure I got a good link to the code comment for further explanation. Had for force-push an update to get the link right :/ |
|
@iamvery Thank you sir. ⚡ |
I thought it might be useful to see the Github users you've added to your keys file. The idea is that if you pair a lot you may be making lots of changes to your keys file. At some point you think "gosh, what's even in this file anymore?"
What do you think? Is there anything else I need to do per project conventions that I missed?
Thanks for the great tool! 😄