Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
= A straight-forward client for CouchDB REST API
The intend of this project is to provide a plain, straight-forward abstraction of the CouchDB REST API. The resources exposed by the API are simply wrapped into classes.
{}[http://travis-ci.org/phifty/couchdb]
== An example
server = CouchDB::Server.new "localhost", 5984 database = CouchDB::Database.new server, "test" database.delete_if_exists! database.create_if_missing!
document_one = CouchDB::Document.new database, "_id" => "test_document_1", "category" => "one" document_one.save
document_two = CouchDB::Document.new database, "_id" => "test_document_2", "category" => "two" document_two.save
design = CouchDB::Design.new database, "design_1" view = CouchDB::Design::View.new design, "view_1", "function(document) { emit([ document['category'], document['_id'] ]); }" design.save
collection = view.collection :startkey => [ "one", nil ], :endkey => [ "one", { } ] collection.total_count # => 2 collection.size # => 1 collection[0].id # => "test_document_1" collection[0].key # => [ "one", "test_document_1" ] collection[0].value # => nil
collection.documents.include? document_one # => true collection.documents.include? document_two # => false
This example creates a database on the local CouchDB server (if it's missing) and stores two documents in it. It also creates a design document with a view, that makes it possible to select the results by the document's category.
The collection call on that view, returns a subset of the results, by defining a start- and an endkey. The collection object itself acts as a proxy to the results. This first request of it's content will actually fetch the data from the server.
If the results are accessed by the documents proxy, the include_docs parameter will be passed to the server and the delivered document hashes will be returned as an array of document (CouchDB::Document) objects.
== Development
This project is still under development. Any bug report and contribution is welcome!
== Support
Apart from contribution, support via Flattr[http://flattr.com/thing/108993/A-straight-forward-client-for-CouchDB-REST-API] is welcome.
FAQs
Unknown package
We found that couchdb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.