-
Notifications
You must be signed in to change notification settings - Fork 3
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
Experiment: Add Builds request #9
Conversation
Here it is @pietbrauer. |
Everything is usually tested like in Keys that usually spot the error and also throw an exception if you make a call that is not stubbed. So maybe this helps which resolving the problem? |
I think the problem is more in getting the project that the user wants and pass it to the URL, as GitLab doesn't really treat them as a param, it just embeds them in the URL |
|
||
var path: String { | ||
switch self { | ||
case .ReadProjectBuilds: |
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 should be:
case .ReadProjectBuilds(_, let project, let build):
return "/projects/\(project)/builds/\(build)"
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.
On the params? Really? Shouldn't it be on the path? And if not then what should the path be?
Now, this probably won't be of any use to Git2Go, would you like to expand TanukiKit? I perfectly understand if you prefer to leave it as it is, I could still just expand it locally. |
This repository is not about Git2Go, I open sourced it so people can use it in their apps and share their work here and contributions are much welcome. I would like to have tests for this though. Have a look at the Keys tests I inlined in my other comment. |
Ah alright, yes, I will obviously write tests for all of this, was just trying to figure out how the router worked, now that I know I also wanted to extend it for other uses like commit logs, runners for the CI, etc. Ideally get almost all of the API configured, with tests of course, and I would also like to write a wiki with guides and examples for them, it would also be a good idea to add a license. |
Yeah, not a big fan of Wikis but a big fan of baby steps 😉 I was thinking about a swift playground to showcase the API. License is MIT https://github.com/nerdishbynature/TanukiKit/blob/master/LICENSE |
Playgrounds sound good to me 😃 oh we need to be careful with the license then, MIT license requires that all files have the short license disclaimer on the beginning of it, don't worry I'll handle that. |
We should also add the license disclaimer to the readme, I had no idea the license was there. |
Not a big fan of that. It is also in the pod spec. MIT is not restricting at all. License header is also not required as I don't care really what people do with the code. http://stackoverflow.com/a/3051855/518801M would be a different case if it would be GPL or something stupid. It would help if you take care of this PR first before loosing your mind in all of the other work. |
Yup, let's cancel it for now, I'll add the tests and when it's ready I'll make a new one. |
You can just leave it open so people see you are working on it. No need and also no way to open a new one from the same branch |
Sure, sorry, git newbie as you can see ;) |
@pietbrauer, I'm having some difficulties developing this project with the pods, see, I was using TanukiKit within my project as a pod, and I was only testing the expansion so I literally just edited the pod itself locally, but obviously I can't do that now, how do you develop this? Because now I have it as a separate project, separate git repo forked from yours, and it is OK, the only problem is that I can't really test my changes as well and test the framework on my project as I could before, how do you do it usually? Do you just suck it up and work only in the separate project for the framework? |
I just look at the documentation of the call and see what it returns, copy that as a JSON fixture and write a test for it. If I am done I will test it in my project and make a pull request. But yes, I am mostly in the framework project. |
Hum, yes but you said that when you were done you would test it on your project, how do you do that?! Because of course I have added new stuff to my fork but the cocoapod is still your version right? So how do I test my changes? |
Please have a look at the second example https://guides.cocoapods.org/using/the-podfile.html#from-a-podspec-in-the-root-of-a-library-repo |
Awesome, that made it, thanks! |
Pull request for Issue #8
Tiago Ferreira