-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring to unify a subsystem of Event behavior
Prior to this commit, the descendants of ContentEventJob each approached writing their `action` string differently. With this change, I've normalized that behavior. There is still work to be done to get a handle on the whole event ecosystem. Relates to: #4193
- Loading branch information
Showing
7 changed files
with
13 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Log a concern deposit to activity streams | ||
class ContentDepositEventJob < ContentEventJob | ||
def action | ||
"User #{link_to_profile depositor} has deposited #{link_to repo_object.title.first, polymorphic_path(repo_object)}" | ||
"User #{link_to_profile depositor} has deposited #{polymorphic_link_to(repo_object)}" | ||
end | ||
end |
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,6 +1,6 @@ | ||
# Log new version of a file to activity streams | ||
class ContentNewVersionEventJob < ContentEventJob | ||
def action | ||
@action ||= "User #{link_to_profile depositor} has added a new version of #{link_to repo_object.title.first, Rails.application.routes.url_helpers.hyrax_file_set_path(repo_object)}" | ||
"User #{link_to_profile depositor} has added a new version of #{polymorphic_link_to(repo_object)}" | ||
end | ||
end |
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,6 +1,6 @@ | ||
# Log content update to activity streams | ||
class ContentUpdateEventJob < ContentEventJob | ||
def action | ||
"User #{link_to_profile depositor} has updated #{link_to repo_object.title.first, polymorphic_path(repo_object)}" | ||
"User #{link_to_profile depositor} has updated #{polymorphic_link_to(repo_object)}" | ||
end | ||
end |
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