summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-09-01 13:52:11 +0200
committerAzul <azul@leap.se>2012-09-01 13:52:11 +0200
commitf908b99e42e07914f18c1c6ec2001926d7796d55 (patch)
tree19da458c6e00f2904881427ea592f3ad0569c6c0
parentf4968f6ed83130c1e8881a1a710e47819e5665a1 (diff)
actually listen to the certs db and print the feed
-rw-r--r--test.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test.rb b/test.rb
index 7b4d50e..1363a8c 100644
--- a/test.rb
+++ b/test.rb
@@ -3,19 +3,16 @@
require 'rubygems'
require "yajl/http_stream"
-Signal.trap('INT') { AMQP.stop{ EM.stop } }
-Signal.trap('TERM'){ AMQP.stop{ EM.stop } }
-
def main
url = "http://localhost:5984/"
- db = "test"
+ db = "leap_certs"
feed_type = "continuous"
since = "0"
queue = "changes"
Yajl::HttpStream.get("#{url}#{db}/_changes?feed=#{feed_type}&since=#{since}", :symbolize_keys => true) do |hash|
if hash[:id]
- #p hash
+ p hash
end
end
end