summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/chef_fs')
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb2
-rw-r--r--lib/chef/chef_fs/data_handler/acl_data_handler.rb2
-rw-r--r--lib/chef/chef_fs/data_handler/data_handler_base.rb4
-rw-r--r--lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb4
-rw-r--r--lib/chef/chef_fs/data_handler/organization_members_data_handler.rb4
-rw-r--r--lib/chef/chef_fs/data_handler/policy_data_handler.rb2
-rw-r--r--lib/chef/chef_fs/file_system/acl_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/acl_entry.rb2
-rw-r--r--lib/chef/chef_fs/file_system/base_fs_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/base_fs_object.rb10
-rw-r--r--lib/chef/chef_fs/file_system/cookbooks_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/data_bag_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/data_bags_dir.rb4
-rw-r--r--lib/chef/chef_fs/file_system/environments_dir.rb4
-rw-r--r--lib/chef/chef_fs/file_system/memory_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/org_entry.rb2
-rw-r--r--lib/chef/chef_fs/file_system/organization_invites_entry.rb2
-rw-r--r--lib/chef/chef_fs/file_system/organization_members_entry.rb2
-rw-r--r--lib/chef/chef_fs/file_system/rest_list_entry.rb2
-rw-r--r--lib/chef/chef_fs/parallelizer/parallel_enumerable.rb2
20 files changed, 29 insertions, 29 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb
index 4084fb80d3..4bbdcaa4b5 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -315,7 +315,7 @@ class Chef
return path[0] == 'sandboxes' || path[0] == 'file_store' && path[1] == 'checksums' || path == [ 'environments', '_default' ]
end
- def write_cookbook(path, data, *options)
+ def write_cookbook(path, data, *_options)
if chef_fs.versioned_cookbooks
cookbook_path = File.join('cookbooks', "#{path[1]}-#{path[2]}")
else
diff --git a/lib/chef/chef_fs/data_handler/acl_data_handler.rb b/lib/chef/chef_fs/data_handler/acl_data_handler.rb
index 8def8a543d..8705b64274 100644
--- a/lib/chef/chef_fs/data_handler/acl_data_handler.rb
+++ b/lib/chef/chef_fs/data_handler/acl_data_handler.rb
@@ -4,7 +4,7 @@ class Chef
module ChefFS
module DataHandler
class AclDataHandler < DataHandlerBase
- def normalize(acl, entry)
+ def normalize(acl, _entry)
# Normalize the order of the keys for easier reading
result = normalize_hash(acl, {
'create' => {},
diff --git a/lib/chef/chef_fs/data_handler/data_handler_base.rb b/lib/chef/chef_fs/data_handler/data_handler_base.rb
index a3dc92405c..30b8958a4f 100644
--- a/lib/chef/chef_fs/data_handler/data_handler_base.rb
+++ b/lib/chef/chef_fs/data_handler/data_handler_base.rb
@@ -38,7 +38,7 @@ class Chef
# Return true if minimize() should preserve a key even if it is the same
# as the default. Often used for ids and names.
#
- def preserve_key?(key)
+ def preserve_key?(_key)
false
end
@@ -123,7 +123,7 @@ class Chef
#
# Write out the Ruby file for this instance. (Like roles/x.rb)
#
- def to_ruby(object)
+ def to_ruby(_object)
raise NotImplementedError
end
diff --git a/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
index db56ecc504..e39277aa1b 100644
--- a/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
+++ b/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
@@ -4,11 +4,11 @@ class Chef
module ChefFS
module DataHandler
class OrganizationInvitesDataHandler < DataHandlerBase
- def normalize(invites, entry)
+ def normalize(invites, _entry)
invites.map { |invite| invite.is_a?(Hash) ? invite['username'] : invite }.sort.uniq
end
- def minimize(invites, entry)
+ def minimize(invites, _entry)
invites
end
end
diff --git a/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb
index afa331775c..ce44073f38 100644
--- a/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb
+++ b/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb
@@ -4,11 +4,11 @@ class Chef
module ChefFS
module DataHandler
class OrganizationMembersDataHandler < DataHandlerBase
- def normalize(members, entry)
+ def normalize(members, _entry)
members.map { |member| member.is_a?(Hash) ? member['user']['username'] : member }.sort.uniq
end
- def minimize(members, entry)
+ def minimize(members, _entry)
members
end
end
diff --git a/lib/chef/chef_fs/data_handler/policy_data_handler.rb b/lib/chef/chef_fs/data_handler/policy_data_handler.rb
index 769c13c364..1cd0e4b9b1 100644
--- a/lib/chef/chef_fs/data_handler/policy_data_handler.rb
+++ b/lib/chef/chef_fs/data_handler/policy_data_handler.rb
@@ -5,7 +5,7 @@ class Chef
module DataHandler
class PolicyDataHandler < DataHandlerBase
- def normalize(policy, entry)
+ def normalize(policy, _entry)
policy
end
end
diff --git a/lib/chef/chef_fs/file_system/acl_dir.rb b/lib/chef/chef_fs/file_system/acl_dir.rb
index c2354d478d..54cee6c20f 100644
--- a/lib/chef/chef_fs/file_system/acl_dir.rb
+++ b/lib/chef/chef_fs/file_system/acl_dir.rb
@@ -47,7 +47,7 @@ class Chef
@children
end
- def create_child(name, file_contents)
+ def create_child(_name, _file_contents)
raise OperationNotAllowedError.new(:create_child, self), "ACLs can only be updated, and can only be created when the corresponding object is created."
end
diff --git a/lib/chef/chef_fs/file_system/acl_entry.rb b/lib/chef/chef_fs/file_system/acl_entry.rb
index b2545af5ae..520151c9d9 100644
--- a/lib/chef/chef_fs/file_system/acl_entry.rb
+++ b/lib/chef/chef_fs/file_system/acl_entry.rb
@@ -31,7 +31,7 @@ class Chef
"#{super}/_acl"
end
- def delete(recurse)
+ def delete(_recurse)
raise Chef::ChefFS::FileSystem::OperationNotAllowedError.new(:delete, self), "ACLs cannot be deleted."
end
diff --git a/lib/chef/chef_fs/file_system/base_fs_dir.rb b/lib/chef/chef_fs/file_system/base_fs_dir.rb
index 8cc277facc..a7823e13d2 100644
--- a/lib/chef/chef_fs/file_system/base_fs_dir.rb
+++ b/lib/chef/chef_fs/file_system/base_fs_dir.rb
@@ -36,7 +36,7 @@ class Chef
children.select { |child| child.name == name }.first || NonexistentFSObject.new(name, self)
end
- def can_have_child?(name, is_dir)
+ def can_have_child?(_name, _is_dir)
true
end
diff --git a/lib/chef/chef_fs/file_system/base_fs_object.rb b/lib/chef/chef_fs/file_system/base_fs_object.rb
index 43e6a513d7..6cbda268aa 100644
--- a/lib/chef/chef_fs/file_system/base_fs_object.rb
+++ b/lib/chef/chef_fs/file_system/base_fs_object.rb
@@ -73,14 +73,14 @@ class Chef
# other_value = entry.read if other_value.nil?
# are_same = (value == other_value)
# end
- def compare_to(other)
+ def compare_to(_other)
nil
end
# Override can_have_child? to report whether a given file *could* be added
# to this directory. (Some directories can't have subdirs, some can only have .json
# files, etc.)
- def can_have_child?(name, is_dir)
+ def can_have_child?(_name, _is_dir)
false
end
@@ -116,14 +116,14 @@ class Chef
# NOTE: create_child_from is an optional method that can also be added to
# your entry class, and will be called without actually reading the
# file_contents. This is used for knife upload /cookbooks/cookbookname.
- def create_child(name, file_contents)
+ def create_child(_name, _file_contents)
raise NotFoundError.new(self) if !exists?
raise OperationNotAllowedError.new(:create_child, self)
end
# Delete this item, possibly recursively. Entries MUST NOT delete a
# directory unless recurse is true.
- def delete(recurse)
+ def delete(_recurse)
raise NotFoundError.new(self) if !exists?
raise OperationNotAllowedError.new(:delete, self)
end
@@ -164,7 +164,7 @@ class Chef
end
# Write the contents of this file entry.
- def write(file_contents)
+ def write(_file_contents)
raise NotFoundError.new(self) if !exists?
raise OperationNotAllowedError.new(:write, self)
end
diff --git a/lib/chef/chef_fs/file_system/cookbooks_dir.rb b/lib/chef/chef_fs/file_system/cookbooks_dir.rb
index 27bedd3827..13b5ca7f36 100644
--- a/lib/chef/chef_fs/file_system/cookbooks_dir.rb
+++ b/lib/chef/chef_fs/file_system/cookbooks_dir.rb
@@ -145,7 +145,7 @@ class Chef
Chef::Config.cookbook_path = old_cookbook_path
end
- def upload_cookbook!(uploader, options = {})
+ def upload_cookbook!(uploader, _options = {})
if uploader.respond_to?(:upload_cookbook)
uploader.upload_cookbook
else
diff --git a/lib/chef/chef_fs/file_system/data_bag_dir.rb b/lib/chef/chef_fs/file_system/data_bag_dir.rb
index 212f76fdb9..6e2f50bc26 100644
--- a/lib/chef/chef_fs/file_system/data_bag_dir.rb
+++ b/lib/chef/chef_fs/file_system/data_bag_dir.rb
@@ -25,7 +25,7 @@ class Chef
module ChefFS
module FileSystem
class DataBagDir < RestListDir
- def initialize(name, parent, exists = nil)
+ def initialize(name, parent, _exists = nil)
super(name, parent, nil, Chef::ChefFS::DataHandler::DataBagItemDataHandler.new)
@exists = nil
end
diff --git a/lib/chef/chef_fs/file_system/data_bags_dir.rb b/lib/chef/chef_fs/file_system/data_bags_dir.rb
index 6d0685d3b7..30ab2168b1 100644
--- a/lib/chef/chef_fs/file_system/data_bags_dir.rb
+++ b/lib/chef/chef_fs/file_system/data_bags_dir.rb
@@ -48,11 +48,11 @@ class Chef
end
end
- def can_have_child?(name, is_dir)
+ def can_have_child?(_name, is_dir)
is_dir
end
- def create_child(name, file_contents)
+ def create_child(name, _file_contents)
begin
rest.post(api_path, { 'name' => name })
rescue Timeout::Error => e
diff --git a/lib/chef/chef_fs/file_system/environments_dir.rb b/lib/chef/chef_fs/file_system/environments_dir.rb
index 559dd6af86..e25f2cd2b8 100644
--- a/lib/chef/chef_fs/file_system/environments_dir.rb
+++ b/lib/chef/chef_fs/file_system/environments_dir.rb
@@ -44,12 +44,12 @@ class Chef
@exists = exists
end
- def delete(recurse)
+ def delete(_recurse)
raise NotFoundError.new(self) if !exists?
raise DefaultEnvironmentCannotBeModifiedError.new(:delete, self), "#{path_for_printing} cannot be deleted."
end
- def write(file_contents)
+ def write(_file_contents)
raise NotFoundError.new(self) if !exists?
raise DefaultEnvironmentCannotBeModifiedError.new(:write, self), "#{path_for_printing} cannot be updated."
end
diff --git a/lib/chef/chef_fs/file_system/memory_dir.rb b/lib/chef/chef_fs/file_system/memory_dir.rb
index a7eda3c654..461881bec7 100644
--- a/lib/chef/chef_fs/file_system/memory_dir.rb
+++ b/lib/chef/chef_fs/file_system/memory_dir.rb
@@ -21,7 +21,7 @@ class Chef
@children.push(child)
end
- def can_have_child?(name, is_dir)
+ def can_have_child?(name, _is_dir)
root.cannot_be_in_regex ? (name !~ root.cannot_be_in_regex) : true
end
diff --git a/lib/chef/chef_fs/file_system/org_entry.rb b/lib/chef/chef_fs/file_system/org_entry.rb
index 852956e1e5..88a4ef2067 100644
--- a/lib/chef/chef_fs/file_system/org_entry.rb
+++ b/lib/chef/chef_fs/file_system/org_entry.rb
@@ -25,7 +25,7 @@ class Chef
parent.exists?
end
- def delete(recurse)
+ def delete(_recurse)
raise Chef::ChefFS::FileSystem::OperationNotAllowedError.new(:delete, self)
end
end
diff --git a/lib/chef/chef_fs/file_system/organization_invites_entry.rb b/lib/chef/chef_fs/file_system/organization_invites_entry.rb
index 5df37085cb..e31d9bdf03 100644
--- a/lib/chef/chef_fs/file_system/organization_invites_entry.rb
+++ b/lib/chef/chef_fs/file_system/organization_invites_entry.rb
@@ -30,7 +30,7 @@ class Chef
parent.exists?
end
- def delete(recurse)
+ def delete(_recurse)
raise Chef::ChefFS::FileSystem::OperationNotAllowedError.new(:delete, self)
end
diff --git a/lib/chef/chef_fs/file_system/organization_members_entry.rb b/lib/chef/chef_fs/file_system/organization_members_entry.rb
index 94393b341f..27259bb414 100644
--- a/lib/chef/chef_fs/file_system/organization_members_entry.rb
+++ b/lib/chef/chef_fs/file_system/organization_members_entry.rb
@@ -30,7 +30,7 @@ class Chef
parent.exists?
end
- def delete(recurse)
+ def delete(_recurse)
raise Chef::ChefFS::FileSystem::OperationNotAllowedError.new(:delete, self)
end
diff --git a/lib/chef/chef_fs/file_system/rest_list_entry.rb b/lib/chef/chef_fs/file_system/rest_list_entry.rb
index f68794cb0d..6209e1d62b 100644
--- a/lib/chef/chef_fs/file_system/rest_list_entry.rb
+++ b/lib/chef/chef_fs/file_system/rest_list_entry.rb
@@ -66,7 +66,7 @@ class Chef
@exists
end
- def delete(recurse)
+ def delete(_recurse)
begin
rest.delete(api_path)
rescue Timeout::Error => e
diff --git a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb
index 8845b6926a..06f4a2ebe2 100644
--- a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb
+++ b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb
@@ -129,7 +129,7 @@ class Chef
@parallel_enumerable.restricted_copy(input)
end
- def method_missing(method, *args, &block)
+ def method_missing(_method, *args, &block)
@actual_lazy.send(:method, *args, &block)
end
end