Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
Noah
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Noah
Commits
9553c5bd
Commit
9553c5bd
authored
Mar 11, 2011
by
John E. Vincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prep for release
parent
fec88421
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
19 deletions
+22
-19
Rakefile
Rakefile
+1
-6
TODO.md
TODO.md
+2
-2
noah-watcher.rb
bin/noah-watcher.rb
+18
-10
version.rb
lib/noah/version.rb
+1
-1
em-hiredis-0.0.1.gem
lib/vendor/em-hiredis/em-hiredis-0.0.1.gem
+0
-0
No files found.
Rakefile
View file @
9553c5bd
...
...
@@ -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
TODO.md
View file @
9553c5bd
...
...
@@ -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
...
...
bin/noah-watcher.rb
View file @
9553c5bd
#!/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 @@ end
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
...
...
lib/noah/version.rb
View file @
9553c5bd
module
Noah
VERSION
=
"0.
0.9
"
VERSION
=
"0.
1
"
end
lib/vendor/em-hiredis/em-hiredis-0.0.1.gem
deleted
100644 → 0
View file @
fec88421
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment