diff options
author | Andrew Brown <anbrown@blackberry.com> | 2015-08-13 20:00:41 -0400 |
---|---|---|
committer | Andrew Brown <anbrown@blackberry.com> | 2015-08-13 21:01:09 -0400 |
commit | 40216a586a0caeb1a03590f89e95bffddd4f5c5f (patch) | |
tree | 6c22416c13e5811e6a40f77a5a649c79409449bd /lib/chef_zero/endpoints | |
parent | 3116c8cc30232103065e4bdf85e043ca20312197 (diff) | |
download | chef-zero-40216a586a0caeb1a03590f89e95bffddd4f5c5f.tar.gz |
Initial support for /server_api_version
This adds initial support for /server_api_version and also adds
constants for the min/max API versions.
Diffstat (limited to 'lib/chef_zero/endpoints')
-rw-r--r-- | lib/chef_zero/endpoints/server_api_version_endpoint.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef_zero/endpoints/server_api_version_endpoint.rb b/lib/chef_zero/endpoints/server_api_version_endpoint.rb new file mode 100644 index 0000000..a4bb35f --- /dev/null +++ b/lib/chef_zero/endpoints/server_api_version_endpoint.rb @@ -0,0 +1,12 @@ +require 'chef_zero/rest_base' + +module ChefZero + module Endpoints + # /server_api_version + class ServerAPIVersionEndpoint < RestBase + def get(request) + json_response(200, {"min_api_version"=>MIN_API_VERSION, "max_api_version"=>MAX_API_VERSION}) + end + end + end +end |