Commit d7ac948c authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix incorrect class definitions

Zeitwerk requires that class definitions match the file location
parent 1ae9e05f
# frozen_string_literal: true # frozen_string_literal: true
module InvisibleCaptcha module InvisibleCaptchaOnSignup
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
......
...@@ -4,7 +4,7 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -4,7 +4,7 @@ class RegistrationsController < Devise::RegistrationsController
include Recaptcha::Verify include Recaptcha::Verify
include AcceptsPendingInvitations include AcceptsPendingInvitations
include RecaptchaExperimentHelper include RecaptchaExperimentHelper
include InvisibleCaptcha include InvisibleCaptchaOnSignup
layout :choose_layout layout :choose_layout
......
# frozen_string_literal: true # frozen_string_literal: true
module EE class WeightNote < ::Note
class WeightNote < ::Note
attr_accessor :resource_parent, :event attr_accessor :resource_parent, :event
def self.from_event(event, resource: nil, resource_parent: nil) def self.from_event(event, resource: nil, resource_parent: nil)
...@@ -47,5 +46,4 @@ module EE ...@@ -47,5 +46,4 @@ module EE
weight_text = html ? "<strong>#{event.weight}</strong>" : event.weight weight_text = html ? "<strong>#{event.weight}</strong>" : event.weight
event.weight ? "changed weight to #{weight_text}" : 'removed the weight' event.weight ? "changed weight to #{weight_text}" : 'removed the weight'
end end
end
end end
...@@ -13,6 +13,8 @@ require_dependency 'declarative_policy/step' ...@@ -13,6 +13,8 @@ require_dependency 'declarative_policy/step'
require_dependency 'declarative_policy/base' require_dependency 'declarative_policy/base'
module DeclarativePolicy module DeclarativePolicy
extend PreferredScope
CLASS_CACHE_MUTEX = Mutex.new CLASS_CACHE_MUTEX = Mutex.new
CLASS_CACHE_IVAR = :@__DeclarativePolicy_CLASS_CACHE CLASS_CACHE_IVAR = :@__DeclarativePolicy_CLASS_CACHE
......
# frozen_string_literal: true # frozen_string_literal: true
module DeclarativePolicy module DeclarativePolicy
module PreferredScope
PREFERRED_SCOPE_KEY = :"DeclarativePolicy.preferred_scope" PREFERRED_SCOPE_KEY = :"DeclarativePolicy.preferred_scope"
class << self
def with_preferred_scope(scope) def with_preferred_scope(scope)
Thread.current[PREFERRED_SCOPE_KEY], old_scope = scope, Thread.current[PREFERRED_SCOPE_KEY] Thread.current[PREFERRED_SCOPE_KEY], old_scope = scope, Thread.current[PREFERRED_SCOPE_KEY]
yield yield
......
# frozen_string_literal: true
module Gitlab
module Email
ProcessingError = Class.new(StandardError)
EmailUnparsableError = Class.new(ProcessingError)
SentNotificationNotFoundError = Class.new(ProcessingError)
ProjectNotFound = Class.new(ProcessingError)
EmptyEmailError = Class.new(ProcessingError)
AutoGeneratedEmailError = Class.new(ProcessingError)
UserNotFoundError = Class.new(ProcessingError)
UserBlockedError = Class.new(ProcessingError)
UserNotAuthorizedError = Class.new(ProcessingError)
NoteableNotFoundError = Class.new(ProcessingError)
InvalidRecordError = Class.new(ProcessingError)
InvalidNoteError = Class.new(InvalidRecordError)
InvalidIssueError = Class.new(InvalidRecordError)
InvalidMergeRequestError = Class.new(InvalidRecordError)
UnknownIncomingEmail = Class.new(ProcessingError)
InvalidAttachment = Class.new(ProcessingError)
end
end
...@@ -5,23 +5,6 @@ require_dependency 'gitlab/email/handler' ...@@ -5,23 +5,6 @@ require_dependency 'gitlab/email/handler'
# Inspired in great part by Discourse's Email::Receiver # Inspired in great part by Discourse's Email::Receiver
module Gitlab module Gitlab
module Email module Email
ProcessingError = Class.new(StandardError)
EmailUnparsableError = Class.new(ProcessingError)
SentNotificationNotFoundError = Class.new(ProcessingError)
ProjectNotFound = Class.new(ProcessingError)
EmptyEmailError = Class.new(ProcessingError)
AutoGeneratedEmailError = Class.new(ProcessingError)
UserNotFoundError = Class.new(ProcessingError)
UserBlockedError = Class.new(ProcessingError)
UserNotAuthorizedError = Class.new(ProcessingError)
NoteableNotFoundError = Class.new(ProcessingError)
InvalidRecordError = Class.new(ProcessingError)
InvalidNoteError = Class.new(InvalidRecordError)
InvalidIssueError = Class.new(InvalidRecordError)
InvalidMergeRequestError = Class.new(InvalidRecordError)
UnknownIncomingEmail = Class.new(ProcessingError)
InvalidAttachment = Class.new(ProcessingError)
class Receiver class Receiver
def initialize(raw) def initialize(raw)
@raw = raw @raw = raw
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment