danbee/mpd-client — pull request #1 by leemachin (2013-12-11 00:44:01+00:00)
Title: WIP: Refactor and Gemify (for convenience)

Pretty massive, and still not tested (though it should be easier now). Took the idea of the earlier refactor and ran with it because it was bugging me that we didn't get very far with it.

Had exact same problem with callbacks - I fixed it by splatting arguments to the blocks. They stop working entirely without that. It's in tasty DSL format now though.

Most of the change was moving stuff into `lib` and organising it as you would a gem, with a container module and a bunch of classes for the other stuff. The Sinatra stuff is in `bin` but still needs work, and it still relies on Bundler and not the gemspec (because ruby-mpd is sourced from github).