From e257f450c044616fefbd15e9a180387aaaa572a1 Mon Sep 17 00:00:00 2001 From: Thom May Date: Fri, 29 Jul 2016 17:00:49 +0100 Subject: ChefStyle Signed-off-by: Thom May --- lib/chef_zero/endpoints/environment_nodes_endpoint.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/chef_zero/endpoints/environment_nodes_endpoint.rb') diff --git a/lib/chef_zero/endpoints/environment_nodes_endpoint.rb b/lib/chef_zero/endpoints/environment_nodes_endpoint.rb index e8eaca2..cffe596 100644 --- a/lib/chef_zero/endpoints/environment_nodes_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_nodes_endpoint.rb @@ -1,5 +1,5 @@ -require 'ffi_yajl' -require 'chef_zero/rest_base' +require "ffi_yajl" +require "chef_zero/rest_base" module ChefZero module Endpoints @@ -10,10 +10,10 @@ module ChefZero get_data(request, request.rest_path[0..3]) result = {} - list_data(request, request.rest_path[0..1] + ['nodes']).each do |name| - node = FFI_Yajl::Parser.parse(get_data(request, request.rest_path[0..1] + ['nodes', name]), :create_additions => false) - if node['chef_environment'] == request.rest_path[3] - result[name] = build_uri(request.base_uri, request.rest_path[0..1] + ['nodes', name]) + list_data(request, request.rest_path[0..1] + ["nodes"]).each do |name| + node = FFI_Yajl::Parser.parse(get_data(request, request.rest_path[0..1] + ["nodes", name]), :create_additions => false) + if node["chef_environment"] == request.rest_path[3] + result[name] = build_uri(request.base_uri, request.rest_path[0..1] + ["nodes", name]) end end json_response(200, result) -- cgit v1.2.1