Factored out @post.revise into a new PostRevisor class (PR #92)

Hey guys,

I noticed that the revise instance method of the Post class was big, long, and hairy.

I decided to refactor that method into its own class, and then I cleaned up that class to be much more readable and maintainable. None of the method signatures have changed, and all specs pass.

I have already signed the CLA.

GitHub

I guess one question I have is where this class should live. I picked lib because there is another similar class that exists there, PostCreator. However, it is arguable that my class should exist in app/models. I am open to suggestions for PostRevisor's final resting place.

Amazing :fish: - this is a huge improvement. I reviewed it and it looks very nice, also confirmed locally that it works as expected.

Regarding where these classes should go: As you noticed lib has been the place where I previously placed them. But I have heard good arguments for models or even a new folder, services. I think we might want to sort out where all these types of classes should go soon.

Personally I don’t have strong feelings as to where they should go as long as it’s consistent. But maybe it’s a good discussion topic for meta.discourse.org.

I learn so much from these extractions. Good stuff.

+1 keep up the awesome PRs