https://github.com/lostisland/faraday-em_http
Faraday adapter for EventMachine::HttpRequest
https://github.com/lostisland/faraday-em_http
Keywords from Contributors
feature-flag crash-reporting feature feature-toggle rubygems fake marshalling
Last synced: about 13 hours ago
JSON representation
Repository metadata
Faraday adapter for EventMachine::HttpRequest
- Host: GitHub
- URL: https://github.com/lostisland/faraday-em_http
- Owner: lostisland
- License: mit
- Created: 2021-04-25T08:27:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-11-24T19:03:49.000Z (16 days ago)
- Last Synced: 2025-11-27T22:52:59.817Z (13 days ago)
- Language: Ruby
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 5
- Open Issues: 3
- Releases: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
README.md
Faraday Em::Http adapter
This gem is a Faraday adapter for the Em::Http::Request library.
Faraday is an HTTP client library that provides a common interface over many adapters.
Every adapter is defined into its own gem. This gem defines the adapter for Em::Http::Request.
Installation
Add these lines to your application's Gemfile:
gem 'faraday-em_http'
And then execute:
$ bundle install
Or install them yourself as:
$ gem install faraday-em_http
Usage
This adapter can be used to make parallel requests using EventMachine.
The major difference between this and Faraday Em::Synchrony adapter is that it does not use fibers.
Error handling and responses have a slightly different behaviour and structure in some cases. Please run thorough testing scenarios, including connection failures and SSL failures
Base request
require 'faraday/em_http'
conn = Faraday.new(...) do |f|
# no custom options available
f.adapter :em_http
end
Parallel Requests
require 'faraday/em_http'
urls = Array.new(5) { 'http://127.0.0.1:3000' }
conn = Faraday::Connection.new do |builder|
builder.adapter :em_http
end
begin
conn.in_parallel do
puts "Parallel manager: #{conn.parallel_manager}"
@responses = urls.map do |url|
conn.get(url)
end
end
end
# Gather responses outside of block
puts @responses.map(&:status).join(', ')
puts @responses.map(&:status).compact.count
Development
After checking out the repo, run bin/setup to install dependencies. Then, run bin/test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub.
License
The gem is available as open source under the terms of the license.
Code of Conduct
Everyone interacting in the Faraday Em::Http adapter project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Owner metadata
- Name: lostisland
- Login: lostisland
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/2613464?v=4
- Repositories: 22
- Last ynced at: 2024-03-25T19:32:01.094Z
- Profile URL: https://github.com/lostisland
GitHub Events
Total
- Release event: 1
- Delete event: 1
- Issue comment event: 1
- Push event: 3
- Pull request event: 5
- Create event: 3
Last Year
- Release event: 1
- Delete event: 1
- Issue comment event: 1
- Push event: 3
- Pull request event: 5
- Create event: 3
Committers metadata
Last synced: 3 days ago
Total Commits: 26
Total Committers: 5
Avg Commits per committer: 5.2
Development Distribution Score (DDS): 0.385
Commits in past year: 8
Committers in past year: 3
Avg Commits per committer in past year: 2.667
Development Distribution Score (DDS) in past year: 0.375
| Name | Commits | |
|---|---|---|
| Olle Jonsson | o****n@g****m | 16 |
| Matt | i****a | 5 |
| dependabot[bot] | 4****] | 3 |
| Shimokuni | 4****i | 1 |
| Ignacio Huerta | i****o@i****t | 1 |
Committer domains:
- ihuerta.net: 1
Issue and Pull Request metadata
Last synced: 16 days ago
Total issues: 2
Total pull requests: 15
Average time to close issues: N/A
Average time to close pull requests: 1 day
Total issue authors: 2
Total pull request authors: 6
Average comments per issue: 12.5
Average comments per pull request: 0.4
Merged pull request: 14
Bot issues: 0
Bot pull requests: 3
Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 4 days
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 3
Past year bot issues: 0
Past year bot pull requests: 1
Top Issue Authors
- olleolleolle (1)
- jcoglan (1)
Top Pull Request Authors
- olleolleolle (6)
- dependabot[bot] (3)
- iox (2)
- Shimokuni (2)
- iMacTia (1)
- singpolyma (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (3)
- github_actions (1)
Package metadata
- Total packages: 2
-
Total downloads:
- rubygems: 591,068,772 total
- Total docker downloads: 1,921,207,662
- Total dependent packages: 2 (may contain duplicates)
- Total dependent repositories: 22,369 (may contain duplicates)
- Total versions: 6
- Total maintainers: 1
gem.coop: faraday-em_http
Faraday adapter for Em::Http
- Homepage: https://github.com/lostisland/faraday-em_http
- Documentation: http://www.rubydoc.info/gems/faraday-em_http/
- Licenses: MIT
- Latest release: 2.0.1 (published 6 months ago)
- Last Synced: 2025-12-09T06:03:02.311Z (1 day ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 295,760,277 Total
- Docker Downloads: 960,603,831
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.045%
- Downloads: 0.084%
- Docker downloads count: 0.096%
- Maintainers (1)
rubygems.org: faraday-em_http
Faraday adapter for Em::Http
- Homepage: https://github.com/lostisland/faraday-em_http
- Documentation: http://www.rubydoc.info/gems/faraday-em_http/
- Licenses: MIT
- Latest release: 2.0.1 (published 6 months ago)
- Last Synced: 2025-12-05T18:23:20.014Z (5 days ago)
- Versions: 3
- Dependent Packages: 2
- Dependent Repositories: 22,369
- Downloads: 295,308,495 Total
- Docker Downloads: 960,603,831
-
Rankings:
- Downloads: 0.095%
- Docker downloads count: 0.116%
- Dependent repos count: 0.238%
- Dependent packages count: 5.237%
- Average: 9.045%
- Forks count: 13.364%
- Stargazers count: 35.218%
- Maintainers (1)
Dependencies
- bundler ~> 2.0 development
- em-http-request >= 1.1 development
- faraday ~> 1.0 development
- multipart-parser ~> 0.1.1 development
- rake ~> 13.0 development
- rspec ~> 3.0 development
- rubocop ~> 0.91.1 development
- rubocop-packaging ~> 0.5 development
- rubocop-performance ~> 1.0 development
- simplecov ~> 0.19.0 development
- webmock ~> 3.4 development
- actions/checkout v4 composite
- ruby/setup-ruby v1 composite
- actions/checkout v4 composite
- actions/setup-ruby v1 composite
- rubocop >= 0 development
- rubocop-packaging >= 0 development
- rubocop-performance >= 0 development
Score: 24.64019705656016