lib/ruby_skynet.rb in ruby_skynet-2.0.0.rc1 vs lib/ruby_skynet.rb in ruby_skynet-2.0.0
- old
+ new
@@ -27,17 +27,21 @@
Registry = RubySkynet::Zookeeper::Registry
rescue LoadError
begin
require 'ruby_doozer'
require 'ruby_skynet/doozer/service_registry'
+
+ # Shortcuts to loaded Registry classes
+ ServiceRegistry = RubySkynet::Doozer::ServiceRegistry
+ CachedRegistry = Doozer::CachedRegistry
+ Registry = Doozer::Registry
rescue LoadError
- raise LoadError, "Load either the 'zookeeper' or 'ruby_doozer' gem prior to loading RubySkynet. 'zookeeper' is preferred"
+ require 'ruby_skynet/static_service_registry'
+
+ # Use Static Service Registry
+ ServiceRegistry = RubySkynet::StaticServiceRegistry
end
- # Shortcuts to loaded Registry classes
- ServiceRegistry = RubySkynet::Doozer::ServiceRegistry
- CachedRegistry = Doozer::CachedRegistry
- Registry = Doozer::Registry
end
end
if defined?(Rails)
require 'ruby_skynet/railtie'