ruby-quilt 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/quilt.rb +5 -3
- metadata +1 -1
data/lib/quilt.rb
CHANGED
@@ -14,15 +14,17 @@ class Quilt
|
|
14
14
|
PREFIX_KEY = "prefix"
|
15
15
|
DEBUG_PREFIX_KEY = "debug_prefix"
|
16
16
|
ARCHIVE_SUFFIX = ".tgz"
|
17
|
+
DEFAULT_LRU_SIZE = 10
|
17
18
|
|
18
|
-
def initialize(config = "quilt",
|
19
|
+
def initialize(config = "quilt", log = Logger.new(STDOUT))
|
19
20
|
@config = {
|
20
21
|
:local_path => Ecology.property("#{config ? "#{config}:" : ""}local_path"),
|
21
22
|
:remote_host => Ecology.property("#{config ? "#{config}:" : ""}remote_host"),
|
22
23
|
:remote_path => Ecology.property("#{config ? "#{config}:" : ""}remote_path"),
|
23
|
-
:remote_port => Ecology.property("#{config ? "#{config}:" : ""}remote_port")
|
24
|
+
:remote_port => Ecology.property("#{config ? "#{config}:" : ""}remote_port"),
|
25
|
+
:lru_size => Ecology.property("#{config ? "#{config}:" : ""}lru_size")
|
24
26
|
};
|
25
|
-
@versions = LRUCache.new(
|
27
|
+
@versions = LRUCache.new(@config[:lru_size] ? @config[:lru_size] : DEFAULT_LRU_SIZE)
|
26
28
|
@log = log
|
27
29
|
|
28
30
|
if (@config[:local_path])
|