summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/environment_recipes_endpoint.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-07-29 17:00:49 +0100
committerThom May <thom@may.lt>2016-07-29 17:00:49 +0100
commite257f450c044616fefbd15e9a180387aaaa572a1 (patch)
tree6a148967013485078af6601546bdb7b61c623f3c /lib/chef_zero/endpoints/environment_recipes_endpoint.rb
parent4c86d798010b73c76c916e601ff48c24ffb65dd6 (diff)
downloadchef-zero-e257f450c044616fefbd15e9a180387aaaa572a1.tar.gz
ChefStyletm/style
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'lib/chef_zero/endpoints/environment_recipes_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/environment_recipes_endpoint.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef_zero/endpoints/environment_recipes_endpoint.rb b/lib/chef_zero/endpoints/environment_recipes_endpoint.rb
index 4ecd7e0..8165a68 100644
--- a/lib/chef_zero/endpoints/environment_recipes_endpoint.rb
+++ b/lib/chef_zero/endpoints/environment_recipes_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
@@ -7,11 +7,11 @@ module ChefZero
class EnvironmentRecipesEndpoint < CookbooksBase
def get(request)
environment = FFI_Yajl::Parser.parse(get_data(request, request.rest_path[0..3]), :create_additions => false)
- constraints = environment['cookbook_versions'] || {}
+ constraints = environment["cookbook_versions"] || {}
result = []
filter_cookbooks(all_cookbooks_list(request), constraints, 1) do |name, versions|
if versions.size > 0
- cookbook = FFI_Yajl::Parser.parse(get_data(request, request.rest_path[0..1] + ['cookbooks', name, versions[0]]), :create_additions => false)
+ cookbook = FFI_Yajl::Parser.parse(get_data(request, request.rest_path[0..1] + ["cookbooks", name, versions[0]]), :create_additions => false)
result += recipe_names(name, cookbook)
end
end