You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a lot that I'd like to do for a 2.0 of this gem dealing with making it more focused on domain models in an object-oriented way, instead of just a glorified JSON-to-Hashie::Mash deserializer (like the similar direction that the Twitter gem that was our genesis has taken). So I'm just creating this issue to acknowledge that some thought has been given to it.
Leading up to a major rewrite though, there's plenty of internal ugly hackery that could stand a good hosing-off too. Someone asked me questions about the code recently and I was appalled by some things I never paid much attention to 😉 (legacy code we inherited from the old, misguided Twitter gem I think). The worst offense I noticed was that the top-level module extends itself with the Configuration module, and then proceeds to define a liberal method_missing. The result is that Configuration attribute accessors like connection_options are in scope throughout most of the library. Gross, and probably a thread safety nightmare as this is singleton state.
Consider using HTTPI, Faraday's future is in question and we've had dependency hell from it in the past—it bugs me how many libraries in the Ruby ecosystem chain applications to dependence on a range of different HTTP clients outside the standard lib (ahem, oauth2).
The text was updated successfully, but these errors were encountered:
There's a lot that I'd like to do for a 2.0 of this gem dealing with making it more focused on domain models in an object-oriented way, instead of just a glorified JSON-to-
Hashie::Mash
deserializer (like the similar direction that the Twitter gem that was our genesis has taken). So I'm just creating this issue to acknowledge that some thought has been given to it.Leading up to a major rewrite though, there's plenty of internal ugly hackery that could stand a good hosing-off too. Someone asked me questions about the code recently and I was appalled by some things I never paid much attention to 😉 (legacy code we inherited from the old, misguided Twitter gem I think). The worst offense I noticed was that the top-level module extends itself with the Configuration module, and then proceeds to define a liberal
method_missing
. The result is thatConfiguration
attribute accessors likeconnection_options
are in scope throughout most of the library. Gross, and probably a thread safety nightmare as this is singleton state.Consider using HTTPI, Faraday's future is in question and we've had dependency hell from it in the past—it bugs me how many libraries in the Ruby ecosystem chain applications to dependence on a range of different HTTP clients outside the standard lib (ahem,
oauth2
).The text was updated successfully, but these errors were encountered: