Skip to content

Commit

Permalink
change syntax to be more fitting
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianMindee committed Nov 15, 2024
1 parent 96a99e0 commit 76ac473
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/mindee/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/mindee/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

require_relative 'http/endpoint'
require_relative 'http/error'
require_relative 'http/workflow_router'
require_relative 'http/workflow_endpoint'
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion spec/workflow/workflow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 76ac473

Please sign in to comment.