diff --git a/lib/mindee/client.rb b/lib/mindee/client.rb index c7980190..3377b4b6 100644 --- a/lib/mindee/client.rb +++ b/lib/mindee/client.rb @@ -237,8 +237,8 @@ def execute_workflow( end product_class ||= Product::Generated::GeneratedV1 - router = Mindee::HTTP::WorkflowRouter.new(workflow_id, api_key: @api_key) - prediction, raw_http = router.execute_workflow(input_source, all_words, full_text, close_file, cropper) + workflow_endpoint = Mindee::HTTP::WorkflowEndpoint.new(workflow_id, api_key: @api_key) + prediction, raw_http = workflow_endpoint.execute_workflow(input_source, all_words, full_text, close_file, cropper) Mindee::Parsing::Common::WorkflowResponse.new(product_class, prediction, raw_http) end diff --git a/lib/mindee/http.rb b/lib/mindee/http.rb index cc12f919..d4b3375e 100644 --- a/lib/mindee/http.rb +++ b/lib/mindee/http.rb @@ -2,4 +2,4 @@ require_relative 'http/endpoint' require_relative 'http/error' -require_relative 'http/workflow_router' +require_relative 'http/workflow_endpoint' diff --git a/lib/mindee/http/workflow_router.rb b/lib/mindee/http/workflow_endpoint.rb similarity index 99% rename from lib/mindee/http/workflow_router.rb rename to lib/mindee/http/workflow_endpoint.rb index 363bb774..68fede4c 100644 --- a/lib/mindee/http/workflow_router.rb +++ b/lib/mindee/http/workflow_endpoint.rb @@ -7,7 +7,7 @@ module Mindee module HTTP # Handles the routing for workflow calls. - class WorkflowRouter + class WorkflowEndpoint # @return [String] attr_reader :api_key # @return [Integer] diff --git a/spec/workflow/workflow_spec.rb b/spec/workflow/workflow_spec.rb index 7c4729df..420b42e5 100644 --- a/spec/workflow/workflow_spec.rb +++ b/spec/workflow/workflow_spec.rb @@ -4,7 +4,7 @@ require 'mindee' require_relative '../data' -RSpec.describe Mindee::Client do +describe Mindee::Client do describe 'execute_workflow' do it 'should deserialize response correctly when sending a document to an execution' do json_file_path = "#{DATA_DIR}/workflows/success.json"