Skip to content

Commit

Permalink
Removes 'require_dependency' From 'vba_documents' Module (#12644)
Browse files Browse the repository at this point in the history
* Removes unnecessary 'require_dependency' statements from vba_documents module

* Updates 'require_dependency' with 'require'

* Replaces 'require_depdendency' with 'require'

* Replaces 'require_depdendency' with 'require'

* Resolves rubocop error

---------

Co-authored-by: Gia Antoniades <giaantoniades@Gias-MacBook-Pro.local>
  • Loading branch information
gia-lexa and Gia Antoniades authored May 15, 2023
1 parent 27b818c commit 3987bdc
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/v1/swagger_root'
require_dependency 'vba_documents/document_upload/status_report_swagger'
require_dependency 'vba_documents/document_upload/v1/status_attributes_swagger'
require_dependency 'vba_documents/document_upload/v1/pdf_upload_attributes_swagger'
require_dependency 'vba_documents/document_upload/v1/pdf_dimension_attributes_swagger'

module VBADocuments
module Docs
module V1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/v2/swagger_root'
require_dependency 'vba_documents/document_upload/status_report_swagger'
require_dependency 'vba_documents/document_upload/v1/status_attributes_swagger'
require_dependency 'vba_documents/document_upload/v1/pdf_upload_attributes_swagger'
require_dependency 'vba_documents/document_upload/v1/pdf_dimension_attributes_swagger'

module VBADocuments
module Docs
module V2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/application_controller'
require_dependency 'vba_documents/object_store'
require 'common/exceptions'

module VBADocuments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/application_controller'
require 'common/exceptions'

module VBADocuments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# frozen_string_literal: true

require 'zip'

require_dependency 'vba_documents/application_controller'
require_dependency 'vba_documents/upload_error'
require_dependency 'vba_documents/payload_manager'
require_dependency 'vba_documents/document_request_validator'
require 'vba_documents/payload_manager'
require 'common/exceptions'

module VBADocuments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/application_controller'
require 'common/exceptions'

module VBADocuments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# frozen_string_literal: true

require 'zip'

require_dependency 'vba_documents/application_controller'
require_dependency 'vba_documents/upload_error'
require_dependency 'vba_documents/payload_manager'
require_dependency 'vba_documents/upload_validator'
require_dependency 'vba_documents/multipart_parser'
require 'common/exceptions'
require 'vba_documents/payload_manager'
require 'vba_documents/upload_validator'
require './lib/webhooks/utilities'

module VBADocuments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/multipart_parser'
module VBADocuments
class UploadFile < UploadSubmission
has_one_attached :multipart_file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# frozen_string_literal: true

require_dependency 'vba_documents/upload_error'
require_dependency 'vba_documents/sql_support'
require 'vba_documents/sql_support'
require 'central_mail/service'
require 'common/exceptions'
require_dependency './lib/webhooks/utilities'

module VBADocuments
class UploadSubmission < ApplicationRecord
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require_dependency 'common/exceptions'
require_dependency 'vba_documents/pdf_inspector'
require 'vba_documents/pdf_inspector'

module VBADocuments
class UploadSerializer < ActiveModel::Serializer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# frozen_string_literal: true

require_dependency 'vba_documents/upload_validator'
require_dependency 'vba_documents/payload_manager'
require_dependency 'vba_documents/multipart_parser'

require 'sidekiq'
require 'vba_documents/object_store'
require 'vba_documents/payload_manager'
require 'vba_documents/upload_error'
require 'central_mail/utilities'

Expand Down
4 changes: 1 addition & 3 deletions modules/vba_documents/lib/vba_documents/payload_manager.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

require_dependency 'vba_documents/multipart_parser'
require_dependency 'vba_documents/object_store'
require_dependency 'vba_documents/upload_error'
require 'vba_documents/upload_error'

module VBADocuments
class PayloadManager
Expand Down
2 changes: 0 additions & 2 deletions modules/vba_documents/lib/vba_documents/upload_validator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_dependency 'vba_documents/pdf_inspector'

require 'central_mail/utilities'
require 'central_mail/service'
require 'pdf_utilities/pdf_validator'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# frozen_string_literal: true

require 'rails_helper'
require 'vba_documents/payload_manager'
require_relative '../../support/vba_document_fixtures'
require_dependency 'vba_documents/payload_manager'
require_dependency 'vba_documents/object_store'
require_dependency 'vba_documents/multipart_parser'
require_dependency 'vba_documents/document_request_validator'

RSpec.describe 'VBA Document Uploads Endpoint', type: :request, retry: 3 do
include VBADocuments::Fixtures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

require 'rails_helper'
require './lib/webhooks/utilities'
require 'vba_documents/payload_manager'
require_relative '../../support/vba_document_fixtures'
require_dependency 'vba_documents/payload_manager'
require_dependency 'vba_documents/object_store'
require_dependency 'vba_documents/multipart_parser'

RSpec.describe 'VBA Document Uploads Endpoint', type: :request, retry: 3 do
include VBADocuments::Fixtures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
require './lib/central_mail/utilities'
require_relative '../../support/vba_document_fixtures'

require_dependency 'vba_documents/object_store'
require_dependency 'vba_documents/multipart_parser'

# rubocop:disable Style/OptionalBooleanParameter
RSpec.describe 'VBA Document Uploads Endpoint', type: :request, retry: 3 do
include VBADocuments::Fixtures
Expand Down

0 comments on commit 3987bdc

Please sign in to comment.