summaryrefslogtreecommitdiff
path: root/lib/chef/sandbox.rb
diff options
context:
space:
mode:
authorChristopher Maier <cm@opscode.com>2012-11-28 17:41:30 -0500
committerChristopher Maier <cm@opscode.com>2012-11-28 17:41:30 -0500
commitde5af27d854e193b6783bea1d79711c7756c8c6b (patch)
tree4d657cf4c70f83877068bdd11200c1187698e962 /lib/chef/sandbox.rb
parentea3678bdbde7465927bc23f897b6fc9e16d8640a (diff)
downloadchef-de5af27d854e193b6783bea1d79711c7756c8c6b.tar.gz
Add a dummy Chef::Sandbox class back in
This allows Chef 11 clients to interact with Chef 10 servers (specifically, to upload cookbooks) without crashing.
Diffstat (limited to 'lib/chef/sandbox.rb')
-rw-r--r--lib/chef/sandbox.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/chef/sandbox.rb b/lib/chef/sandbox.rb
new file mode 100644
index 0000000000..28bc4ffa12
--- /dev/null
+++ b/lib/chef/sandbox.rb
@@ -0,0 +1,20 @@
+class Chef
+ class Sandbox
+ # I DO NOTHING!!
+
+ # So, the reason we have a completely empty class here is so that
+ # Chef 11 clients do not choke when interacting with Chef 10
+ # servers. The original Chef::Sandbox class (that actually did
+ # things) has been removed since its functionality is no longer
+ # needed for Chef 11. However, since we still use the JSON gem
+ # and make use of its "auto-inflation" of classes (driven by the
+ # contents of the 'json_class' key in all of our JSON), any
+ # sandbox responses from a Chef 10 server to a Chef 11 client
+ # would cause knife to crash. The JSON gem would attempt to
+ # auto-inflate based on a "json_class": "Chef::Sandbox" hash
+ # entry, but would not be able to find a Chef::Sandbox class!
+ #
+ # This is a workaround until such time as we can completely remove
+ # the reliance on the "json_class" field.
+ end
+end