elcuervo/airplay — pull request #74 by jonahoffline (2014-01-25 12:44:41+00:00)
Title: Airplay::Player, Connection, and PlaybackInfo Refactorings

Hey guys. Amazing project you guys have here!
I refactored some duplication and complexity. Codeclimate's score went a little higher now :neckbeard:

### Airplay::Player
Extracted the code from `#check_for_playback_status` into the following three methods:
`#handle_playback_state`, `#player_state`, `#currently_playing?`

### Airplay::Connection
Extracted the code from `#post`, `#put`, and `#get` into the private `#prepare_request` method so it could be shared since the code was very similar.

Moved the status code verification part from `#send_request` into `#verify_response`.

### Airplay::Player::PlaybackInfo
Removed the `#uuid`, `#duration`, and `#position` methods so they get defined dynamically inside the Struct class.

PS. I read a few cool ideas in the issues thread that I would love to help implement but I think this project would benefit from better test coverage before it grows bigger :cat:

Con cariño desde **Puerto Rico** :)