-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remote API discussion #2
Comments
Not entirely sure it'll make much difference. Since sawyer is just http lib, bitbucket support is not precluded. However, one way to make # instead of passing `path` and performing `Dir.glob` inside, we do it outside
files = Dir.glob(File.join(path, "*".freeze))
news = Whatsnew.about files
# wrap the necessary "raw" data from elsewhere
files = GithubRepoFilesWrapper.new client.contents("jollygoodcode/whatsnew")
news = Whatsnew.about files |
Ah sure!
I guess this is a design preference for the entry point to a public api. Usually for utility class like this, I like to have one class method (like this The So in this case, the user can use this method very easily like
In this way, then it's also similar to the command line utility which is exposed:
|
Thanks for bringing this concern to discussion. 🙇 👍 for the idea of For Instead of passing the octokit client in, let's make it generic that the interface will accept any array of objects which each object respond to certain messages. See |
Yes it is. Also, is a question of scope: where does a utility start; where does it end?
the point is not to support them explicitly. an open interface allows for app-level code to be written without going through here. If the lib decide to take on responsibility to perform imho ruby landscape has too many overreaching libs, and would be better if we have smaller, composable utils that does lesser things. |
Am thinking that from the dependency injection angle (I hope I am using this correctly),
that the remote API might look better like this?
So the client is passed in as an object. In the future, maybe can extend to BitBucket?
Otherwise the code is right now coupled to
Sawyer::Resource
.wdyt?
Great work btw! :)
The text was updated successfully, but these errors were encountered: