Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iron_hide-storage-couchdb_adapter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iron_hide-storage-couchdb_adapter

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

IronHide::Storage::CouchdbAdapter

A CouchDB adapter for the IronHide authorization library.

Installation

Add this line to your application's Gemfile:

gem 'iron_hide-storage-couchdb_adapter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install iron_hide-storage-couchdb_adapter

Setting up a CouchDB server

Assuming that you don't have a CouchDB server, this project comes with a few helper Rake tasks.

Setup a local Couchdb server

The best resource for getting started with CouchDB is http://guide.couchdb.org/

Using brew:

brew install couchdb
couchdb # Starts the server

Setup the server for use with IronHide

To install the helper Rake tasks:

# Rakefile
require 'rake'
require 'iron_hide/couchdb_tasks'

To create a new database, either use the HTTP API, Futon, or this simple Rake task:

bundle exec rake iron_hide:create_db\['http://127.0.0.1:5984/rules'\]

To upload some rules to this database:

bundle exec rake iron_hide:load_rules\['/absolute/path/file.json','http://127.0.0.1:5984/rules'\]

Note: Required step Setup the required views

bundle exec iron_hide:rake create_views\['http://127.0.0.1:5984/rules'\]

Usage

require 'iron_hide'
require 'iron_hide/storage/couchdb_adapter'

IronHide.config do |c|
    c.adapter          = :couchdb
    c.namespace        = 'TestApp'
    c.couchdb_server   = 'http://127.0.0.1:5984' # Default
    c.couchdb_database = 'rules' # Default
end

Contributing

  1. Fork it ( http://github.com//iron_hide-storage-couchdb_adapter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Further Reading

TODO

  • Caching
  • Tests

FAQs

Package last updated on 15 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc