🚨Fix Rubocop lint errors
This commit is contained in:
parent
dd018f3682
commit
94c6d6db6f
124 changed files with 774 additions and 914 deletions
|
@ -1,9 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module CustomExceptions::Account
|
||||
|
||||
class InvalidEmail < CustomExceptions::Base
|
||||
|
||||
def message
|
||||
if @data[:disposable]
|
||||
I18n.t 'errors.signup.disposable_email'
|
||||
|
@ -15,13 +13,13 @@ module CustomExceptions::Account
|
|||
|
||||
class UserExists < CustomExceptions::Base
|
||||
def message
|
||||
I18n.t('errors.signup.email_already_exists', email: @data[:email])
|
||||
I18n.t('errors.signup.email_already_exists', email: @data[:email])
|
||||
end
|
||||
end
|
||||
|
||||
class UserErrors < CustomExceptions::Base
|
||||
def message
|
||||
@data[:errors].full_messages.join(",")
|
||||
@data[:errors].full_messages.join(',')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -30,6 +28,4 @@ module CustomExceptions::Account
|
|||
I18n.t 'errors.signup.failed'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CustomExceptions::Base < ::StandardError
|
||||
|
||||
def to_hash
|
||||
{
|
||||
message: message
|
||||
|
@ -15,5 +14,4 @@ class CustomExceptions::Base < ::StandardError
|
|||
def initialize(data)
|
||||
@data = data
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -3,31 +3,31 @@
|
|||
module CustomExceptions::Report
|
||||
class InvalidIdentity < CustomExceptions::Base
|
||||
def message
|
||||
"Invalid type"
|
||||
'Invalid type'
|
||||
end
|
||||
end
|
||||
|
||||
class IdentityNotFound < CustomExceptions::Base
|
||||
def message
|
||||
"Type with the specified id not found"
|
||||
'Type with the specified id not found'
|
||||
end
|
||||
end
|
||||
|
||||
class MetricNotFound < CustomExceptions::Base
|
||||
def message
|
||||
"Metric for the specified type not found"
|
||||
'Metric for the specified type not found'
|
||||
end
|
||||
end
|
||||
|
||||
class InvalidStartTime < CustomExceptions::Base
|
||||
def message
|
||||
"Invalid start_time"
|
||||
'Invalid start_time'
|
||||
end
|
||||
end
|
||||
|
||||
class InvalidEndTime < CustomExceptions::Base
|
||||
def message
|
||||
"Invalid end_time"
|
||||
'Invalid end_time'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue