diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3c7db580..7c9b8e49 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -21,8 +21,8 @@ jobs: uses: ./.github/workflows/_test-units.yml needs: [ betterleaks, static-analysis ] secrets: inherit - test-unit-lite: - uses: ./.github/workflows/_test-units.yml + test-units-lite: + uses: ./.github/workflows/_test-units-lite.yml needs: [ betterleaks, static-analysis ] secrets: inherit test-integration: @@ -31,7 +31,7 @@ jobs: secrets: inherit test-integration-lite: uses: ./.github/workflows/_test-integration-lite.yml - needs: test-unit-lite + needs: test-units-lite secrets: inherit test-smoke: uses: ./.github/workflows/_test-smoke.yml diff --git a/docs/code_samples/bank_account_details_v2.txt b/docs/code_samples/bank_account_details_v2.txt index 197bf18e..3091192f 100644 --- a/docs/code_samples/bank_account_details_v2.txt +++ b/docs/code_samples/bank_account_details_v2.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/bank_statement_fr_v2_async.txt b/docs/code_samples/bank_statement_fr_v2_async.txt index 8e484ba5..782c8bbe 100644 --- a/docs/code_samples/bank_statement_fr_v2_async.txt +++ b/docs/code_samples/bank_statement_fr_v2_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/cropper_v1.txt b/docs/code_samples/cropper_v1.txt index 4b30cedf..f9b19170 100644 --- a/docs/code_samples/cropper_v1.txt +++ b/docs/code_samples/cropper_v1.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/default.txt b/docs/code_samples/default.txt index 6d02fb3a..f4f8eaa3 100644 --- a/docs/code_samples/default.txt +++ b/docs/code_samples/default.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Initialize a custom endpoint for this product custom_endpoint = mindee_client.create_endpoint( diff --git a/docs/code_samples/default_async.txt b/docs/code_samples/default_async.txt index 3cc9af5f..fda456e7 100644 --- a/docs/code_samples/default_async.txt +++ b/docs/code_samples/default_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Initialize a custom endpoint for this product custom_endpoint = mindee_client.create_endpoint( diff --git a/docs/code_samples/expense_receipts_v5.txt b/docs/code_samples/expense_receipts_v5.txt index 12f217d2..621d4434 100644 --- a/docs/code_samples/expense_receipts_v5.txt +++ b/docs/code_samples/expense_receipts_v5.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/expense_receipts_v5_async.txt b/docs/code_samples/expense_receipts_v5_async.txt index 5286db69..e44202b4 100644 --- a/docs/code_samples/expense_receipts_v5_async.txt +++ b/docs/code_samples/expense_receipts_v5_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/financial_document_v1.txt b/docs/code_samples/financial_document_v1.txt index bb9c656f..3775035a 100644 --- a/docs/code_samples/financial_document_v1.txt +++ b/docs/code_samples/financial_document_v1.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/financial_document_v1_async.txt b/docs/code_samples/financial_document_v1_async.txt index f5d2b85d..e61935fe 100644 --- a/docs/code_samples/financial_document_v1_async.txt +++ b/docs/code_samples/financial_document_v1_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/idcard_fr_v2.txt b/docs/code_samples/idcard_fr_v2.txt index b9737568..ce24b370 100644 --- a/docs/code_samples/idcard_fr_v2.txt +++ b/docs/code_samples/idcard_fr_v2.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/international_id_v2_async.txt b/docs/code_samples/international_id_v2_async.txt index 6aa981ee..1dff0256 100644 --- a/docs/code_samples/international_id_v2_async.txt +++ b/docs/code_samples/international_id_v2_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/invoice_splitter_v1_async.txt b/docs/code_samples/invoice_splitter_v1_async.txt index f602618b..ba900406 100644 --- a/docs/code_samples/invoice_splitter_v1_async.txt +++ b/docs/code_samples/invoice_splitter_v1_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/invoices_v4.txt b/docs/code_samples/invoices_v4.txt index b36beaf0..e465cad6 100644 --- a/docs/code_samples/invoices_v4.txt +++ b/docs/code_samples/invoices_v4.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/invoices_v4_async.txt b/docs/code_samples/invoices_v4_async.txt index 60f93eb3..0660640a 100644 --- a/docs/code_samples/invoices_v4_async.txt +++ b/docs/code_samples/invoices_v4_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/multi_receipts_detector_v1.txt b/docs/code_samples/multi_receipts_detector_v1.txt index aa30eb14..d7f8c1fd 100644 --- a/docs/code_samples/multi_receipts_detector_v1.txt +++ b/docs/code_samples/multi_receipts_detector_v1.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/passport_v1.txt b/docs/code_samples/passport_v1.txt index 842ec223..45deea1d 100644 --- a/docs/code_samples/passport_v1.txt +++ b/docs/code_samples/passport_v1.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/resume_v1_async.txt b/docs/code_samples/resume_v1_async.txt index c042a33f..69499da0 100644 --- a/docs/code_samples/resume_v1_async.txt +++ b/docs/code_samples/resume_v1_async.txt @@ -9,7 +9,7 @@ require 'mindee' mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key') # Load a file from disk -input_source = mindee_client.source_from_path('/path/to/the/file.ext') +input_source = Mindee::PathInputSource.new('/path/to/the/file.ext') # Parse the file result = mindee_client.parse( diff --git a/docs/code_samples/v2_classification.txt b/docs/code_samples/v2_classification.txt index 455bba0f..7c5e3e10 100644 --- a/docs/code_samples/v2_classification.txt +++ b/docs/code_samples/v2_classification.txt @@ -17,7 +17,7 @@ classification_params = { } # Load a file from disk -input_source = Mindee::Input::Source::PathInputSource.new(input_path) +input_source = Mindee::PathInputSource.new(input_path) # Send for processing response = mindee_client.enqueue_and_get_result( diff --git a/docs/code_samples/v2_crop.txt b/docs/code_samples/v2_crop.txt index e5760cfc..a9b2fbdd 100644 --- a/docs/code_samples/v2_crop.txt +++ b/docs/code_samples/v2_crop.txt @@ -17,7 +17,7 @@ crop_params = { } # Load a file from disk -input_source = Mindee::Input::Source::PathInputSource.new(input_path) +input_source = Mindee::PathInputSource.new(input_path) # Send for processing response = mindee_client.enqueue_and_get_result( diff --git a/docs/code_samples/v2_extraction.txt b/docs/code_samples/v2_extraction.txt index 002cf3d6..2bb15d51 100644 --- a/docs/code_samples/v2_extraction.txt +++ b/docs/code_samples/v2_extraction.txt @@ -29,7 +29,7 @@ extraction_params = { } # Load a file from disk -input_source = Mindee::Input::Source::PathInputSource.new(input_path) +input_source = Mindee::PathInputSource.new(input_path) # Send for processing response = mindee_client.enqueue_and_get_result( diff --git a/docs/code_samples/v2_extraction_webhook.txt b/docs/code_samples/v2_extraction_webhook.txt index 9b5ddd28..d1632c76 100644 --- a/docs/code_samples/v2_extraction_webhook.txt +++ b/docs/code_samples/v2_extraction_webhook.txt @@ -30,7 +30,7 @@ extraction_params = { } # Load a file from disk -input_source = Mindee::Input::Source::PathInputSource.new(input_path) +input_source = Mindee::PathInputSource.new(input_path) # Send for processing response = mindee_client.enqueue( diff --git a/docs/code_samples/v2_ocr.txt b/docs/code_samples/v2_ocr.txt index db4f7b50..5357dc5d 100644 --- a/docs/code_samples/v2_ocr.txt +++ b/docs/code_samples/v2_ocr.txt @@ -17,7 +17,7 @@ ocr_params = { } # Load a file from disk -input_source = Mindee::Input::Source::PathInputSource.new(input_path) +input_source = Mindee::PathInputSource.new(input_path) # Send for processing response = mindee_client.enqueue_and_get_result( diff --git a/docs/code_samples/v2_split.txt b/docs/code_samples/v2_split.txt index bc4b3ebb..17ed609c 100644 --- a/docs/code_samples/v2_split.txt +++ b/docs/code_samples/v2_split.txt @@ -17,7 +17,7 @@ split_params = { } # Load a file from disk -input_source = Mindee::Input::Source::PathInputSource.new(input_path) +input_source = Mindee::PathInputSource.new(input_path) # Send for processing response = mindee_client.enqueue_and_get_result( diff --git a/docs/code_samples/workflow_polling.txt b/docs/code_samples/workflow_polling.txt index 20e20135..0163e5d0 100644 --- a/docs/code_samples/workflow_polling.txt +++ b/docs/code_samples/workflow_polling.txt @@ -11,7 +11,7 @@ workflow_id = 'workflow-id' mindee_client = Mindee::V1::Client.new # Load a file from disk -input_source = mindee_client.source_from_path('path/to/my/file.ext') +input_source = Mindee::PathInputSource.new('path/to/my/file.ext') # Initialize a custom endpoint for this product custom_endpoint = mindee_client.create_endpoint( diff --git a/lib/mindee.rb b/lib/mindee.rb index f8176396..d9fd4a25 100644 --- a/lib/mindee.rb +++ b/lib/mindee.rb @@ -112,6 +112,13 @@ module Product module Search end end + + # Aliases for deeply nested classes + Base64InputSource = Mindee::Input::Source::Base64InputSource + BytesInputSource = Mindee::Input::Source::BytesInputSource + FileInputSource = Mindee::Input::Source::FileInputSource + PathInputSource = Mindee::Input::Source::PathInputSource + URLInputSource = Mindee::Input::Source::URLInputSource end # Shorthand to call the logger from anywhere. diff --git a/sig/mindee.rbs b/sig/mindee.rbs index bdf2c27f..1b6f53e3 100644 --- a/sig/mindee.rbs +++ b/sig/mindee.rbs @@ -5,21 +5,22 @@ class Object end module Mindee - module Error - end + Base64InputSource: singleton(Input::Source::Base64InputSource) + BytesInputSource: singleton(Input::Source::BytesInputSource) + FileInputSource: singleton(Input::Source::FileInputSource) + PathInputSource: singleton(Input::Source::PathInputSource) + URLInputSource: singleton(Input::Source::URLInputSource) - module Extraction + module Dependencies end - module HTTP + module Error end - module PDF + module Geometry end - module Input - module Source - end + module HTTP end module Image @@ -33,30 +34,62 @@ module Mindee module Logging end - module Parsing - module Common + module Input + module Source end + end - module Standard - end + module Logging + end - module Universal - end + module PDF end module V1 - module Product - module EU + module Extraction + end + + module HTTP + end + + module Parsing + module Common + end + + module Standard + end + + module Universal end + end + module Product module FR end + end + end + + module V2 + module FileOperation + module Crop + end - module IND + module Split end + end + + module HTTP + end - module US + module Parsing + module Search end end + + module Product + end + + module Search + end end end diff --git a/spec/input/sources/files_handling_spec.rb b/spec/input/sources/files_handling_spec.rb index fb5a5c10..9248a097 100644 --- a/spec/input/sources/files_handling_spec.rb +++ b/spec/input/sources/files_handling_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'mindee/input/sources' +require 'mindee' require 'base64' require_relative '../../data' @@ -8,7 +8,7 @@ context 'An jpg input file' do it 'should be readable as raw bytes' do file = File.join(FILE_TYPES_DIR, 'receipt.jpg') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents expect(read_f.length).to eq(2) expect(read_f[0]).to eq(File.read(file, mode: 'rb')) @@ -18,7 +18,7 @@ context 'A jpga input file' do it 'should be readable as raw bytes' do file = File.join(FILE_TYPES_DIR, 'receipt.jpga') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents expect(read_f.length).to eq(2) expect(read_f[0]).to eq(File.read(file, mode: 'rb')) @@ -28,7 +28,7 @@ context 'A heic input file' do it 'should be readable as raw bytes' do file = File.join(FILE_TYPES_DIR, 'receipt.heic') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents expect(read_f.length).to eq(2) expect(read_f[0]).to eq(File.read(file, mode: 'rb')) @@ -38,7 +38,7 @@ context 'A tif input file' do it 'should be readable as raw bytes' do file = File.join(FILE_TYPES_DIR, 'receipt.tif') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents expect(read_f.length).to eq(2) expect(read_f[0]).to eq(File.read(file, mode: 'rb')) @@ -48,7 +48,7 @@ context 'A tiff input file' do it 'should be readable as raw bytes' do file = File.join(FILE_TYPES_DIR, 'receipt.tiff') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents expect(read_f.length).to eq(2) expect(read_f[0]).to eq(File.read(file, mode: 'rb')) @@ -58,7 +58,7 @@ context 'A txt input file' do it 'should stay in base64' do file = File.join(FILE_TYPES_DIR, 'receipt.txt') - input = Mindee::Input::Source::Base64InputSource.new(File.read(file), 'receipt.txt') + input = Mindee::Base64InputSource.new(File.read(file), 'receipt.txt') read_f = input.read_contents expect(read_f.length).to eq(2) expect(read_f[0].gsub("\n", '')).to eq(File.read(file).gsub("\n", '')) @@ -68,7 +68,7 @@ context 'A standard pdf input file' do it 'should not be converted' do file = File.join(FILE_TYPES_DIR, 'pdf/not_blank_image_only.pdf') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents file_contents = File.read(file) expect(read_f[0]).to_not eq(Base64.encode64(file_contents)) @@ -80,7 +80,7 @@ context 'A valid written pdf input file' do it 'should not be converted' do file = File.join(FILE_TYPES_DIR, 'pdf/valid_exported.pdf') - input = Mindee::Input::Source::PathInputSource.new(file) + input = Mindee::PathInputSource.new(file) read_f = input.read_contents file_contents = File.read(file) expect(read_f[0]).to_not eq(Base64.encode64(file_contents)) diff --git a/spec/input/sources/sources_spec.rb b/spec/input/sources/sources_spec.rb index c070985d..388fd07a 100644 --- a/spec/input/sources/sources_spec.rb +++ b/spec/input/sources/sources_spec.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require 'mindee' -require 'mindee/input/sources' require 'mindee/error' require 'pdf-reader' if Mindee::Dependencies.all_deps_available? @@ -10,7 +9,7 @@ describe Mindee::Input::Source do context 'An image input file' do it 'should load a JPEG from a path' do - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.jpg') ) expect(input_source.file_mimetype).to eq('image/jpeg') @@ -18,7 +17,7 @@ expect(input_source.page_count).to eq(1) if Mindee::Dependencies.all_deps_available? expect(input_source.pdf?).to eq(false) - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.jpga') ) expect(input_source.file_mimetype).to eq('image/jpeg') @@ -28,7 +27,7 @@ end it 'should load a TIFF from a path' do - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.tif') ) expect(input_source.file_mimetype).to eq('image/tiff') @@ -36,7 +35,7 @@ expect(input_source.page_count).to eq(1) if Mindee::Dependencies.all_deps_available? expect(input_source.pdf?).to eq(false) - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.tiff') ) expect(input_source.file_mimetype).to eq('image/tiff') @@ -46,7 +45,7 @@ end it 'should load a HEIC from a path', :all_deps do - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.heic') ) expect(input_source.file_mimetype).to eq('image/heic') @@ -56,7 +55,7 @@ end it 'should load a HEIC from a path', :all_deps do - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.heif') ) expect(input_source.file_mimetype).to eq('image/heif') @@ -64,7 +63,7 @@ expect(input_source.page_count).to eq(1) expect(input_source.pdf?).to eq(false) - input_source2 = Mindee::Input::Source::PathInputSource.new( + input_source2 = Mindee::PathInputSource.new( File.join(FILE_TYPES_DIR, 'receipt.jpg.heif') ) expect(input_source2.file_mimetype).to eq('image/heif') @@ -76,7 +75,7 @@ context 'A PDF input file', :all_deps do it 'should load a multi-page PDF from a path' do - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(V1_DATA_DIR, 'products/invoices/invoice.pdf') ) expect(input_source.file_mimetype).to eq('application/pdf') @@ -84,7 +83,7 @@ expect(input_source.page_count).to eq(2) expect(input_source.pdf?).to eq(true) - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(V1_DATA_DIR, 'products/invoices/invoice.pdf') ) expect(input_source.file_mimetype).to eq('application/pdf') @@ -92,7 +91,7 @@ expect(input_source.page_count).to eq(2) expect(input_source.pdf?).to eq(true) - input_source = Mindee::Input::Source::PathInputSource.new( + input_source = Mindee::PathInputSource.new( File.join(V1_DATA_DIR, 'products/invoices/invoice_10p.pdf') ) expect(input_source.file_mimetype).to eq('application/pdf') diff --git a/spec/input/sources/url_input_source_spec.rb b/spec/input/sources/url_input_source_spec.rb index 87407af0..9840fc38 100644 --- a/spec/input/sources/url_input_source_spec.rb +++ b/spec/input/sources/url_input_source_spec.rb @@ -3,7 +3,7 @@ require 'mindee' require_relative '../../http/mock_http_response' -describe Mindee::Input::Source::URLInputSource do +describe Mindee::URLInputSource do let(:valid_url) { 'https://validurl/some/file.jpg' } let(:valid_url_no_filename) { 'https://validurl/some/' } let(:invalid_url) { 'http://invalidurl/some/file.jpg' } @@ -50,7 +50,7 @@ it 'handles authentication' do result = url_input_source.as_local_input_source(username: 'user', password: 'pass') - expect(result).to be_a(Mindee::Input::Source::BytesInputSource) + expect(result).to be_a(Mindee::BytesInputSource) end end