Project

sxs

0.0
No commit activity in last 3 years
No release in over 3 years
SNS/SQS wrapper to make development (Redis) and test (Memory) environment transparent.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

SXS

Build Status Gem Version Maintainability Patreon

SNS/SQS wrapper to make development (Redis) and test (Memory) environment transparent.

Install

Add the following code on your Gemfile and run bundle install:

gem 'sxs'

Run the following task to create a SXS migration:

rails g sxs:install

Usage

SXS::Publisher.new('sqs_url', provider: :sqs).publish({ body: 'value' }.to_json)
SXS::Publisher.new('sns_url', provider: :sns).publish({ body: 'value' }.to_json)
SXS::Publisher.new('some_key', provider: :redis).publish({ body: 'value' }.to_json)
SXS::Publisher.new('some_key', provider: :memory).publish({ body: 'value' }.to_json)

On development and test environment provider be overwrited for the following:

development: :redis
test: :memory

To avoid this ovewrite you can specify the provider via ENV SXS_PROVIDER. This will overwrites production too.