Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xlab-si/server-sent-events-ruby
Ruby library for dealing with server-sent events
https://github.com/xlab-si/server-sent-events-ruby
gem ruby server-sent-events
Last synced: about 2 months ago
JSON representation
Ruby library for dealing with server-sent events
- Host: GitHub
- URL: https://github.com/xlab-si/server-sent-events-ruby
- Owner: xlab-si
- License: apache-2.0
- Created: 2018-09-22T16:46:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-09T20:02:44.000Z (almost 4 years ago)
- Last Synced: 2024-09-30T07:13:45.777Z (3 months ago)
- Topics: gem, ruby, server-sent-events
- Language: Ruby
- Size: 17.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ruby library for using server-sent events
This repository contains server_sent_events gem sources.
## Installation
Add this line to your application's Gemfile:
gem "server_sent_events"
And then execute:
$ bundle
Or install it yourself as:
$ gem install server_sent_events
## Usage
Minimal program that listens to server events and simply prints them to
console would look something like this:require "server_sent_events"
ServerSentEvents.listen("http://127.0.0.1:8001") do |event|
puts event
end## Development
After checking out the repo, run `bin/setup` to install dependencies. Then,
run `rake spec` to run the tests. You can also run `bin/console` for an
interactive prompt that will allow you to experiment.To install this gem onto your local machine, run `bundle exec rake install`.
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](https://rubygems.org).## Contributing
Bug reports and pull requests are welcome on GitHub at
https://github.com/xlab-si/server-sent-events-ruby.