discourse/discourse — pull request #903 by chrishunt (2013-05-26 01:19:24+00:00)
Title: Extract post move

Thanks @shayfrendt for help on this

Continuing along the same lines as #899, this extracts the logic for moving posts into its own class `PostMove`. The goal here is make the code a bit easier to understand and get the Code Climate score down.

This is best reviewed commit-by-commit. The existing test coverage is pretty good, but we add [one test](https://github.com/chrishunt/discourse/commit/1ba18318acc99ef5fe15c1113bbaf0c9265fb852) to verify that moving of the posts happens inside a transaction.

This does not change any behavior. After merged, we shave about 100 points off the `Topic` Code Climate [complexity score](https://codeclimate.com/github/discourse/discourse/Topic)