Comments Added
Added braces to "t"

The ruby parser was misreading a few instances of the "t" variable (for localization).

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Fixed All Tests

Designations and the new strings were breaking almost all of the tests. The tests are now passing again and a few bugs have been rooted out.

We are now ready to refactor.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Refactored StripeController (Extract Method Refactoring)

Refactored the StripeController by extracting methods and isolating dependencies where necessary. The focus was on readability. We are now ready to perform Extract Class Refactoring, which will allow us to operate at a more abstract level in the controllers by pushing details into the library.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Refactored StripeController (Extracted 2 Classes)

Extracted the StripeEvent class and the ExceptionLogger class from the StripeController. Currently, changes have been applied only to the StripeTestController, leaving the StripeController the same as the previous commit for now. Check the StripeTestController for current changes to that file.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Refactored StripeController

Moved all business logic out of the StripeController and into library classes.

The following new classes were extracted:

1. DesignationService
2. GiftService
3. UserService
4. WebhookAction

At this point in time, the refactoring for the StripeController is almost complete. Refactoring will need to be done for the WebhookAction class, which has some hidden dependencies at the current time.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Minor: Moved StripeTestController to StripeController

See the previous commit for information about the real changes behind this commit.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Finished Refactoring StripeController

Created a "SumoTextService", "NotifierService", and a "StatService" class.

NOTE ON "SERVICES": These services are to help us decouple the details of actions we want to call on classes, and in particular models. This also allows us to isolate instance creation and potential meta-actions into a single class for any given model or class.

Additionally, I refactored the WebhookAction class, and have completed refactoring the StripeController in this iteration.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Refactored the UsersController

Refactored the UsersController. Due to the large amount of views and renders associated with the UsersController, not a ton of refactoring was accomplished. The solution from here would be to break the responsibilities of this controller into multiple other controllers. Or to refactor it at a later date, as there is still some business logic in this controller.

I plan on taking another look sometime down the road, but we will see!

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Refactoring SumoController

Refactoring of the SumoController has been initiated. About 45% through the refactoring process for this controller.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Refactored SumoController, Made Controller helper methods Private

Made helper methods in the three main controllers (Sumo, Users, Stripe) Private. Also began refactoring the SumoController.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Finished Refactoring the SumoController

The next step will be to turn the message_action helper method in the SumoController into a a series of Commands, in order to prepare for the addition of the recurring billing feature.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
SumoController Refactoring

Moved more business responsibilities from the SumoController into the SumoParams class.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Designated all methods in the SumoController as private

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Removed a Stats duplication in SumoController

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Removed before_filter :stripe_event in StripeController

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Took out instances of UserService and GiftService in StripeController

Signed-off-by: Daniel Long <wizazzle@gmail.com>
Removed UserService, GiftService, & StatService

Additionally: Added the Guard testing gem.
Signed-off-by: Daniel Long <wizazzle@gmail.com>
Removed DesignationService and CampusService.

These services were found to not be necessary at this time or in the foreseeable future. Therefore, they have been eliminated.

Signed-off-by: Daniel Long <wizazzle@gmail.com>
merge with develop