turbulence icon indicating copy to clipboard operation
turbulence copied to clipboard

Consider using churn gem

Open bf4 opened this issue 11 years ago • 3 comments

Consider @danmayer's churn gem. One less thing to maintain :)

  • https://github.com/danmayer/churn
  • https://github.com/danmayer/churn

bf4 avatar Oct 17 '13 21:10 bf4

Nice! I'll take a look, see how hard it is to pull in.

kerrizor avatar Oct 17 '13 22:10 kerrizor

Cool idea @bf4 I would be interested in helping out.

churn due for a bit of refactoring. Likely just cleaning up the interface to detecting and querying interface for SCMs. I was looking at turbulance and

https://github.com/chad/turbulence/blob/master/lib/turbulence/scm/git.rb

and

https://github.com/chad/turbulence/blob/master/lib/turbulence/calculators/churn.rb

and the likely equivalent in the churn project

https://github.com/danmayer/churn/blob/master/lib/churn/git_analyzer.rb

Seems we could probably hook them up around there. Although if we want multiple SCM support, churn does that in the not very well factored out set_source_control method and would add support for additional SCMs to turbulence.

https://github.com/danmayer/churn/blob/master/lib/churn/churn_calculator.rb#L181

The last big thing I noticed is that turbulence supports perforce, which amazingly enough isn't on the list of SCMs that churn currently supports. I could try to add support for that so moving over would only add features opposed to deprecating anything.

@kerrizor let me know your thoughts and we can see if we can work something sane out.

danmayer avatar Oct 18 '13 14:10 danmayer

Before trying to add perforce support or adding any methods to return the data turbulence expects I started refactoring chrun a bit to make it easier to work with the various SCMs supported. You can see the first bit of progress

https://github.com/danmayer/churn/commit/1d990a243f130c06799798c55ca67b11a3e0385b

I plan to pull a few more methods out of the calculator and move them into the SCM classes. After a little bit more refactoring, I will try to get perforce support added.

danmayer avatar Oct 20 '13 22:10 danmayer