cheffish 16.0.26 → 17.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -16
- data/Rakefile +1 -1
- data/cheffish.gemspec +2 -4
- data/lib/chef/resource/chef_acl.rb +7 -5
- data/lib/chef/resource/chef_mirror.rb +5 -3
- data/lib/cheffish/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72e807e4b3685b5e238fdcff944f78f20e689d36f1e744bfa47788201b561fea
|
4
|
+
data.tar.gz: c0d7e74a983374f5fb3ad88fe7f1d10dc80c9ab8c8f6bcef774030571ebe0e29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d213972c29b938be1db778e1d177090e89ef39e71d50b1bc0ffbbfe1fdf5c5f6c8c1eb0bdd33b4264bbf9f55a1ac7f120f22edc8d9c8a3cc3ea412b380f70199
|
7
|
+
data.tar.gz: eb0460c0a87bc8d9cd1e5571dc624579d6e17d68a9f2cf855dc27f104c096d2edaebba84f805942a910b231622987c5c3cb24f664c9d6a0ad410190a977099eb
|
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem "chefstyle", "
|
6
|
+
gem "chefstyle", "2.0.8"
|
7
7
|
gem "rake"
|
8
8
|
gem "rspec", "~> 3.0"
|
9
9
|
end
|
@@ -14,20 +14,8 @@ if ENV["GEMFILE_MOD"]
|
|
14
14
|
instance_eval(ENV["GEMFILE_MOD"])
|
15
15
|
else
|
16
16
|
group :development do
|
17
|
-
|
18
|
-
gem "
|
17
|
+
# temporarily we only support building against master
|
18
|
+
gem "chef", github: "chef/chef", branch: "master"
|
19
|
+
gem "ohai", github: "chef/ohai", branch: "master"
|
19
20
|
end
|
20
21
|
end
|
21
|
-
|
22
|
-
group :docs do
|
23
|
-
gem "yard"
|
24
|
-
gem "redcarpet"
|
25
|
-
gem "github-markup"
|
26
|
-
end
|
27
|
-
|
28
|
-
group :debug do
|
29
|
-
gem "pry"
|
30
|
-
gem "pry-byebug"
|
31
|
-
gem "pry-stack_explorer"
|
32
|
-
gem "rb-readline"
|
33
|
-
end
|
data/Rakefile
CHANGED
data/cheffish.gemspec
CHANGED
@@ -12,14 +12,12 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.email = "oss@chef.io"
|
13
13
|
s.homepage = "https://github.com/chef/cheffish"
|
14
14
|
|
15
|
-
s.required_ruby_version = ">=
|
15
|
+
s.required_ruby_version = ">= 3.0"
|
16
16
|
|
17
17
|
s.add_dependency "chef-zero", ">= 14.0"
|
18
|
+
s.add_dependency "chef-utils", ">= 17.0"
|
18
19
|
s.add_dependency "net-ssh"
|
19
20
|
|
20
|
-
s.bindir = "bin"
|
21
|
-
s.executables = %w{ }
|
22
|
-
|
23
21
|
s.require_path = "lib"
|
24
22
|
s.files = %w{Gemfile Rakefile LICENSE} + Dir.glob("*.gemspec") +
|
25
23
|
Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
|
@@ -1,9 +1,11 @@
|
|
1
1
|
require_relative "../../cheffish"
|
2
2
|
require_relative "../../cheffish/base_resource"
|
3
3
|
require "chef/chef_fs/data_handler/acl_data_handler"
|
4
|
-
require "chef/
|
4
|
+
require "chef-utils/parallel_map" unless defined?(ChefUtils::ParallelMap)
|
5
5
|
require "uri" unless defined?(URI)
|
6
6
|
|
7
|
+
using ChefUtils::ParallelMap
|
8
|
+
|
7
9
|
class Chef
|
8
10
|
class Resource
|
9
11
|
class ChefAcl < Cheffish::BaseResource
|
@@ -126,13 +128,13 @@ class Chef
|
|
126
128
|
# the ACL has changed.
|
127
129
|
if new_resource.recursive == true || (new_resource.recursive == :on_change && (!acl || changed))
|
128
130
|
children, _error = list(path, "*")
|
129
|
-
|
131
|
+
children.parallel_each do |child|
|
130
132
|
next if child.split("/")[-1] == "containers"
|
131
133
|
|
132
134
|
create_acl(child)
|
133
135
|
end
|
134
136
|
# containers mess up our descent, so we do them last
|
135
|
-
|
137
|
+
children.parallel_each do |child|
|
136
138
|
next if child.split("/")[-1] != "containers"
|
137
139
|
|
138
140
|
create_acl(child)
|
@@ -301,7 +303,7 @@ class Chef
|
|
301
303
|
#
|
302
304
|
# Result: /*/foo = [ '/organizations/foo', '/users/foo' ]
|
303
305
|
#
|
304
|
-
matches =
|
306
|
+
matches = matches.parallel_map do |pth|
|
305
307
|
found, error = list(pth, part)
|
306
308
|
if error
|
307
309
|
if parts[0..index - 1].all? { |p| p != "*" }
|
@@ -312,7 +314,7 @@ class Chef
|
|
312
314
|
else
|
313
315
|
found
|
314
316
|
end
|
315
|
-
end.flatten
|
317
|
+
end.flatten.to_a
|
316
318
|
end
|
317
319
|
|
318
320
|
matches
|
@@ -2,9 +2,11 @@ require_relative "../../cheffish"
|
|
2
2
|
require_relative "../../cheffish/base_resource"
|
3
3
|
require "chef/chef_fs/file_pattern"
|
4
4
|
require "chef/chef_fs/file_system"
|
5
|
-
require "chef/chef_fs/parallelizer"
|
6
5
|
require "chef/chef_fs/file_system/chef_server/chef_server_root_dir"
|
7
6
|
require "chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir"
|
7
|
+
require "chef-utils/parallel_map" unless defined?(ChefUtils::ParallelMap)
|
8
|
+
|
9
|
+
using ChefUtils::ParallelMap
|
8
10
|
|
9
11
|
class Chef
|
10
12
|
class Resource
|
@@ -97,7 +99,7 @@ class Chef
|
|
97
99
|
end
|
98
100
|
|
99
101
|
# Honor concurrency
|
100
|
-
|
102
|
+
ChefUtils::DefaultThreadPool.instance.threads = new_resource.concurrency - 1
|
101
103
|
|
102
104
|
# We don't let the user pass absolute paths; we want to reserve those for
|
103
105
|
# multi-org support (/organizations/foo).
|
@@ -108,7 +110,7 @@ class Chef
|
|
108
110
|
# Copy!
|
109
111
|
path = Chef::ChefFS::FilePattern.new("/#{new_resource.path}")
|
110
112
|
ui = CopyListener.new(self)
|
111
|
-
error = Chef::ChefFS::FileSystem.copy_to(path, src_root, dest_root, nil, options, ui, proc { |p| p.path })
|
113
|
+
error, _result = Chef::ChefFS::FileSystem.copy_to(path, src_root, dest_root, nil, options, ui, proc { |p| p.path })
|
112
114
|
|
113
115
|
if error
|
114
116
|
raise "Errors while copying:#{ui.errors.map { |e| "#{e}\n" }.join("")}"
|
data/lib/cheffish/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheffish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 17.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-zero
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '14.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: chef-utils
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '17.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '17.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: net-ssh
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
134
|
requirements:
|
121
135
|
- - ">="
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
137
|
+
version: '3.0'
|
124
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
139
|
requirements:
|
126
140
|
- - ">="
|