Comments (5)
Definitely this would be great. My plan is to eventually drop the dependency on Faraday and use net/http instead, but I won't have bandwidth to do that in the mid-term.
from dropbox_api.
I'd like to add an alternative: not depend on any HTTP client, but leave that to the implementor.
For me, gems that depend on specific (versions of) HTTP clients, is very unfortunate:
- It pulls in a lot of dependencies that I have no control over (Faraday depends on 4+ other gems)
- It conflicts with other versions.
- It makes debugging and maintainance a hell if we thus get several different gems.
My use-case is not the most common but not that unusual either:
We have a storage layer that offer people to store files on their preferred platform: S3, GoogleDrive, Dropbox, FTP etc. We integrate many cloud APIs.
Many of the gems for these platforms come with their own (version of) HTTP clients. For example, I now have to maintain a dependency tree with net/http, faraday, excon, typhous, and httparty. We had to forego a (rather crappy) GoogleDrive/GC, gem because it required a faraday version incompatible with this gem here.
Alternatives, I would love to see considered are:
- A generic adapter-like setup. E.g. https://www.ruby-toolbox.com/projects/httpi offers a generic layer over all popular HTTP clients: the implementor can inject their preferred libs.
- Rely on net/http only. Ruby STDlib http client is cumbersome, but it is available and consistent to all without conflicting. E.g. AWS::S3 uses this method.
Sorry for the long winded post. Hopefully this is something worth considering. If so, I can probably find some time to code this, though not on short notice.
And, in case I come over as critical: not at all: I love this great Gem!
from dropbox_api.
@berkes Faraday already is a generic layer over other HTTP clients. Certainly switching to a different one is one option.
Either way, I'll need some solution, or will perhaps fork the gem.
from dropbox_api.
Thanks for comment @Jesus ! If someone can find time to make a PR expanding Faraday support to allow 1.0-2.0, would you be able to find time to review/merge/release?
from dropbox_api.
Wait a second, I see it's already been done!
dropbox_api/dropbox_api.gemspec
Line 23 in 11bd1cf
And 0.1.21 released allowing Faraday 2.x.
Thanks @Jesus!
I am closing this issue, it is resolved!
from dropbox_api.
Related Issues (20)
- How to generate a link to a dropbox folder? HOT 5
- When will you release the next version? HOT 2
- Release v0.1.11
- Net::OpenTimeout at... execution expired HOT 3
- List_folder result entries breaks for shared folder HOT 1
- Access data value HOT 1
- Please upgrade dependency faraday to ~> 0.17 HOT 2
- Anyway to download online file with dl=0 or dl=1? HOT 1
- please use more reasonable faraday restriction, allow 1.0.1? HOT 3
- Please update search endpoint to use the v2 path HOT 4
- Refresh tokens support HOT 6
- Catching 401 HOT 2
- WARNING: Faraday::Connection#authorization HOT 1
- Token is malformed, Expecting "Bearer <oauth2-access-token>" HOT 2
- Dropbox
- The client doesn't work for the business api access token. HOT 1
- update to 2.x of `oauth` gem as dependency? HOT 3
- How do you get the token_hash for refresh tokens? HOT 3
- NoMethodError raised when dropbox responds with 429
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropbox_api.