now that we have tests -> move everything in a place that makes more sense, splitting up main/cli/hooks,
still lots of 'extract-method' to do but this is a first rough step
I chose to make everything static methods and wrap the into class << self so private works as expected
class << self
I said back when the project started (#5 (comment)) that I didn't want to split out the code into a bunch of files in lib/. I still believe that the code base is small enough to keep it all in bin/spin but I want to open this up for discussion and see what others think.
I personally don't see much gain from this. Having everything refactored into classes with class methods makes the code harder to find and harder to follow the path of execution. Keeping everything in one file means less overhead for grokking the source and, ultimately, for contributing. You say this 'makes more sense' but I don't see the gain.
What does everyone else think? Does this make the code more maintainable? Understandable? Easier to debug?
/cc @dstrelau @bittersweet @maprihoda
Hmm I'd say
I kind of just feel dirty dealing with a bunch of global/unreusable methods.
A path I could also imagine is keeping options parsing in the bin/spin and putting everything else into one lib/spin.rb
I'm on board :)
I am in favour of keeping option parsing in bin/spin but that can be refactored later.