Project

maremma

0.02
A long-lived project that still receives updates
Ruby utility library for network requests. Based on Faraday and Excon, provides a wrapper for XML/JSON parsing and error handling. All successful responses are returned as hash with key data, all errors in a JSONAPI-friendly hash with key errors.
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
~> 3.4
~> 0.77.0
~> 1.5, >= 1.5.1
~> 3.0, >= 3.0.3
~> 3.0, >= 3.0.1

Runtime

>= 2.3.6
~> 3.2, >= 3.2.2
~> 0.71.0
>= 2.8.3
~> 1.0, >= 1.0.1
>= 2.0
~> 1.16, >= 1.16.2
~> 0.1.0
 Project Readme

Identifier Gem Version Build Status Code Climate Test Coverage

Maremma: a Ruby library for simplified network calls

Ruby utility library for network requests. Based on Faraday and Excon, provides a wrapper for XML/JSON parsing and error handling. All successful responses are returned as hash with key data, all errors in a JSONAPI-friendly hash with key errors.

Installation

The usual way with Bundler: add the following to your Gemfile to install the current version of the gem:

gem 'maremma'

Then run bundle install to install into your environment.

You can also install the gem system-wide in the usual way:

gem install maremma

Usage

Maremma.get 'https://dlm.datacite.org/heartbeat' => { "data" => { "services"=>{ "mysql"=>"OK",
                                                                               "memcached"=>"OK",
                                                                               "redis"=>"OK",
                                                                               "sidekiq"=>"OK",
                                                                               "postfix"=>"failed" },
                                                                 "version"=>"4.3",
                                                                 "status"=>"failed" }}
Maremma.post 'http://example.com', data: { 'foo' => 'baz' }

License

MIT