summaryrefslogtreecommitdiff
path: root/app/models/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/hooks')
-rw-r--r--app/models/hooks/project_hook.rb2
-rw-r--r--app/models/hooks/service_hook.rb2
-rw-r--r--app/models/hooks/system_hook.rb2
-rw-r--r--app/models/hooks/web_hook.rb18
-rw-r--r--app/models/hooks/web_hook_log.rb2
5 files changed, 13 insertions, 13 deletions
diff --git a/app/models/hooks/project_hook.rb b/app/models/hooks/project_hook.rb
index 18c387f0d34..42e1fb18347 100644
--- a/app/models/hooks/project_hook.rb
+++ b/app/models/hooks/project_hook.rb
@@ -13,7 +13,7 @@ class ProjectHook < WebHook
:merge_request_hooks,
:job_hooks,
:pipeline_hooks,
- :wiki_page_hooks
+ :wiki_page_hooks,
]
belongs_to :project
diff --git a/app/models/hooks/service_hook.rb b/app/models/hooks/service_hook.rb
index 8f305dd7c22..78a53658b9a 100644
--- a/app/models/hooks/service_hook.rb
+++ b/app/models/hooks/service_hook.rb
@@ -5,7 +5,7 @@ class ServiceHook < WebHook
validates :service, presence: true
# rubocop: disable CodeReuse/ServiceClass
- def execute(data, hook_name = 'service_hook')
+ def execute(data, hook_name = "service_hook")
WebHookService.new(self, data, hook_name).execute
end
# rubocop: enable CodeReuse/ServiceClass
diff --git a/app/models/hooks/system_hook.rb b/app/models/hooks/system_hook.rb
index 90b4588a325..c67bcb223e8 100644
--- a/app/models/hooks/system_hook.rb
+++ b/app/models/hooks/system_hook.rb
@@ -7,7 +7,7 @@ class SystemHook < WebHook
:repository_update_hooks,
:push_hooks,
:tag_push_hooks,
- :merge_request_hooks
+ :merge_request_hooks,
]
default_value_for :push_events, false
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb
index 1a8662db9fb..4c5bdd1a148 100644
--- a/app/models/hooks/web_hook.rb
+++ b/app/models/hooks/web_hook.rb
@@ -4,21 +4,21 @@ class WebHook < ActiveRecord::Base
include Sortable
attr_encrypted :token,
- mode: :per_attribute_iv,
- algorithm: 'aes-256-gcm',
- key: Settings.attr_encrypted_db_key_base_32
+ mode: :per_attribute_iv,
+ algorithm: "aes-256-gcm",
+ key: Settings.attr_encrypted_db_key_base_32
attr_encrypted :url,
- mode: :per_attribute_iv,
- algorithm: 'aes-256-gcm',
- key: Settings.attr_encrypted_db_key_base_32
+ mode: :per_attribute_iv,
+ algorithm: "aes-256-gcm",
+ key: Settings.attr_encrypted_db_key_base_32
has_many :web_hook_logs, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
- validates :url, presence: true, public_url: { allow_localhost: lambda(&:allow_local_requests?),
- allow_local_network: lambda(&:allow_local_requests?) }
+ validates :url, presence: true, public_url: {allow_localhost: lambda(&:allow_local_requests?),
+ allow_local_network: lambda(&:allow_local_requests?),}
- validates :token, format: { without: /\n/ }
+ validates :token, format: {without: /\n/}
validates :push_events_branch_filter, branch_filter: true
# rubocop: disable CodeReuse/ServiceClass
diff --git a/app/models/hooks/web_hook_log.rb b/app/models/hooks/web_hook_log.rb
index 2d9f7594e8c..e9671efcd6a 100644
--- a/app/models/hooks/web_hook_log.rb
+++ b/app/models/hooks/web_hook_log.rb
@@ -10,7 +10,7 @@ class WebHookLog < ActiveRecord::Base
validates :web_hook, presence: true
def self.recent
- where('created_at >= ?', 2.days.ago.beginning_of_day)
+ where("created_at >= ?", 2.days.ago.beginning_of_day)
.order(created_at: :desc)
end