README.md in qstash-rb-0.1.1 vs README.md in qstash-rb-0.1.2

- old
+ new

@@ -1,25 +1,69 @@ -# Qstash +# QStash -## Installation +[![ci](https://github.com/dvmonroe/qstash-rb/actions/workflows/ci.yml/badge.svg)](https://github.com/dvmonroe/qstash-rb/actions/workflows/ci.yml) +[![Maintainability](https://api.codeclimate.com/v1/badges/56ffdaabb1df70536c88/maintainability)](https://codeclimate.com/github/dvmonroe/qstash-rb/maintainability) +A Ruby client for the [QStash](https://upstash.com/qstash) service from Upstash. + +QStash is an HTTP-based messaging and scheduling solution, designed for serverless and edge computing environments, guaranteeing at-least-once delivery. + +If you're coming from a Rails background, you'll be familiar with ActiveJob, Sidekiq, and/or DelayedJob for background job processing. QStash can run background jobs which may/may not be a use case if you're using Ruby in a serverless environment but it's also much more than that. It can: + +- Schedule messages to be delivered at a later time. +- Serve as a FIFO message queue. +- Serve as a push based fanout exchange (think RabbitMQ). + +## Contents + +- [QStash](#qstash) + - [Contents](#contents) + - [Getting Started](#getting-started) + - [Development](#development) + - [Contributing](#contributing) + - [License](#license) + + +## Getting Started + Add this line to your application's Gemfile: ```ruby gem 'qstash-rb' ``` -And then execute: +Setup your thread safe configuration: - $ bundle +```ruby +QStash.configure do |q| + q.token = "your-qstash-token" + q.url = "https://qstash.upstash.io" +end +``` -Or install it yourself as: +or you can set the following ENV variables at runtime: - $ gem install qstash-rb +```bash +QSTASH_TOKEN=your-qstash-token +QSTASH_URL=https://qstash.upstash.io +``` -## Usage - ## Development + +After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` 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`. + +### Testing across all supported versions: + +To run tests across all gem supported ruby versions (requires Docker): +```sh +bin/dev-test +``` +To run lint across all gem supported ruby versions (requires Docker): +```sh +bin/dev-lint +``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/dvmonroe/qstash-rb.