diff options
author | Azul <azul@riseup.net> | 2013-09-11 08:00:09 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2013-09-11 08:00:09 +0200 |
commit | 3c879a45a0f923e9dc9d7fc25cc04c3be7ffefae (patch) | |
tree | e0e43b8a2adbfcef0c2dd7249b9a3c0674cb92e6 /lib/tapicero | |
parent | 7958827a0ba1126646e01314e7c6bb4f86292dc8 (diff) |
create couch dbs as users are created
Diffstat (limited to 'lib/tapicero')
-rw-r--r-- | lib/tapicero/couch_database_creator.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tapicero/couch_database_creator.rb b/lib/tapicero/couch_database_creator.rb new file mode 100644 index 0000000..a4aaa0f --- /dev/null +++ b/lib/tapicero/couch_database_creator.rb @@ -0,0 +1,14 @@ +require 'couchrest' + +module Tapicero + class CouchDatabaseCreator + + def initialize(host) + @couch = CouchRest.new(host) + end + + def create(name) + @couch.database(name).create! + end + end +end |