Permalink
Browse files

prep for release

  • Loading branch information...
1 parent fec8842 commit 9553c5bd730e968e1f427a2f7b5b762ffd4acaee @lusis committed Mar 11, 2011
Showing with 22 additions and 19 deletions.
  1. +1 −6 Rakefile
  2. +2 −2 TODO.md
  3. +18 −10 bin/noah-watcher.rb
  4. +1 −1 lib/noah/version.rb
  5. BIN lib/vendor/em-hiredis/em-hiredis-0.0.1.gem
View
@@ -13,28 +13,24 @@ end
task :default => :run
-task :test => [:start, :spec, :stop]
+task :test => :run
desc "Run tests and manage server start/stop"
task :run => [:start, :spec, :stop]
-desc "Start the Redis server"
task :start do
puts "Starting redis-server"
system "redis-server #{REDIS_CNF}"
end
-desc "Stop the Redis server"
task :stop do
puts "Killing redis"
system "killall -TERM redis-server"
end
namespace :coverage do
- desc "Delete aggregate coverage data."
task(:clean) { rm_f "coverage.data" }
end
-desc "Run Rcov code coverage analysis"
RSpec::Core::RakeTask.new(:coverage) do |t|
t.rcov = true
t.verbose = true
@@ -128,7 +124,6 @@ rescue LoadError
"You need YARD installed to generate docs"
end
-desc "Demo environment"
task :start_demo do
puts "Soon, young padawan"
end
View
@@ -28,7 +28,7 @@
* Ephemeral nodes
**IN PROGRESS**
- Not sure how I want to implement that. Not too keen on storing them as in-memory hashes. Maybe a LRU in Redis?
+ implement lifetime support
* Examples
@@ -56,7 +56,7 @@
- Done.
* Watchers
- - Partially done. Framework is in place to create a custom Watcher by hooking directly into Redis. Need to expand that to "official" watchers
+ - Done. GET PUT DELETE are all available at the '/w/' endpoint now!
## Watcher specific stuff
View
@@ -1,15 +1,22 @@
#!/usr/bin/env ruby
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
-require 'rubygems'
-require 'rbtrace'
-require 'logger'
-require 'optparse'
-require 'em-hiredis'
-require 'eventmachine'
-require 'em-http-request'
-require 'thin'
-require 'noah'
-require 'json'
+ HELP = <<-EOH
+ Unfortunately, the agent script has some difficult requirements right now.
+ Please see https://github.com/lusis/Noah/Watcher-Agent for details.
+ EOH
+begin
+ require 'rubygems'
+ require 'logger'
+ require 'optparse'
+ require 'em-hiredis'
+ require 'eventmachine'
+ require 'em-http-request'
+ require 'noah'
+ require 'json'
+rescue LoadError
+ puts HELP
+ exit
+end
LOGGER = Logger.new(STDOUT)
@@ -73,6 +80,7 @@ def broker(msg)
EventMachine.run do
logger = LOGGER
+ trap("INT") { logger.debug("Shutting down. Watches will not be fired");EM.stop }
noah = EventMachine::NoahAgent.new
# Passing messages...like a boss
master_channel = EventMachine::Channel.new
View
@@ -1,3 +1,3 @@
module Noah
- VERSION = "0.0.9"
+ VERSION = "0.1"
end
Binary file not shown.

0 comments on commit 9553c5b

Please sign in to comment.