noah 0.4-jruby → 0.6.pre-jruby
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -69
- data/lib/noah.rb +1 -0
- data/lib/noah/agent.rb +1 -0
- data/lib/noah/agents/base_agent.rb +4 -2
- data/lib/noah/agents/http_agent.rb +1 -1
- data/lib/noah/agents/https_agent.rb +6 -0
- data/lib/noah/app.rb +8 -6
- data/lib/noah/exceptions.rb +0 -0
- data/lib/noah/linkable.rb +21 -0
- data/lib/noah/models.rb +14 -25
- data/lib/noah/models/applications.rb +19 -9
- data/lib/noah/models/configurations.rb +32 -13
- data/lib/noah/models/ephemerals.rb +7 -6
- data/lib/noah/models/hosts.rb +11 -5
- data/lib/noah/models/link.rb +70 -29
- data/lib/noah/models/services.rb +11 -2
- data/lib/noah/models/tags.rb +86 -5
- data/lib/noah/models/watchers.rb +0 -1
- data/lib/noah/{application_routes.rb → routes/applications.rb} +31 -27
- data/lib/noah/routes/configurations.rb +77 -0
- data/lib/noah/{ephemeral_routes.rb → routes/ephemerals.rb} +5 -5
- data/lib/noah/{host_routes.rb → routes/hosts.rb} +16 -1
- data/lib/noah/routes/links.rb +16 -0
- data/lib/noah/{service_routes.rb → routes/services.rb} +28 -12
- data/lib/noah/routes/tags.rb +15 -0
- data/lib/noah/{watcher_routes.rb → routes/watchers.rb} +0 -0
- data/lib/noah/taggable.rb +30 -0
- data/lib/noah/version.rb +1 -1
- data/noah.gemspec +5 -4
- data/spec/application_spec.rb +3 -3
- data/spec/configuration_spec.rb +19 -12
- data/spec/host_spec.rb +5 -5
- data/spec/noahapp_application_spec.rb +11 -13
- data/spec/noahapp_configuration_spec.rb +63 -40
- data/spec/noahapp_ephemeral_spec.rb +15 -15
- data/spec/noahapp_host_spec.rb +4 -6
- data/spec/noahapp_service_spec.rb +8 -7
- data/spec/service_spec.rb +2 -2
- data/spec/spec_helper.rb +5 -5
- data/spec/support/sample_data.rb +87 -0
- data/spec/tag_spec.rb +78 -0
- data/views/index.haml +7 -1
- metadata +335 -311
- data/lib/noah/configuration_routes.rb +0 -81
- data/lib/noah/models/link_member.rb +0 -18
@@ -13,7 +13,7 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
13
13
|
|
14
14
|
describe "GET" do
|
15
15
|
it "all ephemerals should return 404" do
|
16
|
-
get '/
|
16
|
+
get '/ephemerals'
|
17
17
|
last_response.should_not be_ok
|
18
18
|
last_response.status.should == 404
|
19
19
|
response = last_response.should return_json
|
@@ -22,13 +22,13 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "named path with data should work" do
|
25
|
-
get '/
|
25
|
+
get '/ephemerals/foo/bar/baz'
|
26
26
|
last_response.should be_ok
|
27
27
|
last_response.body.should == 'value1'
|
28
28
|
end
|
29
29
|
|
30
30
|
it "named path without data should work" do
|
31
|
-
get '/
|
31
|
+
get '/ephemerals/baz/bar'
|
32
32
|
last_response.status.should == 200
|
33
33
|
last_response.body.should == ""
|
34
34
|
end
|
@@ -45,7 +45,7 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
45
45
|
|
46
46
|
describe "PUT" do
|
47
47
|
it "new ephemeral with data should work" do
|
48
|
-
put '/
|
48
|
+
put '/ephemerals/whiz/bang/', 'value3'
|
49
49
|
last_response.should be_ok
|
50
50
|
response = last_response.should return_json
|
51
51
|
response['result'].should == 'success'
|
@@ -55,7 +55,7 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
55
55
|
end
|
56
56
|
|
57
57
|
it "new ephemeral without data should work" do
|
58
|
-
put '/
|
58
|
+
put '/ephemerals/bang/whiz'
|
59
59
|
last_response.should be_ok
|
60
60
|
response = last_response.should return_json
|
61
61
|
response['result'].should == 'success'
|
@@ -67,35 +67,35 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
67
67
|
|
68
68
|
it "existing ephemeral with data should work" do
|
69
69
|
Noah::Ephemeral.create(:path => '/new/ephemeral', :data => 'old_value')
|
70
|
-
get '/
|
70
|
+
get '/ephemerals/new/ephemeral'
|
71
71
|
last_response.should be_ok
|
72
72
|
last_response.body.should == 'old_value'
|
73
|
-
put '/
|
73
|
+
put '/ephemerals/new/ephemeral', 'new_value'
|
74
74
|
last_response.should be_ok
|
75
|
-
get '/
|
75
|
+
get '/ephemerals/new/ephemeral'
|
76
76
|
last_response.should be_ok
|
77
77
|
last_response.body.should == 'new_value'
|
78
78
|
end
|
79
79
|
it "existing ephemeral without data should work" do
|
80
80
|
Noah::Ephemeral.create(:path => '/a/random/key')
|
81
|
-
get '/
|
81
|
+
get '/ephemerals/a/random/key'
|
82
82
|
last_response.should be_ok
|
83
83
|
last_response.body.should == ""
|
84
|
-
put '/
|
84
|
+
put '/ephemerals/a/random/key', 'a new value'
|
85
85
|
last_response.should be_ok
|
86
|
-
get '/
|
86
|
+
get '/ephemerals/a/random/key'
|
87
87
|
last_response.should be_ok
|
88
88
|
last_response.body.should == 'a new value'
|
89
89
|
end
|
90
90
|
it "ephemeral with reserved word in subpath should work" do
|
91
91
|
Noah::PROTECTED_PATHS.each do |path|
|
92
|
-
put "/
|
92
|
+
put "/ephemerals/a/valid/path/with/#{path}"
|
93
93
|
last_response.should be_ok
|
94
94
|
end
|
95
95
|
end
|
96
96
|
it "ephemeral with reserved word as path should not work" do
|
97
97
|
Noah::PROTECTED_PATHS.each do |path|
|
98
|
-
put "/
|
98
|
+
put "/ephemerals/#{path}/other/stuff"
|
99
99
|
last_response.should_not be_ok
|
100
100
|
response = last_response.should return_json
|
101
101
|
response['error_message'].should == 'Path is reserved'
|
@@ -108,7 +108,7 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
108
108
|
it "existing path should work" do
|
109
109
|
e = Noah::Ephemeral.new(:path => '/slart/i/bart/fast', :data => 'someddata')
|
110
110
|
e.save
|
111
|
-
delete "/
|
111
|
+
delete "/ephemerals/slart/i/bart/fast"
|
112
112
|
last_response.should be_ok
|
113
113
|
response = last_response.should return_json
|
114
114
|
response['result'].should == 'success'
|
@@ -118,7 +118,7 @@ describe "Using the Ephemeral API", :reset_redis => true do
|
|
118
118
|
end
|
119
119
|
|
120
120
|
it "invalid path should not work" do
|
121
|
-
delete '/
|
121
|
+
delete '/ephemerals/fork/spoon/knife'
|
122
122
|
last_response.should_not be_ok
|
123
123
|
last_response.status.should == 404
|
124
124
|
response = last_response.should return_json
|
data/spec/noahapp_host_spec.rb
CHANGED
@@ -20,12 +20,10 @@ describe "Using the Host API", :reset_redis => false, :populate_sample_data => t
|
|
20
20
|
response["name"].should == "localhost"
|
21
21
|
response["status"].should == "up"
|
22
22
|
services.size.should == 2
|
23
|
-
services.
|
24
|
-
services.
|
25
|
-
services
|
26
|
-
services
|
27
|
-
services.last["status"].should == "up"
|
28
|
-
services.last["host"].should == "localhost"
|
23
|
+
services.has_key?("redis").should == true
|
24
|
+
services.has_key?("noah").should == true
|
25
|
+
services["redis"].should == "up"
|
26
|
+
services["noah"].should == "up"
|
29
27
|
end
|
30
28
|
|
31
29
|
it "named service for host should work" do
|
@@ -16,18 +16,19 @@ describe "Using the Service API", :reset_redis => false, :populate_sample_data =
|
|
16
16
|
get '/services'
|
17
17
|
last_response.should be_ok
|
18
18
|
response = last_response.should return_json
|
19
|
-
response.is_a?(
|
19
|
+
response.is_a?(Hash).should == true
|
20
20
|
end
|
21
21
|
it "all named services should work" do
|
22
22
|
get "/services/#{@sample_service[:name]}"
|
23
23
|
last_response.should be_ok
|
24
24
|
response = last_response.should return_json
|
25
|
-
response.is_a?(
|
26
|
-
s
|
27
|
-
s
|
28
|
-
s
|
29
|
-
s[
|
30
|
-
s["
|
25
|
+
response.is_a?(Hash).should == true
|
26
|
+
response.has_key?(@s.name).should == true
|
27
|
+
response[@s.name].is_a?(Hash).should == true
|
28
|
+
response[@s.name].has_key?(@h.name).should == true
|
29
|
+
response[@s.name][@h.name].is_a?(Hash).should == true
|
30
|
+
response[@s.name][@h.name]["id"].should == @s.id
|
31
|
+
response[@s.name][@h.name]["status"].should == @s.status
|
31
32
|
end
|
32
33
|
it "named service for host should work" do
|
33
34
|
get "/services/#{@sample_service[:name]}/#{@sample_host[:name]}"
|
data/spec/service_spec.rb
CHANGED
@@ -57,8 +57,8 @@ describe "Noah Service Model", :reset_redis => true do
|
|
57
57
|
h.save
|
58
58
|
end
|
59
59
|
Noah::Services.all.size.should == 2
|
60
|
-
Noah::Services.all.
|
61
|
-
Noah::Services.all.
|
60
|
+
Noah::Services.all.has_key?("s1").should == true
|
61
|
+
Noah::Services.all.has_key?("s2").should == true
|
62
62
|
end
|
63
63
|
|
64
64
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -29,9 +29,9 @@ RSpec.configure do |config|
|
|
29
29
|
|
30
30
|
a = Noah::Application.create(:name => 'noah')
|
31
31
|
if a.save
|
32
|
-
cr = Noah::Configuration.create(:name => 'redis', :format => 'string', :body => 'redis://127.0.0.1:6379/0'
|
33
|
-
ch = Noah::Configuration.create(:name => 'host', :format => 'string', :body => 'localhost'
|
34
|
-
cp = Noah::Configuration.create(:name => 'port', :format => 'string', :body => '9292'
|
32
|
+
cr = Noah::Configuration.create(:name => 'redis', :format => 'string', :body => 'redis://127.0.0.1:6379/0')
|
33
|
+
ch = Noah::Configuration.create(:name => 'host', :format => 'string', :body => 'localhost')
|
34
|
+
cp = Noah::Configuration.create(:name => 'port', :format => 'string', :body => '9292')
|
35
35
|
%w[cr ch cp].each do |c|
|
36
36
|
a.configurations << eval(c)
|
37
37
|
end
|
@@ -53,13 +53,13 @@ EOJ
|
|
53
53
|
|
54
54
|
a1 = Noah::Application.create(:name => 'myrailsapp1')
|
55
55
|
if a1.save
|
56
|
-
c1 = Noah::Configuration.create(:name => 'database.yml', :format => 'yaml', :body => my_yaml
|
56
|
+
c1 = Noah::Configuration.create(:name => 'database.yml', :format => 'yaml', :body => my_yaml)
|
57
57
|
a1.configurations << c1
|
58
58
|
end
|
59
59
|
|
60
60
|
a2 = Noah::Application.create(:name => 'myrestapp1')
|
61
61
|
if a2.save
|
62
|
-
c2 = Noah::Configuration.create(:name => 'config.json', :format => 'json', :body => my_json
|
62
|
+
c2 = Noah::Configuration.create(:name => 'config.json', :format => 'json', :body => my_json)
|
63
63
|
a2.configurations << c2
|
64
64
|
end
|
65
65
|
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'noah'
|
2
|
+
|
3
|
+
Ohm::redis.flushdb
|
4
|
+
puts "Creating sample entries - Watchers"
|
5
|
+
Noah::Watcher.create :endpoint => "dummy://applications", :pattern => "//noah/applications"
|
6
|
+
Noah::Watcher.create :endpoint => "dummy://configurations", :pattern => "//noah/configurations"
|
7
|
+
Noah::Watcher.create :endpoint => "dummy://hosts", :pattern => "//noah/hosts"
|
8
|
+
Noah::Watcher.create :endpoint => "dummy://services", :pattern => "//noah/services"
|
9
|
+
Noah::Watcher.create :endpoint => "dummy://ephemerals", :pattern => "//noah/ephemerals"
|
10
|
+
puts "Creating Host entry for 'localhost'"
|
11
|
+
h = Noah::Host.create(:name => 'localhost', :status => "up")
|
12
|
+
if h.save
|
13
|
+
%w[redis noah].each do |service|
|
14
|
+
puts "Create Service entry for #{service}"
|
15
|
+
s = Noah::Service.create(:name => service, :status => "up", :host_id => h.id)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
puts "Creating Application entry for 'noah'"
|
20
|
+
a = Noah::Application.create(:name => 'noah')
|
21
|
+
if a.save
|
22
|
+
puts "Creating Configuration entry for 'noah'"
|
23
|
+
cr = Noah::Configuration.create(:name => 'redis_url', :format => 'string', :body => 'redis://127.0.0.1:6379/0')
|
24
|
+
ch = Noah::Configuration.create(:name => 'noah_host', :format => 'string', :body => 'localhost')
|
25
|
+
cp = Noah::Configuration.create(:name => 'noah_port', :format => 'string', :body => '9292')
|
26
|
+
[cr,ch,cp].each do |c|
|
27
|
+
a.configurations << c
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
puts "Creating sample entries - Host and Service"
|
32
|
+
%w[host1.domain.com host2.domain.com host3.domain.com].each do |host|
|
33
|
+
h = Noah::Host.create(:name => host, :status => "up")
|
34
|
+
if h.save
|
35
|
+
%w[http https smtp mysql].each do |service|
|
36
|
+
s = Noah::Service.create(:name => service, :status => "pending", :host_id => h.id)
|
37
|
+
h.services << s
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
puts "Creating sample entries - Application and Configuration"
|
43
|
+
my_yaml = <<EOY
|
44
|
+
development:
|
45
|
+
database: development_database
|
46
|
+
adapter: mysql
|
47
|
+
username: dev_user
|
48
|
+
password: dev_password
|
49
|
+
EOY
|
50
|
+
my_json = <<EOJ
|
51
|
+
{
|
52
|
+
"id":"hostname",
|
53
|
+
"data":"localhost"
|
54
|
+
}
|
55
|
+
EOJ
|
56
|
+
|
57
|
+
a1 = Noah::Application.create(:name => 'myrailsapp1')
|
58
|
+
if a1.save
|
59
|
+
c1 = Noah::Configuration.create(:name => 'database.yml', :format => 'yaml', :body => my_yaml)
|
60
|
+
a1.configurations << c1
|
61
|
+
end
|
62
|
+
|
63
|
+
a2 = Noah::Application.create(:name => 'myrestapp1')
|
64
|
+
if a2.save
|
65
|
+
c2 = Noah::Configuration.create(:name => 'config.json', :format => 'json', :body => my_json)
|
66
|
+
a2.configurations << c2
|
67
|
+
end
|
68
|
+
|
69
|
+
puts "Creating sample entries - Ephemerals"
|
70
|
+
e1 = Noah::Ephemeral.create(:path => '/some/random/path/item1', :data => 'some_data')
|
71
|
+
e2 = Noah::Ephemeral.create(:path => '/some/random/path/', :data => '{"children":["item1", "item2"]}')
|
72
|
+
|
73
|
+
puts "Creating sample entries - Links and Tags"
|
74
|
+
l1 = Noah::Link.new
|
75
|
+
l1.path = "/my_sample_organization"
|
76
|
+
l1.save
|
77
|
+
l1.nodes = [a1, c2, Noah::Host.find(:name => 'localhost').first, Noah::Service.find(:name => 'redis').first, e1, e2]
|
78
|
+
a1.tag! ["production", "sample_data"]
|
79
|
+
e2.tag! ["ephemeral", "development"]
|
80
|
+
c1.tag! "development"
|
81
|
+
Noah::Service[1].tag! "development"
|
82
|
+
Noah::Service[2].tag! ["development", "out-of-service"]
|
83
|
+
Noah::Service[2].link! "/my_sample_organization"
|
84
|
+
|
85
|
+
|
86
|
+
puts "Sample data populated!"
|
87
|
+
|
data/spec/tag_spec.rb
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Using the Tag Model", :reset_redis => true do
|
4
|
+
before(:each) do
|
5
|
+
Ohm.redis.flushdb
|
6
|
+
@tags1 = ["production", "databases", "in-service"]
|
7
|
+
@tags2 = "out-of-service"
|
8
|
+
@host = Noah::Host.create(:name => 'tagged_host', :status => 'up')
|
9
|
+
@service = Noah::Service.create(:name => 'tagged_service', :status => 'down', :host_id => @host.id)
|
10
|
+
@application = Noah::Application.create(:name => 'tagged_application')
|
11
|
+
@configuration = Noah::Configuration.create(:name => 'tagged_configuration', :format => 'string', :body => 'some_string')
|
12
|
+
@ephemeral = Noah::Ephemeral.create(:path => '/tagged/ephemeral')
|
13
|
+
end
|
14
|
+
after(:each) do
|
15
|
+
Ohm.redis.flushdb
|
16
|
+
end
|
17
|
+
describe "should" do
|
18
|
+
it "create a new Noah::Tag" do
|
19
|
+
t = Noah::Tag.new(:name => 'some_tag')
|
20
|
+
t.valid?.should == true
|
21
|
+
t.save
|
22
|
+
t.is_new?.should == true
|
23
|
+
b = Noah::Tag.find(:name => 'some_tag').first
|
24
|
+
b.should == t
|
25
|
+
end
|
26
|
+
it "create a new Noah::Tag and add a member" do
|
27
|
+
t = Noah::Tag.create(:name => 'some_tag')
|
28
|
+
t.members = @host
|
29
|
+
@host.tags.member?(t).should == true
|
30
|
+
t.members[:hosts].size.should == 1
|
31
|
+
t.members[:hosts].member?(@host).should == true
|
32
|
+
end
|
33
|
+
it "tag! an existing object with a single tag" do
|
34
|
+
@host.tag! @tags2
|
35
|
+
t = Noah::Tag.find(:name => @tags2).first
|
36
|
+
@host.tags.member?(t).should == true
|
37
|
+
t.members[:hosts].size.should == 1
|
38
|
+
t.members[:hosts].member?(@host).should == true
|
39
|
+
end
|
40
|
+
it "tag! an existing object with an array of tags" do
|
41
|
+
@host.tag! @tags1
|
42
|
+
@tags1.each do |tag|
|
43
|
+
t = Noah::Tag.find(:name => tag).first
|
44
|
+
@host.tags.member?(t).should == true
|
45
|
+
t.members[:hosts].size.should == 1
|
46
|
+
t.members[:hosts].member?(@host).should == true
|
47
|
+
end
|
48
|
+
Noah::Tag.all.size.should == 3
|
49
|
+
end
|
50
|
+
it "tag all object types and find via tagged" do
|
51
|
+
@host.tag! @tags1
|
52
|
+
@ephemeral.tag! @tags1
|
53
|
+
@configuration.tag! @tags1
|
54
|
+
@application.tag! @tags1
|
55
|
+
@service.tag! @tags1
|
56
|
+
@tags1.each do |tag|
|
57
|
+
Noah::Tags.tagged(tag).size.should == 5
|
58
|
+
[@host, @service, @application, @configuration, @ephemeral].each do |o|
|
59
|
+
Noah::Tags.tagged(tag).values.flatten.member?(o).should == true
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "should not" do
|
66
|
+
it "create a new Noah::Tag without a name" do
|
67
|
+
a = Noah::Tag.create
|
68
|
+
a.valid?.should == false
|
69
|
+
a.errors.should == [[:name, :not_present]]
|
70
|
+
end
|
71
|
+
it "create a tag with a duplicate name" do
|
72
|
+
a = Noah::Tag.create(:name => 'tag1')
|
73
|
+
b = Noah::Tag.create(:name => 'tag1')
|
74
|
+
b.valid?.should == false
|
75
|
+
b.errors.should == [[:name, :not_unique]]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
data/views/index.haml
CHANGED
@@ -52,4 +52,10 @@
|
|
52
52
|
%a{:href => "configurations/myrailsapp1/database.yml"} database.yml file for myrailsapp1 (should return the proper content-type)
|
53
53
|
%li
|
54
54
|
%a{:href => "configurations/myrestapp1/config.json"} config.json file for myrestapp1
|
55
|
-
|
55
|
+
#header
|
56
|
+
%h2 Links
|
57
|
+
%ul
|
58
|
+
%li
|
59
|
+
%a{:href => "my_sample_organization"} Sample Organization Link
|
60
|
+
%li
|
61
|
+
%a{:href => "my_sample_organization/hosts"} Sample Organization Link - Hosts
|
metadata
CHANGED
@@ -1,349 +1,373 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version:
|
4
|
+
prerelease: 4
|
5
|
+
version: 0.6.pre
|
6
6
|
platform: jruby
|
7
7
|
authors:
|
8
|
-
- John E. Vincent
|
8
|
+
- John E. Vincent
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-04-18 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
- !ruby/object:Gem::Dependency
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
- !ruby/object:Gem::Dependency
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
- !ruby/object:Gem::Dependency
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
- !ruby/object:Gem::Dependency
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
- !ruby/object:Gem::Dependency
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: eventmachine
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - "="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.0.0.beta.3
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: em-http-request
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - "="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 1.0.0.beta.3
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: redis
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - "="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.2.0
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: nest
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - "="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.1.0
|
58
|
+
type: :runtime
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: rack
|
62
|
+
prerelease: false
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - "="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.2.2
|
69
|
+
type: :runtime
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: tilt
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - "="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.2.2
|
80
|
+
type: :runtime
|
81
|
+
version_requirements: *id006
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: sinatra
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - "="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 1.2.3
|
91
|
+
type: :runtime
|
92
|
+
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: ohm
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - "="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 0.1.3
|
102
|
+
type: :runtime
|
103
|
+
version_requirements: *id008
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: ohm-contrib
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - "="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 0.1.1
|
113
|
+
type: :runtime
|
114
|
+
version_requirements: *id009
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: haml
|
117
|
+
prerelease: false
|
118
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - "="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 3.0.25
|
124
|
+
type: :runtime
|
125
|
+
version_requirements: *id010
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: vegas
|
128
|
+
prerelease: false
|
129
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - "="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 0.1.8
|
135
|
+
type: :runtime
|
136
|
+
version_requirements: *id011
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: jruby-openssl
|
139
|
+
prerelease: false
|
140
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: "0"
|
146
|
+
type: :runtime
|
147
|
+
version_requirements: *id012
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: json
|
150
|
+
prerelease: false
|
151
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
152
|
+
none: false
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: "0"
|
157
|
+
type: :runtime
|
158
|
+
version_requirements: *id013
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: warbler
|
161
|
+
prerelease: false
|
162
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - "="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 1.2.1
|
168
|
+
type: :development
|
169
|
+
version_requirements: *id014
|
170
|
+
- !ruby/object:Gem::Dependency
|
171
|
+
name: diff-lcs
|
172
|
+
prerelease: false
|
173
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
174
|
+
none: false
|
175
|
+
requirements:
|
176
|
+
- - "="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 1.1.2
|
179
|
+
type: :development
|
180
|
+
version_requirements: *id015
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: sinatra-reloader
|
183
|
+
prerelease: false
|
184
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - "="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: 0.5.0
|
190
|
+
type: :development
|
191
|
+
version_requirements: *id016
|
192
|
+
- !ruby/object:Gem::Dependency
|
193
|
+
name: rspec
|
194
|
+
prerelease: false
|
195
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
196
|
+
none: false
|
197
|
+
requirements:
|
198
|
+
- - ~>
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: "2.5"
|
201
|
+
type: :development
|
202
|
+
version_requirements: *id017
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: rcov
|
205
|
+
prerelease: false
|
206
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
207
|
+
none: false
|
208
|
+
requirements:
|
209
|
+
- - "="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: 0.9.9
|
212
|
+
type: :development
|
213
|
+
version_requirements: *id018
|
214
|
+
- !ruby/object:Gem::Dependency
|
215
|
+
name: rack-test
|
216
|
+
prerelease: false
|
217
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
218
|
+
none: false
|
219
|
+
requirements:
|
220
|
+
- - "="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 0.5.7
|
223
|
+
type: :development
|
224
|
+
version_requirements: *id019
|
225
225
|
description: Application registry based on Apache Zookeeper
|
226
226
|
email:
|
227
|
-
- lusis.org+rubygems.org@gmail.com
|
227
|
+
- lusis.org+rubygems.org@gmail.com
|
228
228
|
executables:
|
229
|
-
- noah
|
230
|
-
- noah-watcher.rb
|
229
|
+
- noah
|
230
|
+
- noah-watcher.rb
|
231
231
|
extensions: []
|
232
232
|
|
233
233
|
extra_rdoc_files: []
|
234
234
|
|
235
235
|
files:
|
236
|
-
- .autotest
|
237
|
-
- .gemtest
|
238
|
-
- .gitignore
|
239
|
-
- Gemfile
|
240
|
-
- LICENSE
|
241
|
-
- README.md
|
242
|
-
- Rakefile
|
243
|
-
- TODO.md
|
244
|
-
- autotest/discover.rb
|
245
|
-
- bin/noah
|
246
|
-
- bin/noah-watcher.rb
|
247
|
-
- config.ru
|
248
|
-
- config/warble.rb
|
249
|
-
- examples/Kirkfile
|
250
|
-
- examples/README.md
|
251
|
-
- examples/cluster.ru
|
252
|
-
- examples/custom-watcher.rb
|
253
|
-
- examples/httpclient-server.rb
|
254
|
-
- examples/httpclient.rb
|
255
|
-
- examples/httpclient2.rb
|
256
|
-
- examples/js/FABridge.js
|
257
|
-
- examples/js/WebSocketMain.swf
|
258
|
-
- examples/js/swfobject.js
|
259
|
-
- examples/js/web_socket.js
|
260
|
-
- examples/lb.ru
|
261
|
-
- examples/logger.rb
|
262
|
-
- examples/reconfiguring-sinatra-watcher.rb
|
263
|
-
- examples/reconfiguring-sinatra.rb
|
264
|
-
- examples/simple-post.rb
|
265
|
-
- examples/sinatra-load-test-endpoint.rb
|
266
|
-
- examples/websocket.html
|
267
|
-
- examples/websocket.rb
|
268
|
-
- lib/noah.rb
|
269
|
-
- lib/noah/agent.rb
|
270
|
-
- lib/noah/agents/base_agent.rb
|
271
|
-
- lib/noah/agents/dummy_agent.rb
|
272
|
-
- lib/noah/agents/http_agent.rb
|
273
|
-
- lib/noah/
|
274
|
-
- lib/noah/
|
275
|
-
- lib/noah/ark.rb
|
276
|
-
- lib/noah/
|
277
|
-
- lib/noah/
|
278
|
-
- lib/noah/
|
279
|
-
- lib/noah/
|
280
|
-
- lib/noah/
|
281
|
-
- lib/noah/
|
282
|
-
- lib/noah/models.rb
|
283
|
-
- lib/noah/models/
|
284
|
-
- lib/noah/models/
|
285
|
-
- lib/noah/models/
|
286
|
-
- lib/noah/models/
|
287
|
-
- lib/noah/models/
|
288
|
-
- lib/noah/models/
|
289
|
-
- lib/noah/models/
|
290
|
-
- lib/noah/
|
291
|
-
- lib/noah/
|
292
|
-
- lib/noah/
|
293
|
-
- lib/noah/
|
294
|
-
- lib/noah/
|
295
|
-
- lib/noah/
|
296
|
-
- lib/noah/
|
297
|
-
- lib/noah/
|
298
|
-
- lib/noah/
|
299
|
-
- noah.
|
300
|
-
-
|
301
|
-
-
|
302
|
-
-
|
303
|
-
-
|
304
|
-
-
|
305
|
-
- spec/
|
306
|
-
- spec/
|
307
|
-
- spec/
|
308
|
-
- spec/
|
309
|
-
- spec/
|
310
|
-
- spec/
|
311
|
-
- spec/
|
312
|
-
- spec/
|
313
|
-
- spec/
|
314
|
-
- spec/
|
315
|
-
- spec/
|
316
|
-
-
|
317
|
-
-
|
318
|
-
-
|
319
|
-
-
|
236
|
+
- .autotest
|
237
|
+
- .gemtest
|
238
|
+
- .gitignore
|
239
|
+
- Gemfile
|
240
|
+
- LICENSE
|
241
|
+
- README.md
|
242
|
+
- Rakefile
|
243
|
+
- TODO.md
|
244
|
+
- autotest/discover.rb
|
245
|
+
- bin/noah
|
246
|
+
- bin/noah-watcher.rb
|
247
|
+
- config.ru
|
248
|
+
- config/warble.rb
|
249
|
+
- examples/Kirkfile
|
250
|
+
- examples/README.md
|
251
|
+
- examples/cluster.ru
|
252
|
+
- examples/custom-watcher.rb
|
253
|
+
- examples/httpclient-server.rb
|
254
|
+
- examples/httpclient.rb
|
255
|
+
- examples/httpclient2.rb
|
256
|
+
- examples/js/FABridge.js
|
257
|
+
- examples/js/WebSocketMain.swf
|
258
|
+
- examples/js/swfobject.js
|
259
|
+
- examples/js/web_socket.js
|
260
|
+
- examples/lb.ru
|
261
|
+
- examples/logger.rb
|
262
|
+
- examples/reconfiguring-sinatra-watcher.rb
|
263
|
+
- examples/reconfiguring-sinatra.rb
|
264
|
+
- examples/simple-post.rb
|
265
|
+
- examples/sinatra-load-test-endpoint.rb
|
266
|
+
- examples/websocket.html
|
267
|
+
- examples/websocket.rb
|
268
|
+
- lib/noah.rb
|
269
|
+
- lib/noah/agent.rb
|
270
|
+
- lib/noah/agents/base_agent.rb
|
271
|
+
- lib/noah/agents/dummy_agent.rb
|
272
|
+
- lib/noah/agents/http_agent.rb
|
273
|
+
- lib/noah/agents/https_agent.rb
|
274
|
+
- lib/noah/app.rb
|
275
|
+
- lib/noah/ark.rb
|
276
|
+
- lib/noah/custom_watcher.rb
|
277
|
+
- lib/noah/exceptions.rb
|
278
|
+
- lib/noah/helpers.rb
|
279
|
+
- lib/noah/linkable.rb
|
280
|
+
- lib/noah/log.rb
|
281
|
+
- lib/noah/models.rb
|
282
|
+
- lib/noah/models/applications.rb
|
283
|
+
- lib/noah/models/configurations.rb
|
284
|
+
- lib/noah/models/ephemerals.rb
|
285
|
+
- lib/noah/models/hosts.rb
|
286
|
+
- lib/noah/models/link.rb
|
287
|
+
- lib/noah/models/services.rb
|
288
|
+
- lib/noah/models/tags.rb
|
289
|
+
- lib/noah/models/watchers.rb
|
290
|
+
- lib/noah/passthrough.rb
|
291
|
+
- lib/noah/routes/applications.rb
|
292
|
+
- lib/noah/routes/configurations.rb
|
293
|
+
- lib/noah/routes/ephemerals.rb
|
294
|
+
- lib/noah/routes/hosts.rb
|
295
|
+
- lib/noah/routes/links.rb
|
296
|
+
- lib/noah/routes/services.rb
|
297
|
+
- lib/noah/routes/tags.rb
|
298
|
+
- lib/noah/routes/watchers.rb
|
299
|
+
- lib/noah/taggable.rb
|
300
|
+
- lib/noah/validations.rb
|
301
|
+
- lib/noah/validations/ephemeral_validations.rb
|
302
|
+
- lib/noah/validations/watcher_validations.rb
|
303
|
+
- lib/noah/version.rb
|
304
|
+
- noah.gemspec
|
305
|
+
- spec/application_spec.rb
|
306
|
+
- spec/configuration_spec.rb
|
307
|
+
- spec/ephemeral_spec.rb
|
308
|
+
- spec/host_spec.rb
|
309
|
+
- spec/noahapp_application_spec.rb
|
310
|
+
- spec/noahapp_configuration_spec.rb
|
311
|
+
- spec/noahapp_ephemeral_spec.rb
|
312
|
+
- spec/noahapp_host_spec.rb
|
313
|
+
- spec/noahapp_service_spec.rb
|
314
|
+
- spec/noahapp_spec.rb
|
315
|
+
- spec/noahapp_watcher_spec.rb
|
316
|
+
- spec/service_spec.rb
|
317
|
+
- spec/spec_helper.rb
|
318
|
+
- spec/support/db/.keep
|
319
|
+
- spec/support/sample_data.rb
|
320
|
+
- spec/support/test-redis.conf
|
321
|
+
- spec/tag_spec.rb
|
322
|
+
- spec/watcher_spec.rb
|
323
|
+
- views/200.erb
|
324
|
+
- views/404.erb
|
325
|
+
- views/500.erb
|
326
|
+
- views/index.haml
|
320
327
|
has_rdoc: true
|
321
328
|
homepage: https://github.com/lusis/noah
|
322
329
|
licenses: []
|
323
330
|
|
324
|
-
post_install_message:
|
331
|
+
post_install_message: This release has backwards incompatible changes to the API. Please watch http://goo.gl/jYqp2 for details
|
325
332
|
rdoc_options: []
|
326
333
|
|
327
334
|
require_paths:
|
328
|
-
- lib
|
335
|
+
- lib
|
329
336
|
required_ruby_version: !ruby/object:Gem::Requirement
|
330
337
|
none: false
|
331
338
|
requirements:
|
332
|
-
|
333
|
-
|
334
|
-
|
339
|
+
- - ">="
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: "0"
|
335
342
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
343
|
none: false
|
337
344
|
requirements:
|
338
|
-
|
339
|
-
|
340
|
-
|
345
|
+
- - ">"
|
346
|
+
- !ruby/object:Gem::Version
|
347
|
+
version: 1.3.1
|
341
348
|
requirements: []
|
342
349
|
|
343
350
|
rubyforge_project: noah
|
344
|
-
rubygems_version: 1.
|
351
|
+
rubygems_version: 1.5.1
|
345
352
|
signing_key:
|
346
353
|
specification_version: 3
|
347
354
|
summary: Application registry based on Apache Zookeeper
|
348
|
-
test_files:
|
349
|
-
|
355
|
+
test_files:
|
356
|
+
- spec/application_spec.rb
|
357
|
+
- spec/configuration_spec.rb
|
358
|
+
- spec/ephemeral_spec.rb
|
359
|
+
- spec/host_spec.rb
|
360
|
+
- spec/noahapp_application_spec.rb
|
361
|
+
- spec/noahapp_configuration_spec.rb
|
362
|
+
- spec/noahapp_ephemeral_spec.rb
|
363
|
+
- spec/noahapp_host_spec.rb
|
364
|
+
- spec/noahapp_service_spec.rb
|
365
|
+
- spec/noahapp_spec.rb
|
366
|
+
- spec/noahapp_watcher_spec.rb
|
367
|
+
- spec/service_spec.rb
|
368
|
+
- spec/spec_helper.rb
|
369
|
+
- spec/support/db/.keep
|
370
|
+
- spec/support/sample_data.rb
|
371
|
+
- spec/support/test-redis.conf
|
372
|
+
- spec/tag_spec.rb
|
373
|
+
- spec/watcher_spec.rb
|