Project

regis

0.0
No commit activity in last 3 years
No release in over 3 years
The REGIS API as typed models
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3.20, ~> 1.3
>= 3.0.0, ~> 3.0

Runtime

>= 2.1.0, ~> 2.1
>= 0.8.0, ~> 0.8
>= 0.0.6, ~> 0.0.6
>= 0.8.0, ~> 0.8
 Project Readme

REGIS

Used to access a REGIS api

Installation

Add this line to your application's Gemfile:

gem 'regis'

And then execute:

$ bundle

Or install it yourself as:

$ gem install regis

Responses are cached with Dalli which requires memcached

$ apt-get install memcached

Configuration

Set config/regis_api.yml

require 'regis'

$REGIS_API = YAML.load_file("config/regis_api.yml")

Regis.client.configure do |config|
  config.url = $REGIS_API['url']
  config.username = $REGIS_API['username']
  config.password = $REGIS_API['password']
  config.cache = Regis::Cache.new(Dalli::Client.new('localhost:11211', { :namespace => "regis", :compress => true, :expires_in => 3600 }))
end

Usage

See features/step_definitions/api_steps

Caching

All responses are cached based on the request URL. So, all endpoints must include variables in the URL itself.

Testing

Set features/config/test_values.yml

$ cucumber