macmade / xcode-coveralls

coveralls.io support for Xcode
http://macmade.github.io/xcode-coveralls
22 stars 3 forks source link

Added git info support. Beware of my implementation #1

Closed RyanCopley closed 9 years ago

RyanCopley commented 9 years ago

This is just to give you an idea. It's a really crappy implementation, but your current version does not have git info support. This is how you do it, you might want to find a better way.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.73%) to 91.97% when pulling 240c5f90b0133baa9196c882b51548247e13f828 on RyanCopley:master into f580bceadb7a76ea05e3eecc0fd4477efea67c71 on macmade:master.

RyanCopley commented 9 years ago

That awkward moment when I didn't write any unit tests...

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.74%) to 91.99% when pulling cdabf26c61ae9f6e5863df02747bd3eec846b4f5 on RyanCopley:master into f580bceadb7a76ea05e3eecc0fd4477efea67c71 on macmade:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.76%) to 92.0% when pulling 3b9595c5667672b7a126d347b254ee4aa7594814 on RyanCopley:master into f580bceadb7a76ea05e3eecc0fd4477efea67c71 on macmade:master.

macmade commented 9 years ago

lol, thanks for the request, and no worries for the unit-tests ; ) I'll review the pull-request and let you know about it...

Cheers,

RyanCopley commented 9 years ago

screen shot 2015-02-26 at 10 06 24 pm

As a reference as to what I'm talking about

RyanCopley commented 9 years ago

I just went and looked at how https://github.com/coagulant/coveralls-python/blob/master/coveralls/api.py is implementing it, and I followed their process a bit more close. This should be a little bit less of a bad example now. You might want to move this to a different file in the project and/or add a --git flag

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.64%) to 91.88% when pulling a63cbcbb3a525859ead53cf6032c56ee80756d46 on RyanCopley:master into f580bceadb7a76ea05e3eecc0fd4477efea67c71 on macmade:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.61%) to 91.86% when pulling a974111f037a5a2e29d9c1dfb6fc5836d1e56a81 on RyanCopley:master into f580bceadb7a76ea05e3eecc0fd4477efea67c71 on macmade:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.6%) to 91.84% when pulling a974111f037a5a2e29d9c1dfb6fc5836d1e56a81 on RyanCopley:master into f580bceadb7a76ea05e3eecc0fd4477efea67c71 on macmade:master.

macmade commented 9 years ago

Ok, I've merged your pull request, as this is obviously a nice addition. Thanks.

I'll now try to see if I can manage to have a better implementation, possibly through libgit.
Anyway, I think I'll put all this git stuff into a separate class, rather than directly into the request class.

macmade commented 9 years ago

FYI, libgit is the way to go.

I've done a simple test, and it's very easy to get all the infos required by coveralls.
So I'm now going to refactor your code, so it uses libgit instead of NSTask.

I've created a gist, so you can see an example: https://gist.github.com/macmade/dd676aad77651ccda958

Cheers : )

RyanCopley commented 9 years ago

Very cool, I didn't know libgit was a thing. Thanks for this project by the way, it's miles better than the default coveralls iOS setup

macmade commented 9 years ago

Ok, I've replaced your implementation with a libgit one. Everything should work as expected. Please tell me if you have issues.