cylons 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,38 +0,0 @@
1
- require 'cylons'
2
- require 'cylons/registry_adapter'
3
- module Cylons
4
- class Configuration
5
- attr_accessor :address,
6
- :logger,
7
- :port,
8
- :registry_address,
9
- :registry_port,
10
- :registry_adapter,
11
- :registry,
12
- :remote_namespace
13
-
14
- #NOTE: I am explicitly setting address to machine address instead of local host due to zookeeper or possibly dcell issue.
15
- # Basically I have been unable to connect the machine to registry via
16
- #:addr => "tcp://localhost:9001" or whatever, have needed to connect using
17
- #:addr => "tcp://192.168.0.101:9001", not sure if its an id10t error, or a local setting, or zookeeper or dcell
18
- # lightbulb: maybe because its trying to connect to remote registry, and its telling the remote machine to use localhost?
19
- # bet thats probably it.. Although I dont think I had same prob w redis. IDONTREMEMBER.
20
-
21
- #TODO look into that further.
22
- def initialize
23
- self.address = ::Cylons::Interface.primary
24
- self.port = (9000 + rand(100))
25
- self.logger = ::Rails.logger if defined?(Rails)
26
- self
27
- end
28
-
29
- #TODO: uhh refactor this, was having trouble w circular dependency and too tired to trace it down!
30
- #This introduces order dependency when setting initializer=badmk
31
-
32
- def registry_adapter=(adapter)
33
- raise ::Cylons::InvalidRegistryAdapter unless ::Cylons::RegistryAdapter::VALID_REGISTRY_ADAPTERS.include?(adapter.to_sym)
34
- @registry_adapter = adapter.to_sym
35
- @registry = ::Cylons::RegistryAdapter.send(registry_adapter)
36
- end
37
- end
38
- end
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe ::Cylons::RemoteRegistry do
4
- describe ".remotes" do
5
- it { described_class.remotes.should include(:product) }
6
- end
7
- end