summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-04-19 12:04:56 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-04-19 12:04:56 -0700
commit67b96b9d9299a4d1b075f73b9af492634e872a31 (patch)
tree4da10ff1c4ca5299f01536904a40e91d2abdff08
parentdc55ce7e4a20bf6e172218e105da5818baeef749 (diff)
downloadchef-zero-lcg/chefstyle-fixes.tar.gz
fix for new rubocop enginelcg/chefstyle-fixes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef_zero/chef_data/default_creator.rb2
-rw-r--r--lib/chef_zero/data_store/memory_store_v2.rb8
-rw-r--r--lib/chef_zero/data_store/raw_file_store.rb2
-rw-r--r--lib/chef_zero/rest_base.rb2
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
)