chef 13.10.0-universal-mingw32 → 13.10.4-universal-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/chef.gemspec +1 -1
- data/lib/chef/application/client.rb +3 -3
- data/lib/chef/file_content_management/tempfile.rb +3 -3
- data/lib/chef/provider/package/windows.rb +8 -0
- data/lib/chef/version.rb +1 -1
- data/spec/unit/provider/package/windows_spec.rb +19 -0
- metadata +22 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71b376cc98c42bfb134d99cdd659f2ed2baddde9
|
4
|
+
data.tar.gz: d474de3ea197e5eb40c6433bcf3e00c15312b0a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdd8afee7966b66bebc36dc0b45ec731764f61ee1a45b9d56b70ab9e4c3c0405a5036a24d011d32943c32ee9a6e8b3284489c2df43fc88c4f5fbba8bf7204f4d
|
7
|
+
data.tar.gz: fa3a479a268b80986f1665e99995a901c599e11f4ed51b1188cc4953703c86b7276dde33f6b06ca4e45c5ccf07560fb8f8a191fdf962283c02d7c3e2f5ddf1c3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
13.10.
|
1
|
+
13.10.4
|
data/chef.gemspec
CHANGED
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.add_dependency "iso8601", "~> 0.9.1"
|
41
41
|
|
42
42
|
# Audit mode requires these, so they are non-developmental dependencies now
|
43
|
-
%w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_dependency gem, "~> 3.5" }
|
43
|
+
%w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_dependency gem, "~> 3.5", "< 3.8" }
|
44
44
|
s.add_dependency "rspec_junit_formatter", "~> 0.2.0"
|
45
45
|
s.add_dependency "serverspec", "~> 2.7"
|
46
46
|
s.add_dependency "specinfra", "~> 2.10"
|
@@ -529,14 +529,14 @@ class Chef::Application::Client < Chef::Application
|
|
529
529
|
|
530
530
|
def fetch_recipe_tarball(url, path)
|
531
531
|
Chef::Log.debug("Download recipes tarball from #{url} to #{path}")
|
532
|
-
if url
|
532
|
+
if File.exist?(url)
|
533
|
+
FileUtils.cp(url, path)
|
534
|
+
elsif url =~ URI.regexp
|
533
535
|
File.open(path, "wb") do |f|
|
534
536
|
open(url) do |r|
|
535
537
|
f.write(r.read)
|
536
538
|
end
|
537
539
|
end
|
538
|
-
elsif File.exist?(url)
|
539
|
-
FileUtils.cp(url, path)
|
540
540
|
else
|
541
541
|
Chef::Application.fatal! "You specified --recipe-url but the value is neither a valid URL nor a path to a file that exists on disk." +
|
542
542
|
"Please confirm the location of the tarball and try again."
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Lamont Granquist (<lamont@chef.io>)
|
3
|
-
# Copyright:: Copyright 2013-
|
3
|
+
# Copyright:: Copyright 2013-2018, Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -68,7 +68,7 @@ class Chef
|
|
68
68
|
# the leading "[.]chef-" here should be considered a public API and should not be changed
|
69
69
|
basename.insert 0, "chef-"
|
70
70
|
basename.insert 0, "." unless Chef::Platform.windows? # dotfile if we're not on windows
|
71
|
-
basename
|
71
|
+
basename.scrub
|
72
72
|
end
|
73
73
|
|
74
74
|
# this is similar to File.extname() but greedy about the extension (from the first dot, not the last dot)
|
@@ -76,7 +76,7 @@ class Chef
|
|
76
76
|
# complexity here is due to supporting mangling non-UTF8 strings (e.g. latin-1 filenames with characters that are illegal in UTF-8)
|
77
77
|
b = File.basename(@new_resource.path)
|
78
78
|
i = b.index(".")
|
79
|
-
i.nil? ? "" : b[i..-1]
|
79
|
+
i.nil? ? "" : b[i..-1].scrub
|
80
80
|
end
|
81
81
|
|
82
82
|
# Returns the possible directories for the tempfile to be created in.
|
@@ -39,6 +39,14 @@ class Chef
|
|
39
39
|
a.assertion { new_resource.source || msi? }
|
40
40
|
a.failure_message Chef::Exceptions::NoWindowsPackageSource, "Source for package #{new_resource.name} must be specified in the resource's source property for package to be installed because the package_name property is used to test for the package installation state for this package type."
|
41
41
|
end
|
42
|
+
|
43
|
+
unless uri_scheme?(new_resource.source)
|
44
|
+
requirements.assert(:install) do |a|
|
45
|
+
a.assertion { ::File.exist?(new_resource.source) }
|
46
|
+
a.failure_message Chef::Exceptions::Package, "Source for package #{new_resource.name} does not exist"
|
47
|
+
a.whyrun "Assuming source file #{new_resource.source} would have been created."
|
48
|
+
end
|
49
|
+
end
|
42
50
|
end
|
43
51
|
|
44
52
|
# load_current_resource is run in Chef::Provider#run_action when not in whyrun_mode?
|
data/lib/chef/version.rb
CHANGED
@@ -394,6 +394,25 @@ describe Chef::Provider::Package::Windows, :windows_only do
|
|
394
394
|
end
|
395
395
|
end
|
396
396
|
end
|
397
|
+
|
398
|
+
context "a missing local file is given" do
|
399
|
+
let(:resource_source) { "C:/a_missing_file.exe" }
|
400
|
+
let(:installer_type) { nil }
|
401
|
+
before do
|
402
|
+
allow(::File).to receive(:exist?).with(provider.new_resource.source).and_return(false)
|
403
|
+
provider.load_current_resource
|
404
|
+
end
|
405
|
+
|
406
|
+
it "raises a Package error" do
|
407
|
+
expect { provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package)
|
408
|
+
end
|
409
|
+
|
410
|
+
it "why_run mode doesn't raise an error" do
|
411
|
+
Chef::Config[:why_run] = true
|
412
|
+
expect { provider.run_action(:install) }.not_to raise_error
|
413
|
+
Chef::Config[:why_run] = false
|
414
|
+
end
|
415
|
+
end
|
397
416
|
end
|
398
417
|
|
399
418
|
shared_context "valid checksum" do
|
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: 13.10.
|
4
|
+
version: 13.10.4
|
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: 2018-
|
11
|
+
date: 2018-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 13.10.
|
19
|
+
version: 13.10.4
|
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: 13.10.
|
26
|
+
version: 13.10.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-cli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -313,6 +313,9 @@ dependencies:
|
|
313
313
|
- - "~>"
|
314
314
|
- !ruby/object:Gem::Version
|
315
315
|
version: '3.5'
|
316
|
+
- - "<"
|
317
|
+
- !ruby/object:Gem::Version
|
318
|
+
version: '3.8'
|
316
319
|
type: :runtime
|
317
320
|
prerelease: false
|
318
321
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -320,6 +323,9 @@ dependencies:
|
|
320
323
|
- - "~>"
|
321
324
|
- !ruby/object:Gem::Version
|
322
325
|
version: '3.5'
|
326
|
+
- - "<"
|
327
|
+
- !ruby/object:Gem::Version
|
328
|
+
version: '3.8'
|
323
329
|
- !ruby/object:Gem::Dependency
|
324
330
|
name: rspec-expectations
|
325
331
|
requirement: !ruby/object:Gem::Requirement
|
@@ -327,6 +333,9 @@ dependencies:
|
|
327
333
|
- - "~>"
|
328
334
|
- !ruby/object:Gem::Version
|
329
335
|
version: '3.5'
|
336
|
+
- - "<"
|
337
|
+
- !ruby/object:Gem::Version
|
338
|
+
version: '3.8'
|
330
339
|
type: :runtime
|
331
340
|
prerelease: false
|
332
341
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -334,6 +343,9 @@ dependencies:
|
|
334
343
|
- - "~>"
|
335
344
|
- !ruby/object:Gem::Version
|
336
345
|
version: '3.5'
|
346
|
+
- - "<"
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '3.8'
|
337
349
|
- !ruby/object:Gem::Dependency
|
338
350
|
name: rspec-mocks
|
339
351
|
requirement: !ruby/object:Gem::Requirement
|
@@ -341,6 +353,9 @@ dependencies:
|
|
341
353
|
- - "~>"
|
342
354
|
- !ruby/object:Gem::Version
|
343
355
|
version: '3.5'
|
356
|
+
- - "<"
|
357
|
+
- !ruby/object:Gem::Version
|
358
|
+
version: '3.8'
|
344
359
|
type: :runtime
|
345
360
|
prerelease: false
|
346
361
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -348,6 +363,9 @@ dependencies:
|
|
348
363
|
- - "~>"
|
349
364
|
- !ruby/object:Gem::Version
|
350
365
|
version: '3.5'
|
366
|
+
- - "<"
|
367
|
+
- !ruby/object:Gem::Version
|
368
|
+
version: '3.8'
|
351
369
|
- !ruby/object:Gem::Dependency
|
352
370
|
name: rspec_junit_formatter
|
353
371
|
requirement: !ruby/object:Gem::Requirement
|