noah 0.8.4-jruby → 0.8.5-jruby

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ doc
15
15
  .yardoc/*
16
16
  examples/log/*
17
17
  examples/tmp/*
18
+ *.rbc
@@ -1,25 +1,67 @@
1
1
  #!/usr/bin/env ruby
2
2
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
3
+ CONNERRHELP = <<EOC
4
+
5
+ ---------------------------------------------------------------------------
6
+ Apparently we could not connect to the redis instance.
7
+
8
+ By default the watcher will attempt to connect to "redis://localhost:6379/0"
9
+ If your redis instance is listening elsewhere, please start like so:
10
+
11
+ REDIS_URL="redis://hostname:port/dbnum" noah-watcher.rb
12
+
13
+ This will be rectified in a future release. Sorry about that.
14
+ ----------------------------------------------------------------------------
15
+ EOC
16
+
3
17
  HELP = <<-EOH
18
+ ---------------------------------------------------------------------------------------
4
19
  Unfortunately, the agent script has some difficult requirements right now.
5
- Please see https://github.com/lusis/Noah/Watcher-Agent for details.
20
+ Please rerun with the '--depinstall' option to have them installed for you and try again
21
+ ---------------------------------------------------------------------------------------
6
22
  EOH
23
+ require 'rubygems'
24
+ require 'slop'
25
+ require 'logger'
26
+ require 'json'
27
+
28
+ opts = Slop.parse do
29
+ banner "Usage: noah-watcher.rb [options]"
30
+ on '--depinstall', "Installs additional dependencies" do
31
+ puts "Installing dependencies"
32
+ puts "em-hiredis..."
33
+ `gem install em-hiredis`
34
+ puts "em-http-request prerelease..."
35
+ `gem install em-http-request --pre`
36
+ puts "cookiejar...."
37
+ `gem install cookiejar`
38
+ exit
39
+ end
40
+ on :h, :help, 'Print help', :tail => true do
41
+ puts help
42
+ exit
43
+ end
44
+ end
45
+
7
46
  begin
8
- require 'rubygems'
9
- require 'logger'
10
- require 'optparse'
11
47
  require 'em-hiredis'
12
48
  require 'eventmachine'
13
49
  require 'em-http-request'
14
- require 'noah'
15
- require 'noah/agent'
16
- require 'json'
50
+ require 'cookiejar'
17
51
  rescue LoadError => e
18
52
  puts e.message
19
53
  puts HELP
20
54
  exit
21
55
  end
22
56
 
57
+ begin
58
+ require 'noah'
59
+ require 'noah/agent'
60
+ rescue Errno::ECONNREFUSED
61
+ puts CONNERRHELP
62
+ exit
63
+ end
64
+
23
65
  Noah::Log.logger = Logger.new(STDOUT)
24
66
  LOGGER = Noah::Log.logger
25
67
  LOGGER.progname = __FILE__
@@ -32,21 +74,14 @@ EventMachine.run do
32
74
  noah = Noah::Agent.new
33
75
  noah.errback{|x| LOGGER.error("Errback: #{x}")}
34
76
  noah.callback{|y| LOGGER.info("Callback: #{y}")}
35
- # Passing messages...like a boss
36
- #master_channel = EventMachine::Channel.new
37
77
 
38
- r = EventMachine::Hiredis::Client.connect
78
+ r = EventMachine::Hiredis.connect(ENV["REDIS_URL"])
39
79
  r.errback{|x| LOGGER.error("Unable to connect to redis: #{x}")}
40
80
  LOGGER.info("Attaching to Redis Pubsub")
41
81
  r.psubscribe("*")
42
82
  r.on(:pmessage) do |pattern, event, message|
43
83
  noah.reread_watchers if event =~ /^\/\/noah\/watchers\/.*/
44
84
  noah.broker("#{event}|#{message}") unless noah.watchers == 0
45
- #master_channel.push "#{event}|#{message}"
46
85
  end
47
86
 
48
- #sub = master_channel.subscribe {|msg|
49
- # We short circuit if we have no watchers
50
- # noah.broker(msg) unless noah.watchers == 0
51
- #}
52
87
  end
@@ -5,6 +5,7 @@ require File.join(File.dirname(__FILE__), 'models')
5
5
  module Noah
6
6
  class App < Sinatra::Base
7
7
  helpers Noah::SinatraBaseHelpers
8
+ helpers Noah::SinatraTagHelpers
8
9
 
9
10
  configure do
10
11
  set :app_file, __FILE__
@@ -0,0 +1,46 @@
1
+ module Noah
2
+ module SinatraTagHelpers
3
+ # TODO DRY this sumbitch up
4
+ # TODO add status in json response
5
+
6
+ def tag(primitive, name, tags)
7
+ case primitive
8
+ when "services"
9
+ servicename, hostname = name.split('/')
10
+ obj = host_service(hostname, servicename)
11
+ when "hosts"
12
+ obj = Noah::Host.find(:name=>name).first
13
+ when "configurations"
14
+ obj = Noah::Configuration.find(:name=>name).first
15
+ when "applications"
16
+ obj = Noah::Application.find(:name=>name).first
17
+ when "ephemerals"
18
+ obj = Noah::Ephemeral.find(:path=>"/#{name}").first
19
+ else
20
+ halt 404
21
+ end
22
+ obj.nil? ? (halt 404) : (obj.tag!(tags))
23
+ obj.to_json
24
+ end
25
+
26
+ def untag(primitive, name, tags)
27
+ case primitive
28
+ when "services"
29
+ servicename, hostname = name.split('/')
30
+ obj = host_service(hostname, servicename)
31
+ when "hosts"
32
+ obj = Noah::Host.find(:name=>name).first
33
+ when "configurations"
34
+ obj = Noah::Configuration.find(:name=>name).first
35
+ when "applications"
36
+ obj = Noah::Application.find(:name=>name).first
37
+ when "ephemerals"
38
+ obj = Noah::Ephemeral.find(:path=>"/#{name}").first
39
+ else
40
+ halt 404
41
+ end
42
+ obj.to_json
43
+ end
44
+
45
+ end
46
+ end
@@ -129,3 +129,4 @@ require File.join(File.dirname(__FILE__), 'models','applications')
129
129
  require File.join(File.dirname(__FILE__), 'models','configurations')
130
130
  require File.join(File.dirname(__FILE__), 'models','watchers')
131
131
  require File.join(File.dirname(__FILE__), 'models','ephemerals')
132
+ require File.join(File.dirname(__FILE__), 'models','tokens')
@@ -0,0 +1,41 @@
1
+ module Noah
2
+ class Token < Model
3
+ include Taggable
4
+ include Linkable
5
+ attribute :name
6
+ attribute :token
7
+ attribute :lifetime
8
+
9
+ index :name
10
+ index :token
11
+ index :lifetime
12
+
13
+ before :save, :generate_api_token
14
+
15
+ def validate
16
+ super
17
+ assert_present :name
18
+ assert_unique :name
19
+ assert_unique :token
20
+ end
21
+
22
+ def to_hash
23
+ h = {:token => token, :lifetime => lifetime, :created_at => created_at, :updated_at => updated_at}
24
+ super.merge(h)
25
+ end
26
+
27
+ protected
28
+ def generate_api_token
29
+ # Wicked hot logic to generate an API token
30
+ random_string = (0...50).map{ ('a'..'z').to_a[rand(26)] }.join
31
+ self.token.nil? ? self.token = OpenSSL::Digest::SHA256.hexdigest(random_string << self.name << Time.now.to_s) : self.token
32
+ end
33
+
34
+ def save_hook
35
+ # called after any create,update,delete
36
+ # logic needed to expire any orphaned ephemerals
37
+ end
38
+
39
+ end
40
+
41
+ end
@@ -13,22 +13,6 @@ class Noah::App
13
13
  app.to_json
14
14
  end
15
15
 
16
- put '/applications/:appname/tag' do |appname|
17
- required_params = ["tags"]
18
- data = JSON.parse(request.body.read)
19
- (data.keys.sort == required_params.sort) ? (a=Noah::Application.find(:name=>appname).first) : (raise "Missing Parameters")
20
- a.nil? ? (halt 404) : (a.tag!(data['tags']))
21
- a.to_json
22
- end
23
-
24
- delete '/applications/:appname/tag' do |appname|
25
- required_params = ["tags"]
26
- data = JSON.parse(request.body.read)
27
- (data.keys.sort == required_params.sort) ? (a=Noah::Application.find(:name=>appname).first) : (raise "Missing Parameters")
28
- a.nil? ? (halt 404) : (a.untag!(data['tags']))
29
- a.to_json
30
- end
31
-
32
16
  put '/applications/:appname/watch' do |appname|
33
17
  required_params = ["endpoint"]
34
18
  data = JSON.parse(request.body.read)
@@ -31,22 +31,7 @@ class Noah::App
31
31
  a.nil? ? (halt 404) : (a.link! data["link_name"])
32
32
  a.to_json
33
33
  end
34
- # Add a tag to a configuration object
35
- put '/configurations/:configname/tag' do |configname|
36
- required_params = ["tags"]
37
- data = JSON.parse(request.body.read)
38
- (data.keys.sort == required_params.sort) ? (c=Noah::Configuration.find(:name=>configname).first) : (raise "Missing Parameters")
39
- c.nil? ? (halt 404) : (c.tag!(data['tags']))
40
- c.to_json
41
- end
42
- # Delete a tag[s] from a configuration object
43
- delete '/configurations/:configname/tag' do |configname|
44
- required_params = ["tags"]
45
- data = JSON.parse(request.body.read)
46
- (data.keys.sort == required_params.sort) ? (c=Noah::Configuration.find(:name=>configname).first) : (raise "Missing Parameters")
47
- c.nil? ? (halt 404) : (c.untag!(data['tags']))
48
- c.to_json
49
- end
34
+
50
35
  # Add a watch to a configuration object
51
36
  put '/configurations/:configname/watch' do |configname|
52
37
  required_params = ["endpoint"]
@@ -32,24 +32,6 @@ class Noah::App
32
32
  end
33
33
  end
34
34
 
35
- put '/hosts/:hostname/tag' do |hostname|
36
- required_params = ["tags"]
37
- data = JSON.parse(request.body.read)
38
- raise "Missing parameters" if data.nil?
39
- (data.keys.sort == required_params.sort) ? (a=Noah::Host.find(:name=>hostname).first) : (raise "Missing Parameters")
40
- a.nil? ? (halt 404) : (a.tag!(data['tags']))
41
- a.to_json
42
- end
43
-
44
- delete '/hosts/:hostname/tag' do |hostname|
45
- required_params = ["tags"]
46
- data = JSON.parse(request.body.read)
47
- raise "Missing parameters" if data.nil?
48
- (data.keys.sort == required_params.sort) ? (a=Noah::Host.find(:name=>hostname).first) : (raise "Missing Parameters")
49
- a.nil? ? (halt 404) : (a.untag!(data['tags']))
50
- a.to_json
51
- end
52
-
53
35
  put '/hosts/:hostname/watch' do |hostname|
54
36
  required_params = ["endpoint"]
55
37
  data = JSON.parse(request.body.read)
@@ -38,22 +38,6 @@ class Noah::App
38
38
  a.to_json
39
39
  end
40
40
 
41
- put '/services/:servicename/:hostname/tag' do |servicename, hostname|
42
- required_params = ["tags"]
43
- data = JSON.parse(request.body.read)
44
- (data.keys.sort == required_params.sort) ? (a=host_service(hostname, servicename)) : (raise "Missing Parameters")
45
- a.nil? ? (halt 404) : (a.tag!(data['tags']))
46
- a.to_json
47
- end
48
-
49
- delete '/services/:servicename/:hostname/tag' do |servicename, hostname|
50
- required_params = ["tags"]
51
- data = JSON.parse(request.body.read)
52
- (data.keys.sort == required_params.sort) ? (a=host_service(hostname, servicename)) : (raise "Missing Parameters")
53
- a.nil? ? (halt 404) : (a.untag!(data['tags']))
54
- a.to_json
55
- end
56
-
57
41
  put '/services/:servicename/watch' do |servicename|
58
42
  required_params = ["endpoint"]
59
43
  data = JSON.parse(request.body.read)
@@ -1,5 +1,17 @@
1
1
  class Noah::App
2
2
 
3
+ put '/:primitive/*/tag' do |primitive, name|
4
+ required_params = ["tags"]
5
+ data = JSON.parse(request.body.read)
6
+ (data.keys.sort == required_params.sort) ? (tag(primitive, name, data["tags"])) : (raise "Missing Parameters")
7
+ end
8
+
9
+ delete '/:primitive/*/tag' do |primitive, name|
10
+ required_params = ["tags"]
11
+ data = JSON.parse(request.body.read)
12
+ (data.keys.sort == required_params.sort) ? (untag(primitive, name, data["tags"])) : (raise "Missing Parameters")
13
+ end
14
+
3
15
  get '/tags/:tagname/?' do |tagname|
4
16
  tags = Noah::Tags.all(:name => tagname).to_hash
5
17
  (halt 404) if tags.size == 0
@@ -1,3 +1,3 @@
1
1
  module Noah
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.authors = ["John E. Vincent"]
12
12
  s.email = ["lusis.org+rubygems.org@gmail.com"]
13
13
  s.homepage = "https://github.com/lusis/noah"
14
- s.summary = %q{Application registry based on Apache Zookeeper}
15
- s.description = %q{Application registry based on Apache Zookeeper}
14
+ s.summary = %q{Application registry inspired by Apache Zookeeper}
15
+ s.description = %q{Application registry inspired by Apache Zookeeper}
16
16
 
17
17
  s.rubyforge_project = "noah"
18
18
 
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency("haml", ["= 3.0.25"])
34
34
  s.add_dependency("vegas", ["= 0.1.8"])
35
35
  s.add_dependency("guid", ["= 0.1.1"])
36
+ s.add_dependency("slop", ["= 2.1.0"])
36
37
 
37
38
 
38
39
  if RUBY_PLATFORM =~ /java/
@@ -49,6 +50,7 @@ Gem::Specification.new do |s|
49
50
  s.add_development_dependency("diff-lcs", ["= 1.1.2"])
50
51
  s.add_development_dependency("sinatra-reloader", ["= 0.5.0"])
51
52
  s.add_development_dependency("rspec", ["~> 2.5"])
52
- s.add_development_dependency("rcov", ["= 0.9.9"])
53
+ # s.add_development_dependency("rcov", ["= 0.9.9"])
53
54
  s.add_development_dependency("rack-test", ["= 0.5.7"])
55
+ s.add_development_dependency("rake", ["= 0.8.7"])
54
56
  end
@@ -59,15 +59,16 @@ describe "Using the Link Model", :reset_redis => true do
59
59
  h[:updated_at].should == l.updated_at
60
60
  h[:created_at].should == l.created_at
61
61
  h[:hosts].has_key?(@host.name).should == true
62
- h[:hosts][@host.name].keys.sort.should == [:id, :status, :tags, :services].sort
62
+ h[:hosts][@host.name].keys.map {|k| k.to_s}.sort.should == [:id, :status, :tags, :services].map {|k| k.to_s}.sort
63
63
  h[:services].has_key?(@service.name).should == true
64
- h[:services][@service.name][@host.name].keys.sort.should == [:id, :status, :tags].sort
64
+ h[:services][@service.name][@host.name].keys.map {|k| k.to_s}.sort.should == [:id, :status, :tags].map {|k| k.to_s}.sort
65
65
  h[:applications].has_key?(@application.name).should == true
66
- h[:applications][@application.name].keys.sort.should == [:id, :tags, :configurations].sort
66
+ h[:applications][@application.name].keys.map {|k| k.to_s}.sort.should == [:id, :tags, :configurations].map {|k| k.to_s}.sort
67
67
  h[:configurations].has_key?(@configuration.name).should == true
68
- h[:configurations][@configuration.name].keys.sort.should == [:id, :tags, :format, :body].sort
68
+ h[:configurations][@configuration.name].keys.map {|k| k.to_s }.sort.should == [:id, :tags, :format, :body].map {|k| k.to_s}.sort
69
69
  h[:ephemerals].has_key?(@ephemeral.name).should == true
70
- h[:ephemerals][@ephemeral.name].keys.sort.should == [:id, :tags, :path, :data].sort
70
+ h[:ephemerals][@ephemeral.name].keys.map {|k| k.to_s}.sort.should == [:id, :tags, :path, :data].map {|k| k.to_s}.sort
71
+
71
72
  end
72
73
  end
73
74
  describe "should not" do
@@ -84,5 +85,3 @@ describe "Using the Link Model", :reset_redis => true do
84
85
  end
85
86
  end
86
87
  end
87
-
88
-
@@ -0,0 +1,94 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Using the Tag API", :reset_redis => true do
4
+ before(:each) do
5
+ Ohm.redis.flushdb
6
+ @multi_tags = {"tags"=>["production", "databases", "in-service"]}
7
+ @single_tag = {"tags"=>"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
+
18
+ describe "calling" do
19
+
20
+ describe "PUT" do
21
+ ['host', 'service', 'application', 'configuration', 'ephemeral'].each do |primitive|
22
+ it "multiple tags to #{primitive} should work" do
23
+ obj = instance_variable_get("@#{primitive}")
24
+ case primitive
25
+ when "ephemeral"
26
+ put "/#{primitive}s#{obj.path}/tag", @multi_tags.to_json
27
+ when "service"
28
+ put "/#{primitive}s/#{obj.name}/#{@host.name}/tag", @multi_tags.to_json
29
+ else
30
+ put "/#{primitive}s/#{obj.name}/tag", @multi_tags.to_json
31
+ end
32
+ last_response.should be_ok
33
+ response = last_response.should return_json
34
+ response['tags'].sort.should == @multi_tags["tags"].sort
35
+ end
36
+ end
37
+
38
+ ['host', 'service', 'application', 'configuration', 'ephemeral'].each do |primitive|
39
+ it "single tag to #{primitive} should work" do
40
+ obj = instance_variable_get("@#{primitive}")
41
+ case primitive
42
+ when "ephemeral"
43
+ put "/#{primitive}s#{obj.path}/tag", @single_tag.to_json
44
+ when "service"
45
+ put "/#{primitive}s/#{obj.name}/#{@host.name}/tag", @single_tag.to_json
46
+ else
47
+ put "/#{primitive}s/#{obj.name}/tag", @single_tag.to_json
48
+ end
49
+ last_response.should be_ok
50
+ response = last_response.should return_json
51
+ response['tags'].should == [@single_tag["tags"]]
52
+ end
53
+ end
54
+ end
55
+
56
+ describe "DELETE" do
57
+ ['host', 'service', 'application', 'configuration', 'ephemeral'].each do |primitive|
58
+ it "multiple tags from #{primitive} should work" do
59
+ obj = instance_variable_get("@#{primitive}")
60
+ case primitive
61
+ when "ephemeral"
62
+ delete "/#{primitive}s#{obj.path}/tag", @multi_tags.to_json
63
+ when "service"
64
+ delete "/#{primitive}s/#{obj.name}/#{@host.name}/tag", @multi_tags.to_json
65
+ else
66
+ delete "/#{primitive}s/#{obj.name}/tag", @multi_tags.to_json
67
+ end
68
+ last_response.should be_ok
69
+ response = last_response.should return_json
70
+ response['tags'].sort.should_not == @multi_tags["tags"].sort
71
+ response['tags'].size.should == 0
72
+ end
73
+ end
74
+
75
+ ['host', 'service', 'application', 'configuration', 'ephemeral'].each do |primitive|
76
+ it "single tag from #{primitive} should work" do
77
+ obj = instance_variable_get("@#{primitive}")
78
+ case primitive
79
+ when "ephemeral"
80
+ delete "/#{primitive}s#{obj.path}/tag", @single_tag.to_json
81
+ when "service"
82
+ delete "/#{primitive}s/#{obj.name}/#{@host.name}/tag", @single_tag.to_json
83
+ else
84
+ delete "/#{primitive}s/#{obj.name}/tag", @single_tag.to_json
85
+ end
86
+ last_response.should be_ok
87
+ response = last_response.should return_json
88
+ response['tags'].should_not == [@single_tag["tags"]]
89
+ response['tags'].size.should == 0
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
metadata CHANGED
@@ -2,345 +2,358 @@
2
2
  name: noah
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.4
5
+ version: 0.8.5
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-06-08 00:00:00 -04:00
13
+ date: 2011-08-05 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
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.4
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: guid
139
- prerelease: false
140
- requirement: &id012 !ruby/object:Gem::Requirement
141
- none: false
142
- requirements:
143
- - - "="
144
- - !ruby/object:Gem::Version
145
- version: 0.1.1
146
- type: :runtime
147
- version_requirements: *id012
148
- - !ruby/object:Gem::Dependency
149
- name: jruby-openssl
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: json
161
- prerelease: false
162
- requirement: &id014 !ruby/object:Gem::Requirement
163
- none: false
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- version: "0"
168
- type: :runtime
169
- version_requirements: *id014
170
- - !ruby/object:Gem::Dependency
171
- name: warbler
172
- prerelease: false
173
- requirement: &id015 !ruby/object:Gem::Requirement
174
- none: false
175
- requirements:
176
- - - "="
177
- - !ruby/object:Gem::Version
178
- version: 1.2.1
179
- type: :development
180
- version_requirements: *id015
181
- - !ruby/object:Gem::Dependency
182
- name: diff-lcs
183
- prerelease: false
184
- requirement: &id016 !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - "="
188
- - !ruby/object:Gem::Version
189
- version: 1.1.2
190
- type: :development
191
- version_requirements: *id016
192
- - !ruby/object:Gem::Dependency
193
- name: sinatra-reloader
194
- prerelease: false
195
- requirement: &id017 !ruby/object:Gem::Requirement
196
- none: false
197
- requirements:
198
- - - "="
199
- - !ruby/object:Gem::Version
200
- version: 0.5.0
201
- type: :development
202
- version_requirements: *id017
203
- - !ruby/object:Gem::Dependency
204
- name: rspec
205
- prerelease: false
206
- requirement: &id018 !ruby/object:Gem::Requirement
207
- none: false
208
- requirements:
209
- - - ~>
210
- - !ruby/object:Gem::Version
211
- version: "2.5"
212
- type: :development
213
- version_requirements: *id018
214
- - !ruby/object:Gem::Dependency
215
- name: rcov
216
- prerelease: false
217
- requirement: &id019 !ruby/object:Gem::Requirement
218
- none: false
219
- requirements:
220
- - - "="
221
- - !ruby/object:Gem::Version
222
- version: 0.9.9
223
- type: :development
224
- version_requirements: *id019
225
- - !ruby/object:Gem::Dependency
226
- name: rack-test
227
- prerelease: false
228
- requirement: &id020 !ruby/object:Gem::Requirement
229
- none: false
230
- requirements:
231
- - - "="
232
- - !ruby/object:Gem::Version
233
- version: 0.5.7
234
- type: :development
235
- version_requirements: *id020
236
- description: Application registry based on Apache Zookeeper
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.4
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: guid
139
+ prerelease: false
140
+ requirement: &id012 !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - "="
144
+ - !ruby/object:Gem::Version
145
+ version: 0.1.1
146
+ type: :runtime
147
+ version_requirements: *id012
148
+ - !ruby/object:Gem::Dependency
149
+ name: slop
150
+ prerelease: false
151
+ requirement: &id013 !ruby/object:Gem::Requirement
152
+ none: false
153
+ requirements:
154
+ - - "="
155
+ - !ruby/object:Gem::Version
156
+ version: 2.1.0
157
+ type: :runtime
158
+ version_requirements: *id013
159
+ - !ruby/object:Gem::Dependency
160
+ name: hiredis
161
+ prerelease: false
162
+ requirement: &id014 !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - "="
166
+ - !ruby/object:Gem::Version
167
+ version: 0.3.1
168
+ type: :runtime
169
+ version_requirements: *id014
170
+ - !ruby/object:Gem::Dependency
171
+ name: yajl-ruby
172
+ prerelease: false
173
+ requirement: &id015 !ruby/object:Gem::Requirement
174
+ none: false
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: "0"
179
+ type: :runtime
180
+ version_requirements: *id015
181
+ - !ruby/object:Gem::Dependency
182
+ name: thin
183
+ prerelease: false
184
+ requirement: &id016 !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: "0"
190
+ type: :runtime
191
+ version_requirements: *id016
192
+ - !ruby/object:Gem::Dependency
193
+ name: diff-lcs
194
+ prerelease: false
195
+ requirement: &id017 !ruby/object:Gem::Requirement
196
+ none: false
197
+ requirements:
198
+ - - "="
199
+ - !ruby/object:Gem::Version
200
+ version: 1.1.2
201
+ type: :development
202
+ version_requirements: *id017
203
+ - !ruby/object:Gem::Dependency
204
+ name: sinatra-reloader
205
+ prerelease: false
206
+ requirement: &id018 !ruby/object:Gem::Requirement
207
+ none: false
208
+ requirements:
209
+ - - "="
210
+ - !ruby/object:Gem::Version
211
+ version: 0.5.0
212
+ type: :development
213
+ version_requirements: *id018
214
+ - !ruby/object:Gem::Dependency
215
+ name: rspec
216
+ prerelease: false
217
+ requirement: &id019 !ruby/object:Gem::Requirement
218
+ none: false
219
+ requirements:
220
+ - - ~>
221
+ - !ruby/object:Gem::Version
222
+ version: "2.5"
223
+ type: :development
224
+ version_requirements: *id019
225
+ - !ruby/object:Gem::Dependency
226
+ name: rack-test
227
+ prerelease: false
228
+ requirement: &id020 !ruby/object:Gem::Requirement
229
+ none: false
230
+ requirements:
231
+ - - "="
232
+ - !ruby/object:Gem::Version
233
+ version: 0.5.7
234
+ type: :development
235
+ version_requirements: *id020
236
+ - !ruby/object:Gem::Dependency
237
+ name: rake
238
+ prerelease: false
239
+ requirement: &id021 !ruby/object:Gem::Requirement
240
+ none: false
241
+ requirements:
242
+ - - "="
243
+ - !ruby/object:Gem::Version
244
+ version: 0.8.7
245
+ type: :development
246
+ version_requirements: *id021
247
+ description: Application registry inspired by Apache Zookeeper
237
248
  email:
238
- - lusis.org+rubygems.org@gmail.com
249
+ - lusis.org+rubygems.org@gmail.com
239
250
  executables:
240
- - noah
241
- - noah-watcher.rb
251
+ - noah
252
+ - noah-watcher.rb
242
253
  extensions: []
243
254
 
244
255
  extra_rdoc_files: []
245
256
 
246
257
  files:
247
- - .autotest
248
- - .gemtest
249
- - .gitignore
250
- - Gemfile
251
- - LICENSE
252
- - README.md
253
- - Rakefile
254
- - TODO.md
255
- - autotest/discover.rb
256
- - bin/noah
257
- - bin/noah-watcher.rb
258
- - config.ru
259
- - config/warble.rb
260
- - examples/Kirkfile
261
- - examples/README.md
262
- - examples/cluster.ru
263
- - examples/custom-watcher.rb
264
- - examples/httpclient-server.rb
265
- - examples/httpclient.rb
266
- - examples/httpclient2.rb
267
- - examples/js/FABridge.js
268
- - examples/js/WebSocketMain.swf
269
- - examples/js/swfobject.js
270
- - examples/js/web_socket.js
271
- - examples/lb.ru
272
- - examples/logger.rb
273
- - examples/reconfiguring-sinatra-watcher.rb
274
- - examples/reconfiguring-sinatra.rb
275
- - examples/simple-post.rb
276
- - examples/sinatra-load-test-endpoint.rb
277
- - examples/websocket.html
278
- - examples/websocket.rb
279
- - lib/noah.rb
280
- - lib/noah/agent.rb
281
- - lib/noah/agents/base_agent.rb
282
- - lib/noah/agents/dummy_agent.rb
283
- - lib/noah/agents/http_agent.rb
284
- - lib/noah/agents/https_agent.rb
285
- - lib/noah/agents/rundeck_agent.rb
286
- - lib/noah/app.rb
287
- - lib/noah/ark.rb
288
- - lib/noah/custom_watcher.rb
289
- - lib/noah/exceptions.rb
290
- - lib/noah/helpers.rb
291
- - lib/noah/helpers/base_helpers.rb
292
- - lib/noah/helpers/link_helpers.rb
293
- - lib/noah/helpers/tag_helpers.rb
294
- - lib/noah/helpers/watch_helpers.rb
295
- - lib/noah/linkable.rb
296
- - lib/noah/log.rb
297
- - lib/noah/models.rb
298
- - lib/noah/models/applications.rb
299
- - lib/noah/models/configurations.rb
300
- - lib/noah/models/ephemerals.rb
301
- - lib/noah/models/hosts.rb
302
- - lib/noah/models/link.rb
303
- - lib/noah/models/services.rb
304
- - lib/noah/models/tags.rb
305
- - lib/noah/models/watchers.rb
306
- - lib/noah/passthrough.rb
307
- - lib/noah/routes/applications.rb
308
- - lib/noah/routes/configurations.rb
309
- - lib/noah/routes/ephemerals.rb
310
- - lib/noah/routes/hosts.rb
311
- - lib/noah/routes/links.rb
312
- - lib/noah/routes/services.rb
313
- - lib/noah/routes/tags.rb
314
- - lib/noah/routes/watchers.rb
315
- - lib/noah/taggable.rb
316
- - lib/noah/validations.rb
317
- - lib/noah/validations/ephemeral_validations.rb
318
- - lib/noah/validations/watcher_validations.rb
319
- - lib/noah/version.rb
320
- - noah.gemspec
321
- - spec/application_spec.rb
322
- - spec/configuration_spec.rb
323
- - spec/ephemeral_spec.rb
324
- - spec/host_spec.rb
325
- - spec/link_spec.rb
326
- - spec/noahapp_application_spec.rb
327
- - spec/noahapp_configuration_spec.rb
328
- - spec/noahapp_ephemeral_spec.rb
329
- - spec/noahapp_host_spec.rb
330
- - spec/noahapp_service_spec.rb
331
- - spec/noahapp_spec.rb
332
- - spec/noahapp_watcher_spec.rb
333
- - spec/service_spec.rb
334
- - spec/spec_helper.rb
335
- - spec/support/db/.keep
336
- - spec/support/sample_data.rb
337
- - spec/support/test-redis.conf
338
- - spec/tag_spec.rb
339
- - spec/watcher_spec.rb
340
- - views/200.erb
341
- - views/404.erb
342
- - views/500.erb
343
- - views/index.haml
258
+ - .autotest
259
+ - .gemtest
260
+ - .gitignore
261
+ - Gemfile
262
+ - LICENSE
263
+ - README.md
264
+ - Rakefile
265
+ - TODO.md
266
+ - autotest/discover.rb
267
+ - bin/noah
268
+ - bin/noah-watcher.rb
269
+ - config.ru
270
+ - config/warble.rb
271
+ - examples/Kirkfile
272
+ - examples/README.md
273
+ - examples/cluster.ru
274
+ - examples/custom-watcher.rb
275
+ - examples/httpclient-server.rb
276
+ - examples/httpclient.rb
277
+ - examples/httpclient2.rb
278
+ - examples/js/FABridge.js
279
+ - examples/js/WebSocketMain.swf
280
+ - examples/js/swfobject.js
281
+ - examples/js/web_socket.js
282
+ - examples/lb.ru
283
+ - examples/logger.rb
284
+ - examples/reconfiguring-sinatra-watcher.rb
285
+ - examples/reconfiguring-sinatra.rb
286
+ - examples/simple-post.rb
287
+ - examples/sinatra-load-test-endpoint.rb
288
+ - examples/websocket.html
289
+ - examples/websocket.rb
290
+ - lib/noah.rb
291
+ - lib/noah/agent.rb
292
+ - lib/noah/agents/base_agent.rb
293
+ - lib/noah/agents/dummy_agent.rb
294
+ - lib/noah/agents/http_agent.rb
295
+ - lib/noah/agents/https_agent.rb
296
+ - lib/noah/agents/rundeck_agent.rb
297
+ - lib/noah/app.rb
298
+ - lib/noah/ark.rb
299
+ - lib/noah/custom_watcher.rb
300
+ - lib/noah/exceptions.rb
301
+ - lib/noah/helpers.rb
302
+ - lib/noah/helpers/base_helpers.rb
303
+ - lib/noah/helpers/link_helpers.rb
304
+ - lib/noah/helpers/tag_helpers.rb
305
+ - lib/noah/helpers/watch_helpers.rb
306
+ - lib/noah/linkable.rb
307
+ - lib/noah/log.rb
308
+ - lib/noah/models.rb
309
+ - lib/noah/models/applications.rb
310
+ - lib/noah/models/configurations.rb
311
+ - lib/noah/models/ephemerals.rb
312
+ - lib/noah/models/hosts.rb
313
+ - lib/noah/models/link.rb
314
+ - lib/noah/models/services.rb
315
+ - lib/noah/models/tags.rb
316
+ - lib/noah/models/tokens.rb
317
+ - lib/noah/models/watchers.rb
318
+ - lib/noah/passthrough.rb
319
+ - lib/noah/routes/applications.rb
320
+ - lib/noah/routes/configurations.rb
321
+ - lib/noah/routes/ephemerals.rb
322
+ - lib/noah/routes/hosts.rb
323
+ - lib/noah/routes/links.rb
324
+ - lib/noah/routes/services.rb
325
+ - lib/noah/routes/tags.rb
326
+ - lib/noah/routes/watchers.rb
327
+ - lib/noah/taggable.rb
328
+ - lib/noah/validations.rb
329
+ - lib/noah/validations/ephemeral_validations.rb
330
+ - lib/noah/validations/watcher_validations.rb
331
+ - lib/noah/version.rb
332
+ - noah.gemspec
333
+ - spec/application_spec.rb
334
+ - spec/configuration_spec.rb
335
+ - spec/ephemeral_spec.rb
336
+ - spec/host_spec.rb
337
+ - spec/link_spec.rb
338
+ - spec/noahapp_application_spec.rb
339
+ - spec/noahapp_configuration_spec.rb
340
+ - spec/noahapp_ephemeral_spec.rb
341
+ - spec/noahapp_host_spec.rb
342
+ - spec/noahapp_service_spec.rb
343
+ - spec/noahapp_spec.rb
344
+ - spec/noahapp_tag_spec.rb
345
+ - spec/noahapp_watcher_spec.rb
346
+ - spec/service_spec.rb
347
+ - spec/spec_helper.rb
348
+ - spec/support/db/.keep
349
+ - spec/support/sample_data.rb
350
+ - spec/support/test-redis.conf
351
+ - spec/tag_spec.rb
352
+ - spec/watcher_spec.rb
353
+ - views/200.erb
354
+ - views/404.erb
355
+ - views/500.erb
356
+ - views/index.haml
344
357
  has_rdoc: true
345
358
  homepage: https://github.com/lusis/noah
346
359
  licenses: []
@@ -349,43 +362,25 @@ post_install_message: This release has backwards incompatible changes to the API
349
362
  rdoc_options: []
350
363
 
351
364
  require_paths:
352
- - lib
365
+ - lib
353
366
  required_ruby_version: !ruby/object:Gem::Requirement
354
367
  none: false
355
368
  requirements:
356
- - - ">="
357
- - !ruby/object:Gem::Version
358
- version: "0"
369
+ - - ">="
370
+ - !ruby/object:Gem::Version
371
+ version: "0"
359
372
  required_rubygems_version: !ruby/object:Gem::Requirement
360
373
  none: false
361
374
  requirements:
362
- - - ">="
363
- - !ruby/object:Gem::Version
364
- version: "0"
375
+ - - ">="
376
+ - !ruby/object:Gem::Version
377
+ version: "0"
365
378
  requirements: []
366
379
 
367
380
  rubyforge_project: noah
368
- rubygems_version: 1.5.1
381
+ rubygems_version: 1.6.2
369
382
  signing_key:
370
383
  specification_version: 3
371
- summary: Application registry based on Apache Zookeeper
372
- test_files:
373
- - spec/application_spec.rb
374
- - spec/configuration_spec.rb
375
- - spec/ephemeral_spec.rb
376
- - spec/host_spec.rb
377
- - spec/link_spec.rb
378
- - spec/noahapp_application_spec.rb
379
- - spec/noahapp_configuration_spec.rb
380
- - spec/noahapp_ephemeral_spec.rb
381
- - spec/noahapp_host_spec.rb
382
- - spec/noahapp_service_spec.rb
383
- - spec/noahapp_spec.rb
384
- - spec/noahapp_watcher_spec.rb
385
- - spec/service_spec.rb
386
- - spec/spec_helper.rb
387
- - spec/support/db/.keep
388
- - spec/support/sample_data.rb
389
- - spec/support/test-redis.conf
390
- - spec/tag_spec.rb
391
- - spec/watcher_spec.rb
384
+ summary: Application registry inspired by Apache Zookeeper
385
+ test_files: []
386
+