chef 16.10.8-universal-mingw32 → 16.10.17-universal-mingw32

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: f1d6650e44387969be09051f429c75ad68040bd28289d003f0ae9dde1166f8f7
4
- data.tar.gz: af13e87700fabfa6481fb52b9ead99980586fdbcee51d0c44f4bd24d7534fcdc
3
+ metadata.gz: 3d0782dad85cb7b76c159476d2e0f0187270cd9d1a08916a7ec1c9ea7ab60b42
4
+ data.tar.gz: 7f5545a34ba6fda007be0b7085ef819eaf3f686f4d4e1c151bd463db1c14b7ee
5
5
  SHA512:
6
- metadata.gz: 7da2206957b65f0bab0ad438c6f71e9472362d1b05fbaf359b31949f546c8a6afb937e59ca72c3e02330f1dc6674c340a029c2a3236e78a19f2571b2183cba70
7
- data.tar.gz: a4025c073d6d9dfcbf03110fb98475edbe9a4a6cb798ff81111b02e45ba5b4b2659fdb4a916d22c0f70bbdc9c57e532eeb79c4eadc3db15c84ef8f98e6886ab9
6
+ metadata.gz: 2ce9dffee18c6eb75c2db3efead108314581c42b0b4c9b212b08982bf328071ad67342312e201db3cb6b569ceb5a6d9bdf76d40d9c220ed121b6bdb331da121a
7
+ data.tar.gz: 802529997941fdbe9bcfbd508a5af9f93915274bb6510945aca3067e84f961c404b12a1624d2ab7f0ead11bee745cdaecc49e6bee4ccb6112a569702e09f3e5c
@@ -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: universal-mingw32
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-04 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