diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:29:13 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:29:13 -0700 |
commit | 878560a22f37aec0c2dfe681b3743e027155be88 (patch) | |
tree | 676062be70a45e73a8722c0e6dadd220162fb101 /lib | |
parent | 202887162a22e0c7062064fff0d9462f8c02bf0e (diff) | |
download | chef-878560a22f37aec0c2dfe681b3743e027155be88.tar.gz |
fix Layout/DotPosition
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 697c2db232..c42f08a462 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -537,9 +537,9 @@ class Chef if chef_fs.versioned_cookbooks || path[0] == "cookbook_artifacts" result = with_entry([ path[0] ]) do |entry| # list /cookbooks/name = filter /cookbooks/name-version down to name - entry.children.map { |child| split_name_version(child.name) }. - select { |name, version| name == path[1] }. - map { |name, version| version } + entry.children.map { |child| split_name_version(child.name) } + .select { |name, version| name == path[1] } + .map { |name, version| version } end if result.empty? raise ChefZero::DataStore::DataNotFoundError.new(path) diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb index 90b8c88cff..c840fad126 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb @@ -52,9 +52,9 @@ class Chef end def children - entries = Dir.entries(file_path).sort. - map { |child_name| make_child_entry(child_name) }. - select { |child| child && can_have_child?(child.name, child.dir?) } + entries = Dir.entries(file_path).sort + .map { |child_name| make_child_entry(child_name) } + .select { |child| child && can_have_child?(child.name, child.dir?) } entries.select { |entry| !(entry.dir? && entry.children.size == 0 ) } rescue Errno::ENOENT raise Chef::ChefFS::FileSystem::NotFoundError.new(self, $!) diff --git a/lib/chef/chef_fs/file_system/repository/directory.rb b/lib/chef/chef_fs/file_system/repository/directory.rb index 328cf92b03..d3f8d84324 100644 --- a/lib/chef/chef_fs/file_system/repository/directory.rb +++ b/lib/chef/chef_fs/file_system/repository/directory.rb @@ -71,9 +71,9 @@ class Chef def children return FileSystemCache.instance.children(file_path) if FileSystemCache.instance.exist?(file_path) - children = dir_ls.sort. - map { |child_name| make_child_entry(child_name) }. - select { |new_child| new_child.fs_entry_valid? && can_have_child?(new_child.name, new_child.dir?) } + children = dir_ls.sort + .map { |child_name| make_child_entry(child_name) } + .select { |new_child| new_child.fs_entry_valid? && can_have_child?(new_child.name, new_child.dir?) } FileSystemCache.instance.set_children(file_path, children) rescue Errno::ENOENT => e raise Chef::ChefFS::FileSystem::NotFoundError.new(self, e) diff --git a/lib/chef/chef_fs/file_system/repository/file_system_entry.rb b/lib/chef/chef_fs/file_system/repository/file_system_entry.rb index 45ae002521..183fcda26d 100644 --- a/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +++ b/lib/chef/chef_fs/file_system/repository/file_system_entry.rb @@ -80,9 +80,9 @@ class Chef def children # Except cookbooks and data bag dirs, all things must be json files - Dir.entries(file_path).sort. - map { |child_name| make_child_entry(child_name) }. - select { |new_child| new_child.fs_entry_valid? && can_have_child?(new_child.name, new_child.dir?) } + Dir.entries(file_path).sort + .map { |child_name| make_child_entry(child_name) } + .select { |new_child| new_child.fs_entry_valid? && can_have_child?(new_child.name, new_child.dir?) } rescue Errno::ENOENT raise Chef::ChefFS::FileSystem::NotFoundError.new(self, $!) end |