0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Rack middleware to process Web Monetization API states
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
>= 0
~> 13.0
~> 3.0

Runtime

~> 2.2, >= 2.2.2
 Project Readme

Rack Web Monetization Middleware

Contributor Covenant MIT licensed Actions Status Gem Version

The Rack Web Monetization Middleware offers support for handling status updates from the Web Monetization API.

The middleware will process the status updates sent from a client, and if it is a valid status update it will pass it through the rest of the stack. If it is not a valid status then it will return a 403 HTTP status code to the application.

Installation

Add this line to your application's Gemfile:

gem 'rack-monetize'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-monetize

Usage

You can use rack-monetize either in a standalone application or mounted into a Rails application.

As a standalone application

Install the gem on your system:

$ gem install rack-monetize

Then require it from within your config.ru Rack configuration:

use Rack::Monetize::ProcessMonetizeState

An example config.ru can be found in the examples folder. More information on getting up and running with Rack can be found at the Rack GitHub repository.

Mounted into a Rails Application

Require it in your Gemfile:

gem rack-monetize

And then add the middleware to your config/application.rb file to initialize it with your application:

config.middleware.use Rack::Monetize::ProcessMonetizeState

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/benhayehudi/rack-monetize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Rack::Monetize project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.