lib/runcible/resources/event_notifier.rb in runcible-1.7.2 vs lib/runcible/resources/event_notifier.rb in runcible-1.8.0

- old
+ new

@@ -1,25 +1,25 @@ module Runcible module Resources # @see https://pulp-dev-guide.readthedocs.org/en/latest/events/index.html class EventNotifier < Runcible::Base class EventTypes - REPO_SYNC_COMPLETE = 'repo.sync.finish' - REPO_SYNC_START = 'repo.sync.start' - REPO_PUBLISH_COMPLETE = 'repo.publish.finish' - REPO_PUBLISH_START = 'repo.publish.start' + REPO_SYNC_COMPLETE = 'repo.sync.finish'.freeze + REPO_SYNC_START = 'repo.sync.start'.freeze + REPO_PUBLISH_COMPLETE = 'repo.publish.finish'.freeze + REPO_PUBLISH_START = 'repo.publish.start'.freeze end class NotifierTypes - REST_API = 'http' + REST_API = 'http'.freeze end # Generates the API path for Event Notifiers # # @param [String] id the ID of the event notifier # @return [String] the event notifier path, may contain the ID if passed def self.path(id = nil) - (id.nil?) ? 'events/' : "events/#{id}/" + id.nil? ? 'events/' : "events/#{id}/" end # Creates an Event Notification # # @param [String] notifier_type_id the type ID of the event notifier