blob: 52e60e389b8abb21f4b431776518c11f6174666c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#
# This file should not be required directly. Use the wrapper in /bin
# instead or run this using daemons:
#
# Daemons.run('tapicero_daemon.rb')
#
require 'tapicero'
module Tapicero
puts " * Observing #{Config.couch_host_without_password}"
puts " * Tracking #{Config.users_db_name}"
stream = CouchStream.new(Config.couch_host + '/' + Config.users_db_name)
users = CouchChanges.new(stream)
creator = CouchDatabaseCreator.new(Config.couch_host)
users.created do |hash|
puts "Created user " + hash[:id]
creator.create(Config.db_prefix + hash[:id], Config.security)
end
users.listen
end
|