remove errors

This commit is contained in:
Georg Gadinger 2022-12-29 07:26:40 +01:00 committed by Andreas Nedbal
parent 9413d23a02
commit fb07eda972
16 changed files with 3 additions and 27 deletions

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'errors'
class Ajax::ModerationController < AjaxController class Ajax::ModerationController < AjaxController
def destroy_report def destroy_report
params.require :id params.require :id

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
class Ajax::QuestionController < AjaxController class Ajax::QuestionController < AjaxController
def destroy def destroy
params.require :question params.require :question

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
class Ajax::RelationshipController < AjaxController class Ajax::RelationshipController < AjaxController
before_action :authenticate_user! before_action :authenticate_user!

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
class User class User
module Relationship module Relationship
module Block module Block

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
class User class User
module Relationship module Relationship
module Follow module Follow

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Errors module Errors
class Base < StandardError class Base < StandardError
def status def status
@ -5,7 +7,7 @@ module Errors
end end
def code def code
@code ||= self.class.name.sub('Errors::', '').underscore @code ||= self.class.name.sub("Errors::", "").underscore
end end
def locale_code def locale_code

View File

@ -2,7 +2,6 @@
require "dry-initializer" require "dry-initializer"
require "types" require "types"
require "errors"
module UseCase module UseCase
class Base class Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
module UseCase module UseCase
module Question module Question
class Create < UseCase::Base class Create < UseCase::Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
module UseCase module UseCase
module Question module Question
class Destroy < UseCase::Base class Destroy < UseCase::Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
module UseCase module UseCase
module Relationship module Relationship
class Create < UseCase::Base class Create < UseCase::Base

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "errors"
module UseCase module UseCase
module Relationship module Relationship
class Destroy < UseCase::Base class Destroy < UseCase::Base

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper" require "rails_helper"
require "errors"
describe UseCase::Question::CreateFollowers do describe UseCase::Question::CreateFollowers do
subject do subject do

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper" require "rails_helper"
require "errors"
describe UseCase::Question::Create do describe UseCase::Question::Create do
subject do subject do

View File

@ -1,7 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper" require "rails_helper"
require "errors"
describe UseCase::Question::Destroy do describe UseCase::Question::Destroy do
subject do subject do

View File

@ -2,8 +2,6 @@
require "rails_helper" require "rails_helper"
require "errors"
describe UseCase::Relationship::Create do describe UseCase::Relationship::Create do
shared_examples_for "valid relationship type" do shared_examples_for "valid relationship type" do
context "target_user is source_user" do context "target_user is source_user" do

View File

@ -2,8 +2,6 @@
require "rails_helper" require "rails_helper"
require "errors"
describe UseCase::Relationship::Destroy do describe UseCase::Relationship::Destroy do
shared_examples_for "valid relationship type" do shared_examples_for "valid relationship type" do
its([:status]) { is_expected.to eq(204) } its([:status]) { is_expected.to eq(204) }