chef 16.10.8 → 16.10.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c34d608da9c455be75a96a34306d2f48c696791569efad3a74d949ffa057a1c6
4
- data.tar.gz: 53948ca32fb71521ba9b9502f7bd3a3aa10754a6f1971b1c3756ea8caa682de9
3
+ metadata.gz: 69f33cf16fb2c5375f4bd85ecf86119b8f56840eba929598aded143828456df2
4
+ data.tar.gz: 617ac1141ca029b92c1a1eead375dcdf32e0d9edd59213283d496c5884a49d23
5
5
  SHA512:
6
- metadata.gz: 07d4cc0280c0619c9f9caf772d5f8f5c1edbe5e05cea905a5033c218dd6c0fdfd2c3159dfc18eafdc66c1dc0ed7da28839bade97514f910967b8adf1930b6707
7
- data.tar.gz: 00a4ee34617c879ab9de9dba5ea9b5842c3fd1da604c7ac8c9e14ae7ce2f1575b5b0227d2ac947937519df90802192f6d49340890f57ec08c7df0adb7b6f0734
6
+ metadata.gz: e2bd27946ce5b3c19ee09386d795e2409091f6faf326d6ee686d4d80141eed5e9391c7219b8f7d25aa3df5eda8d96f555fb1bab358379fb80aefc40d76065b65
7
+ data.tar.gz: 815f740eb7564b6c8b4c09422d2daafb6d84a664fac1f5d39cc41d018e9921116f78e3860d2e9d88eca39bdfdbffa9d1bb336712418cbf642d06e95f26cba1c3
@@ -32,12 +32,12 @@ class Chef
32
32
  profile_fetch_url = target[:url]
33
33
  else
34
34
  # verifies that the target e.g base/ssh exists
35
- base_path = "/compliance/profiles/#{uri.host}#{uri.path}"
36
-
35
+ profile = sanitize_profile_name(uri)
36
+ owner, id = profile.split("/")
37
37
  profile_path = if target.respond_to?(:key?) && target.key?(:version)
38
- "#{base_path}/version/#{target[:version]}/tar"
38
+ "/compliance/profiles/#{owner}/#{id}/version/#{target[:version]}/tar"
39
39
  else
40
- "#{base_path}/tar"
40
+ "/compliance/profiles/#{owner}/#{id}/tar"
41
41
  end
42
42
 
43
43
  url = URI(Chef::Config[:data_collector][:server_url])
@@ -60,6 +60,17 @@ class Chef
60
60
  nil
61
61
  end
62
62
 
63
+ # returns a parsed url for `admin/profile` or `compliance://admin/profile`
64
+ # TODO: remove in future, copied from inspec to support older versions of inspec
65
+ def self.sanitize_profile_name(profile)
66
+ uri = if URI(profile).scheme == "compliance"
67
+ URI(profile)
68
+ else
69
+ URI("compliance://#{profile}")
70
+ end
71
+ uri.to_s.sub(%r{^compliance:\/\/}, "")
72
+ end
73
+
63
74
  def to_s
64
75
  "#{ChefUtils::Dist::Automate::PRODUCT} for #{ChefUtils::Dist::Solo::PRODUCT} Fetcher"
65
76
  end
@@ -203,7 +203,7 @@ class Chef
203
203
  end
204
204
  end
205
205
  # Removed "/" from the end of str, because it was causing idempotency issue.
206
- @real_device == "/" ? @real_device : @real_device.chomp("/")
206
+ (@real_device == "/" || @real_device.match?(":/$")) ? @real_device : @real_device.chomp("/")
207
207
  end
208
208
 
209
209
  def device_logstring
data/lib/chef/version.rb CHANGED
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("16.10.8")
26
+ VERSION = Chef::VersionString.new("16.10.17")
27
27
  end
28
28
 
29
29
  #
@@ -21,6 +21,14 @@ describe Chef::Compliance::Fetcher::Automate do
21
21
  expect(res.target).to eq(expected)
22
22
  end
23
23
 
24
+ it "should resolve a compliance URL with a @ in the namespace" do
25
+ res = Chef::Compliance::Fetcher::Automate.resolve("compliance://name@space/profile_name")
26
+
27
+ expect(res).to be_kind_of(Chef::Compliance::Fetcher::Automate)
28
+ expected = "https://automate.test/compliance/profiles/name@space/profile_name/tar"
29
+ expect(res.target).to eq(expected)
30
+ end
31
+
24
32
  it "raises an exception with no data collector token" do
25
33
  Chef::Config[:data_collector].delete(:token)
26
34
 
@@ -66,6 +66,7 @@ describe Chef::Provider::Mount::Mount do
66
66
 
67
67
  describe "when dealing with network mounts" do
68
68
  { "nfs" => "nfsserver:/vol/path",
69
+ "cephfs" => "cephserver:6789:/",
69
70
  "cifs" => "//cifsserver/share" }.each do |type, fs_spec|
70
71
  it "should detect network fs_spec (#{type})" do
71
72
  @new_resource.device fs_spec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.10.8
4
+ version: 16.10.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 16.10.8
19
+ version: 16.10.17
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 16.10.8
26
+ version: 16.10.17
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 16.10.8
33
+ version: 16.10.17
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 16.10.8
40
+ version: 16.10.17
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement