Skip to content

Remove multipart-post dependency#13

Open
nachojorge wants to merge 2 commits intogems-upgradefrom
remove-multipart-dependency
Open

Remove multipart-post dependency#13
nachojorge wants to merge 2 commits intogems-upgradefrom
remove-multipart-dependency

Conversation

@nachojorge
Copy link
Collaborator

No description provided.

@nachojorge nachojorge force-pushed the remove-multipart-dependency branch 4 times, most recently from 0c20d6c to a07101d Compare February 7, 2025 20:19
Comment on lines 16 to +24
@connection = PersistentHTTP.new(
:pool_size => 4,
:pool_timeout => 10,
:warn_timeout => 0.25,
:force_retry => false,
:url => url,

:read_timeout => timeout,
:open_timeout => timeout
pool_size: 4,
pool_timeout: 10,
warn_timeout: 0.25,
force_retry: false,
url: url,

read_timeout: timeout,
open_timeout: timeout
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use these values for the proxy client?

Shouldn't we allow to customize this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be patient Juancito 😂 The improvements in persistent connections are the next step.

representation_object = representation_class.new(*fields.values, fields.transform_keys(&:to_s))

fields = nil
representation_class = nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we remove this? Doesn't this keep retained memory?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, after some research, I realized we don't need to do this.

RE_PATH_PARAM = /:\w+/

SEVERE_STATUS_CODES = %w(500 501 503)
HTTP_METHODS_WITH_BODY = %w[post put].freeze
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why are we specifically freezing the strings if the magic comment does it for all strings in this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic comment only freezes strings, and this is an array. The strings inside will be frozen, but not the array itself.

Comment on lines +99 to +102
when '.jpg' then 'image/jpeg'
when '.png' then 'image/png'
when '.gif' then 'image/gif'
else 'application/octet-stream'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about pdfs or so, if we assign them as octet-streams we dont lose anything in the request?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I tried it.

module Angus
module Remote

VERSION = '0.0.16'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.0.0 maybe? 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the improvements in persistent connections, I can officially release version 1.0.0 😎

@nachojorge nachojorge self-assigned this Feb 27, 2025
@nachojorge nachojorge force-pushed the remove-multipart-dependency branch from d833380 to 3145e82 Compare March 5, 2025 14:22
@nachojorge nachojorge force-pushed the remove-multipart-dependency branch from 3145e82 to c2ddf7c Compare November 25, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants