-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4191 from Ana06/refactor_event
Refactor Event module
- Loading branch information
Showing
49 changed files
with
1,277 additions
and
758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require_dependency 'event/all' | ||
|
||
include MaintenanceHelper | ||
|
||
class RequestController < ApplicationController | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require 'xmlhash' | ||
require 'event' | ||
|
||
include MaintenanceHelper | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'event' | ||
require 'set' | ||
|
||
class Comment < ApplicationRecord | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
require_relative 'event/all' | ||
module Event | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module Event | ||
class BranchCommand < Base | ||
self.description = 'Package was branched' | ||
payload_keys :project, :package, :sender, :targetproject, :targetpackage, :user | ||
after_create_commit :send_to_bus | ||
|
||
def self.message_bus_routing_key | ||
"#{Configuration.amqp_namespace}.package.branch" | ||
end | ||
|
||
def subject | ||
"Package Branched: #{payload['project']}/#{payload['package']} => #{payload['targetproject']}/#{payload['targetpackage']}" | ||
end | ||
end | ||
end | ||
|
||
# == Schema Information | ||
# | ||
# Table name: events | ||
# | ||
# id :integer not null, primary key | ||
# eventtype :string(255) not null, indexed | ||
# payload :text(65535) | ||
# created_at :datetime indexed | ||
# updated_at :datetime | ||
# project_logged :boolean default(FALSE), indexed | ||
# undone_jobs :integer default(0) | ||
# mails_sent :boolean default(FALSE), indexed | ||
# | ||
# Indexes | ||
# | ||
# index_events_on_created_at (created_at) | ||
# index_events_on_eventtype (eventtype) | ||
# index_events_on_mails_sent (mails_sent) | ||
# index_events_on_project_logged (project_logged) | ||
# |
Oops, something went wrong.