Skip to content
Snippets Groups Projects

Separate user and issue observation from mail observer

Created by: robbkidd

Submitted for review, do not merge without discussion!

It seems like I made a lot of changes in this. I only split out two of the four classes MailerObserver observes: User and Issue. If you like what is here, I can do the other two.

All observers are turned off by default when running specs. Observers are turned back on when their actual behavior is being tested.

Because we moved to resque_mailer, I added the resque_spec gem to turn queues on and off when needed under test.

For changed issues, I split the logic of sending a reassigned email from the logic of creating a status change note.

The implementation of creating a Note that is a status change was moved to a Note.create_status_change_note method. This could be reused by a MergeRequestObserver if you like the observers in this pull request.

And there are tests in this one. It's Ruby, fellas; I'm back on firmer ground.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: robbkidd

    This pull request is a follow up to the discussion had in the Google group about the break up of MailerObserver: https://groups.google.com/d/topic/gitlabhq/iOVS5E-MbkU/discussion

    By Administrator on 2012-06-20T22:58:47 (imported from GitLab project)

    By Administrator on 2012-06-20T22:58:47 (imported from GitLab)

  • Created by: robbkidd

    OK to work on a NoteObserver and MergeRequest observer?

    By Administrator on 2012-06-25T14:25:32 (imported from GitLab project)

    By Administrator on 2012-06-25T14:25:32 (imported from GitLab)

  • Created by: dzaporozhets

    @robbkidd sure :). Thanks for helping us

    By Administrator on 2012-06-25T14:30:19 (imported from GitLab project)

    By Administrator on 2012-06-25T14:30:19 (imported from GitLab)

  • Created by: robbkidd

    You're welcome. Thanks for putting up with my bad JavaScript.

    By Administrator on 2012-06-25T14:41:10 (imported from GitLab project)

    By Administrator on 2012-06-25T14:41:10 (imported from GitLab)

Please register or sign in to reply
Loading