Commit 9553c5bd authored by John E. Vincent's avatar John E. Vincent

prep for release

parent fec88421
...@@ -13,28 +13,24 @@ end ...@@ -13,28 +13,24 @@ end
task :default => :run task :default => :run
task :test => [:start, :spec, :stop] task :test => :run
desc "Run tests and manage server start/stop" desc "Run tests and manage server start/stop"
task :run => [:start, :spec, :stop] task :run => [:start, :spec, :stop]
desc "Start the Redis server"
task :start do task :start do
puts "Starting redis-server" puts "Starting redis-server"
system "redis-server #{REDIS_CNF}" system "redis-server #{REDIS_CNF}"
end end
desc "Stop the Redis server"
task :stop do task :stop do
puts "Killing redis" puts "Killing redis"
system "killall -TERM redis-server" system "killall -TERM redis-server"
end end
namespace :coverage do namespace :coverage do
desc "Delete aggregate coverage data."
task(:clean) { rm_f "coverage.data" } task(:clean) { rm_f "coverage.data" }
end end
desc "Run Rcov code coverage analysis"
RSpec::Core::RakeTask.new(:coverage) do |t| RSpec::Core::RakeTask.new(:coverage) do |t|
t.rcov = true t.rcov = true
t.verbose = true t.verbose = true
...@@ -128,7 +124,6 @@ rescue LoadError ...@@ -128,7 +124,6 @@ rescue LoadError
"You need YARD installed to generate docs" "You need YARD installed to generate docs"
end end
desc "Demo environment"
task :start_demo do task :start_demo do
puts "Soon, young padawan" puts "Soon, young padawan"
end end
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* Ephemeral nodes * Ephemeral nodes
**IN PROGRESS** **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 * Examples
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
- Done. - Done.
* Watchers * 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 ## Watcher specific stuff
......
#!/usr/bin/env ruby #!/usr/bin/env ruby
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
require 'rubygems' HELP = <<-EOH
require 'rbtrace' Unfortunately, the agent script has some difficult requirements right now.
require 'logger' Please see https://github.com/lusis/Noah/Watcher-Agent for details.
require 'optparse' EOH
require 'em-hiredis' begin
require 'eventmachine' require 'rubygems'
require 'em-http-request' require 'logger'
require 'thin' require 'optparse'
require 'noah' require 'em-hiredis'
require 'json' require 'eventmachine'
require 'em-http-request'
require 'noah'
require 'json'
rescue LoadError
puts HELP
exit
end
LOGGER = Logger.new(STDOUT) LOGGER = Logger.new(STDOUT)
...@@ -73,6 +80,7 @@ end ...@@ -73,6 +80,7 @@ end
EventMachine.run do EventMachine.run do
logger = LOGGER logger = LOGGER
trap("INT") { logger.debug("Shutting down. Watches will not be fired");EM.stop }
noah = EventMachine::NoahAgent.new noah = EventMachine::NoahAgent.new
# Passing messages...like a boss # Passing messages...like a boss
master_channel = EventMachine::Channel.new master_channel = EventMachine::Channel.new
......
module Noah module Noah
VERSION = "0.0.9" VERSION = "0.1"
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment