summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/environment_role_endpoint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/endpoints/environment_role_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/environment_role_endpoint.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef_zero/endpoints/environment_role_endpoint.rb b/lib/chef_zero/endpoints/environment_role_endpoint.rb
index 2a87bb4..b05f28a 100644
--- a/lib/chef_zero/endpoints/environment_role_endpoint.rb
+++ b/lib/chef_zero/endpoints/environment_role_endpoint.rb
@@ -1,5 +1,5 @@
-require 'ffi_yajl'
-require 'chef_zero/endpoints/cookbooks_base'
+require "ffi_yajl"
+require "chef_zero/endpoints/cookbooks_base"
module ChefZero
module Endpoints
@@ -8,7 +8,7 @@ module ChefZero
class EnvironmentRoleEndpoint < CookbooksBase
def get(request)
# 404 if environment does not exist
- if request.rest_path[2] == 'environments'
+ if request.rest_path[2] == "environments"
environment_path = request.rest_path[0..1] + request.rest_path[2..3]
role_path = request.rest_path[0..1] + request.rest_path[4..5]
else
@@ -20,16 +20,16 @@ module ChefZero
role = FFI_Yajl::Parser.parse(get_data(request, role_path), :create_additions => false)
environment_name = environment_path[3]
- if environment_name == '_default'
- run_list = role['run_list']
+ if environment_name == "_default"
+ run_list = role["run_list"]
else
- if role['env_run_lists']
- run_list = role['env_run_lists'][environment_name]
+ if role["env_run_lists"]
+ run_list = role["env_run_lists"][environment_name]
else
run_list = nil
end
end
- json_response(200, { 'run_list' => run_list })
+ json_response(200, { "run_list" => run_list })
end
end
end