New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

divan

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

divan

  • 0.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

== Divan, are you insane?

  • Do you need to have CouchDB easy access to revisions?
  • Sometimes do you need to use just one kind of document per database? And sometimes don't?
  • Do you need to use CouchDB without care about activesupport dependencies?
  • Do you need to access HTTP headers of the request that returned your document object?

So you are insane! Divan is a comfortable place for you to rest.

== Look how it's easy!

Model class

class InsanePerson < Divan::Models::InsanePerson view_by :name view_by :doctor end

Simple Usage

patient = InsanePeople.new :name => 'Hannibal', :doctor => 'House' patient.problems = ['Sleepness', 'Headache', 'Alucinations'] patient.save

Acessing HTTP header

patient.last_request.headers[:content_type]

Easy accesso to revisions

patient.alive = true patient.ttl = 7 10.times.do if patient.ttl > 0 patient.ttl -= 1 else patient.alive = false break end patient.save end patient.revision(2).rollback # Be carefull, he's back!

Configuration file

insane_person: host: http://127.0.0.1 port: 5984 database: insane_person

== FAQ

  1. Why are you not using active_model? Because ActiveModel depends on active_support, and sometimes we want a model library that could be used with Rails 2, or any other project could have conflicted dependencies. ActiveModel is a great library, but it'snt a silver bullet for model libraries.
  2. Who needs access to HTTP headers? Sometimes it's interesting to know exactly the time that each document is retuned by database, you can do it calling method last_request in each document.
  3. Why dont you use CouchRest? With CouchRest isn't easy to have access to HTTP headers

== TODO

A better README, documentation and other details

FAQs

Package last updated on 26 Oct 2010

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