-
Notifications
You must be signed in to change notification settings - Fork 341
extract AuthTokenFile domain object #186
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
Conversation
lib/gist.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 doesn't work on ruby 1.8, or on the standalone script version used by Homebrew. (see rake standalone)
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.
Fixed: 8fc7c7a (lib already added to load path. created lib/gist so requires look like gist/auth_token_file)
* master: 1.8 hash syntax no require_relative
|
Any other comments or suggestions on this refactor? Any concern around the AuthTokenFile being a module vs class? |
|
I would just leave it as methods on the Gist module. Otherwise we'll have to update the I'm not very good at object-orientation, but a module seems fine to me if you don't like that idea. |
|
@ConradIrwin I still think the extraction is worthwhile, but it needn't be in a separate file. Can move the module back to gist.rb |
|
I think this is ready to merge now, and will make the XDG support almost trivial. |
extract AuthTokenFile domain object
|
Looks good to me, thanks for being flexible and patient. The main remaining problem with the XDG stuff is working out how people interpret the spec with regard to auth tokens. |
This refactor centralizes the logic around reading/writing the authentication token file.
It is primarily intended to clean up the code in preparation for XDG standard directory support