ruby-quilt 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. data/lib/quilt.rb +5 -3
  2. 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", size = 10, log = Logger.new(STDOUT))
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(size)
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])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-quilt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: