diff options
-rw-r--r-- | lib/chef_zero/chef_data/default_creator.rb | 2 | ||||
-rw-r--r-- | lib/chef_zero/data_store/memory_store_v2.rb | 8 | ||||
-rw-r--r-- | lib/chef_zero/data_store/raw_file_store.rb | 2 | ||||
-rw-r--r-- | lib/chef_zero/rest_base.rb | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef_zero/chef_data/default_creator.rb b/lib/chef_zero/chef_data/default_creator.rb index 46c0165..1af04a1 100644 --- a/lib/chef_zero/chef_data/default_creator.rb +++ b/lib/chef_zero/chef_data/default_creator.rb @@ -22,7 +22,7 @@ module ChefZero attr_reader :single_org attr_reader :osc_compat attr_reader :creators - attr_reader :deleted + attr_writer :deleted PERMISSIONS = %w{create read update delete grant} DEFAULT_SUPERUSERS = %w{pivotal} diff --git a/lib/chef_zero/data_store/memory_store_v2.rb b/lib/chef_zero/data_store/memory_store_v2.rb index b35d490..85f8b3d 100644 --- a/lib/chef_zero/data_store/memory_store_v2.rb +++ b/lib/chef_zero/data_store/memory_store_v2.rb @@ -115,9 +115,9 @@ module ChefZero if value.is_a?(Hash) && !options[:allow_dirs] raise "exists? does not work with directories (#{path} = #{value.class})" end - return true + true rescue DataNotFoundError - return false + false end def exists_dir?(path) @@ -125,9 +125,9 @@ module ChefZero if !dir.is_a? Hash raise "exists_dir? only works with directories (#{path} = #{dir.class})" end - return true + true rescue DataNotFoundError - return false + false end private diff --git a/lib/chef_zero/data_store/raw_file_store.rb b/lib/chef_zero/data_store/raw_file_store.rb index 8b4c442..2d4b3f5 100644 --- a/lib/chef_zero/data_store/raw_file_store.rb +++ b/lib/chef_zero/data_store/raw_file_store.rb @@ -80,7 +80,7 @@ module ChefZero end def get(path, request = nil) - return IO.read(path_to(path)) + IO.read(path_to(path)) rescue Errno::ENOENT raise DataNotFoundError.new(path) end diff --git a/lib/chef_zero/rest_base.rb b/lib/chef_zero/rest_base.rb index e6114c4..b6d4b6a 100644 --- a/lib/chef_zero/rest_base.rb +++ b/lib/chef_zero/rest_base.rb @@ -35,7 +35,7 @@ module ChefZero ) end rescue ArgumentError - return json_response(406, + json_response(406, { "username" => request.requestor }, request_version: -1, response_version: -1 ) |