Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !953

Merged
Created Jun 20, 2012 by Administrator@rootOwner

Separate user and issue observation from mail observer

  • Overview 4
  • Commits 13
  • Changes 19

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.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/robbkidd/separate_user_and_issue_observer_from_mail_observer