filestore 0.0.12 → 0.0.13

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.
@@ -37,7 +37,7 @@ module FileStore
37
37
  raise FileStoreException, "Root path #{rootPath} doesn't exist" if not File.exists?(rootPath)
38
38
 
39
39
  @rootPath = rootPath
40
- @stores = MultiTenantFileStore.recover(rootPath)
40
+ @stores = MultiTenantFileStore.recover(rootPath, self.logger)
41
41
  end
42
42
  #
43
43
  # Creates a new file store for a tenant
@@ -168,7 +168,7 @@ module FileStore
168
168
  # Arguments:
169
169
  # rootPath: The base path of the multitenant store
170
170
  #
171
- def self.recover(rootPath)
171
+ def self.recover(rootPath, logger)
172
172
  raise FileStoreException, "Root path #{rootPath} isn't a valid multitenant store" if not File.directory?(rootPath)
173
173
 
174
174
  stores = {}
@@ -177,13 +177,13 @@ module FileStore
177
177
  begin
178
178
  if File.directory?(e)
179
179
  tenant = File.basename(e)
180
- mm = MemoryMetaManager.new File.join(e, MemoryMetaManager::FILE), @logger
180
+ mm = MemoryMetaManager.new File.join(e, MemoryMetaManager::FILE), logger
181
181
  sfs = SimpleFileStore.new mm, e, @logger
182
182
 
183
183
  stores[tenant] = sfs
184
184
  end
185
185
  rescue Exception => e
186
- @logger.error "Couldn't create store for tenant #{tenant}.\n#{e.message}"
186
+ logger.error "Couldn't create store for tenant #{tenant}.\n#{e.message}"
187
187
  end
188
188
  }
189
189
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filestore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: