summaryrefslogtreecommitdiff
path: root/lib/chef_zero/server.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-07-17 22:17:07 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-07-23 19:21:24 -0600
commite004ff7164065d5d9d66ae0c230ce0821650e6dd (patch)
treea9f6dc39e8284f1e095b50bc017b835f43034615 /lib/chef_zero/server.rb
parent08b2e660be71fb6a90a6638729f010429b8c3e98 (diff)
downloadchef-zero-e004ff7164065d5d9d66ae0c230ce0821650e6dd.tar.gz
Get ChefFS data store working with the new DefaultFacade
Diffstat (limited to 'lib/chef_zero/server.rb')
-rw-r--r--lib/chef_zero/server.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index 41b4c8f..f9a1647 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -144,14 +144,14 @@ module ChefZero
@data_store ||= begin
result = @options[:data_store] || DataStore::DefaultFacade.new(DataStore::MemoryStoreV2.new, options[:osc_compat])
if options[:single_org]
- if result.respond_to?(:interface_version) && result.interface_version >= 2 && result.interface_version < 3
- result.create_dir([ 'organizations' ], options[:single_org])
- else
+
+ if !result.respond_to?(:interface_version) || result.interface_version == 1
result = ChefZero::DataStore::V1ToV2Adapter.new(result, options[:single_org])
result = ChefZero::DataStore::DefaultFacade.new(result, options[:osc_compat])
end
+
else
- if !(result.respond_to?(:interface_version) && result.interface_version >= 2 && result.interface_version < 3)
+ if !result.respond_to?(:interface_version) || result.interface_version == 1
raise "Multi-org not supported by data store #{result}!"
end
end