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

Experiment: Add Builds request #9

Closed
wants to merge 4 commits into from
Closed

Experiment: Add Builds request #9

wants to merge 4 commits into from

Conversation

tiferrei
Copy link
Contributor

Pull request for Issue #8

Tiago Ferreira

@tiferrei
Copy link
Contributor Author

Here it is @pietbrauer.

@pietbrauer
Copy link
Member

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?

@tiferrei
Copy link
Contributor Author

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:
Copy link
Member

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)"

Copy link
Contributor Author

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?

@tiferrei
Copy link
Contributor Author

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.

@pietbrauer
Copy link
Member

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.

@tiferrei
Copy link
Contributor Author

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.

@pietbrauer
Copy link
Member

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

@tiferrei
Copy link
Contributor Author

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.

@tiferrei
Copy link
Contributor Author

We should also add the license disclaimer to the readme, I had no idea the license was there.

@pietbrauer
Copy link
Member

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.

@tiferrei
Copy link
Contributor Author

Yup, let's cancel it for now, I'll add the tests and when it's ready I'll make a new one.

@tiferrei tiferrei closed this May 29, 2016
@pietbrauer
Copy link
Member

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

@pietbrauer pietbrauer reopened this May 29, 2016
@tiferrei
Copy link
Contributor Author

Sure, sorry, git newbie as you can see ;)

@tiferrei
Copy link
Contributor Author

tiferrei commented Jun 3, 2016

@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?

@pietbrauer
Copy link
Member

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.

@tiferrei
Copy link
Contributor Author

tiferrei commented Jun 4, 2016

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?

@pietbrauer
Copy link
Member

@tiferrei
Copy link
Contributor Author

tiferrei commented Jun 4, 2016

Awesome, that made it, thanks!

@tiferrei tiferrei closed this Jun 4, 2016
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