summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md7
-rw-r--r--Gemfile.lock10
-rw-r--r--VERSION2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--lib/chef/provider/package/powershell.rb16
-rw-r--r--lib/chef/resource/sudo.rb1
-rw-r--r--lib/chef/version.rb2
-rw-r--r--spec/unit/provider/package/powershell_spec.rb38
8 files changed, 39 insertions, 39 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd7702adb5..cd6aa26b2f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,16 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
-<!-- latest_release 14.0.206 -->
-## [v14.0.206](https://github.com/chef/chef/tree/v14.0.206) (2018-04-19)
+<!-- latest_release 14.0.207 -->
+## [v14.0.207](https://github.com/chef/chef/tree/v14.0.207) (2018-04-22)
#### Merged Pull Requests
-- Some options, i.e. metric, require specifying dev [#7162](https://github.com/chef/chef/pull/7162) ([tomdoherty](https://github.com/tomdoherty))
+- Avoid conflict with build_powershell_command from powershell_out mixin [#7173](https://github.com/chef/chef/pull/7173) ([stuartpreston](https://github.com/stuartpreston))
<!-- latest_release -->
<!-- release_rollup since=14.0.202 -->
### Changes since 14.0.202 release
#### Merged Pull Requests
+- Avoid conflict with build_powershell_command from powershell_out mixin [#7173](https://github.com/chef/chef/pull/7173) ([stuartpreston](https://github.com/stuartpreston)) <!-- 14.0.207 -->
- Some options, i.e. metric, require specifying dev [#7162](https://github.com/chef/chef/pull/7162) ([tomdoherty](https://github.com/tomdoherty)) <!-- 14.0.206 -->
- Windows MSI: files are now re-unzipped during repair mode [#7111](https://github.com/chef/chef/pull/7111) ([stuartpreston](https://github.com/stuartpreston)) <!-- 14.0.205 -->
- add name_property to resource inspector [#7164](https://github.com/chef/chef/pull/7164) ([thommay](https://github.com/thommay)) <!-- 14.0.204 -->
diff --git a/Gemfile.lock b/Gemfile.lock
index afa127ba4e..f0275ad7ff 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -15,10 +15,10 @@ GIT
PATH
remote: .
specs:
- chef (14.0.206)
+ chef (14.0.207)
addressable
bundler (>= 1.10)
- chef-config (= 14.0.206)
+ chef-config (= 14.0.207)
chef-zero (>= 13.0)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
@@ -45,10 +45,10 @@ PATH
specinfra (~> 2.10)
syslog-logger (~> 1.6)
uuidtools (~> 2.1.5)
- chef (14.0.206-universal-mingw32)
+ chef (14.0.207-universal-mingw32)
addressable
bundler (>= 1.10)
- chef-config (= 14.0.206)
+ chef-config (= 14.0.207)
chef-zero (>= 13.0)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
@@ -90,7 +90,7 @@ PATH
PATH
remote: chef-config
specs:
- chef-config (14.0.206)
+ chef-config (14.0.207)
addressable
fuzzyurl
mixlib-config (~> 2.0)
diff --git a/VERSION b/VERSION
index f0c5be30db..dcb0401c5f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-14.0.206 \ No newline at end of file
+14.0.207 \ No newline at end of file
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index 06f64b6816..e482e030eb 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -21,7 +21,7 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
- VERSION = "14.0.206"
+ VERSION = "14.0.207"
end
#
diff --git a/lib/chef/provider/package/powershell.rb b/lib/chef/provider/package/powershell.rb
index 87af7f61d8..44b6e69a00 100644
--- a/lib/chef/provider/package/powershell.rb
+++ b/lib/chef/provider/package/powershell.rb
@@ -53,7 +53,7 @@ class Chef
# Installs the package specified with the version passed else latest version will be installed
def install_package(names, versions)
names.each_with_index do |name, index|
- powershell_out(build_powershell_command("Install-Package '#{name}'", versions[index]), timeout: new_resource.timeout)
+ powershell_out(build_powershell_package_command("Install-Package '#{name}'", versions[index]), timeout: new_resource.timeout)
end
end
@@ -61,11 +61,11 @@ class Chef
def remove_package(names, versions)
names.each_with_index do |name, index|
if versions && !versions[index].nil?
- powershell_out(build_powershell_command("Uninstall-Package '#{name}'", versions[index]), timeout: new_resource.timeout)
+ powershell_out(build_powershell_package_command("Uninstall-Package '#{name}'", versions[index]), timeout: new_resource.timeout)
else
version = "0"
until version.empty?
- version = powershell_out(build_powershell_command("Uninstall-Package '#{name}'"), timeout: new_resource.timeout).stdout.strip
+ version = powershell_out(build_powershell_package_command("Uninstall-Package '#{name}'"), timeout: new_resource.timeout).stdout.strip
unless version.empty?
logger.info("Removed package '#{name}' with version #{version}")
end
@@ -79,9 +79,9 @@ class Chef
versions = []
new_resource.package_name.each_with_index do |name, index|
version = if new_resource.version && !new_resource.version[index].nil?
- powershell_out(build_powershell_command("Find-Package '#{name}'", new_resource.version[index]), timeout: new_resource.timeout).stdout.strip
+ powershell_out(build_powershell_package_command("Find-Package '#{name}'", new_resource.version[index]), timeout: new_resource.timeout).stdout.strip
else
- powershell_out(build_powershell_command("Find-Package '#{name}'"), timeout: new_resource.timeout).stdout.strip
+ powershell_out(build_powershell_package_command("Find-Package '#{name}'"), timeout: new_resource.timeout).stdout.strip
end
if version.empty?
version = nil
@@ -96,9 +96,9 @@ class Chef
version_list = []
new_resource.package_name.each_with_index do |name, index|
version = if new_resource.version && !new_resource.version[index].nil?
- powershell_out(build_powershell_command("Get-Package '#{name}'", new_resource.version[index]), timeout: new_resource.timeout).stdout.strip
+ powershell_out(build_powershell_package_command("Get-Package '#{name}'", new_resource.version[index]), timeout: new_resource.timeout).stdout.strip
else
- powershell_out(build_powershell_command("Get-Package '#{name}'"), timeout: new_resource.timeout).stdout.strip
+ powershell_out(build_powershell_package_command("Get-Package '#{name}'"), timeout: new_resource.timeout).stdout.strip
end
if version.empty?
version = nil
@@ -108,7 +108,7 @@ class Chef
version_list
end
- def build_powershell_command(command, version = nil)
+ def build_powershell_package_command(command, version = nil)
command = [command] unless command.is_a?(Array)
command.unshift("(")
%w{-Force -ForceBootstrap}.each do |arg|
diff --git a/lib/chef/resource/sudo.rb b/lib/chef/resource/sudo.rb
index 95fb2d0282..af26bde595 100644
--- a/lib/chef/resource/sudo.rb
+++ b/lib/chef/resource/sudo.rb
@@ -171,7 +171,6 @@ class Chef
end
else
declare_resource(:template, "#{target}#{new_resource.filename}") do
- source "sudoer.erb"
source ::File.expand_path("../support/sudoer.erb", __FILE__)
local true
mode "0440"
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index 310636e71b..36866fd3c8 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require "chef/version_string"
class Chef
CHEF_ROOT = File.expand_path("../..", __FILE__)
- VERSION = Chef::VersionString.new("14.0.206")
+ VERSION = Chef::VersionString.new("14.0.207")
end
#
diff --git a/spec/unit/provider/package/powershell_spec.rb b/spec/unit/provider/package/powershell_spec.rb
index 9bebfa9194..534b7b6b13 100644
--- a/spec/unit/provider/package/powershell_spec.rb
+++ b/spec/unit/provider/package/powershell_spec.rb
@@ -192,88 +192,88 @@ describe Chef::Provider::Package::Powershell do
end
- describe "#build_powershell_command" do
+ describe "#build_powershell_package_command" do
it "can build a valid command from a single string" do
- expect(provider.build_powershell_command("Get-Package posh-git")).to eql(generated_command)
+ expect(provider.build_powershell_package_command("Get-Package posh-git")).to eql(generated_command)
end
it "can build a valid command from an array" do
- expect(provider.build_powershell_command(["Get-Package", "posh-git"])).to eql(generated_command)
+ expect(provider.build_powershell_package_command(["Get-Package", "posh-git"])).to eql(generated_command)
end
context "when source is nil" do
it "build get commands correctly" do
- expect(provider.build_powershell_command("Get-Package xNetworking")).to eql(generated_get_cmdlet)
+ expect(provider.build_powershell_package_command("Get-Package xNetworking")).to eql(generated_get_cmdlet)
end
it "build get commands correctly when a version is passed" do
- expect(provider.build_powershell_command("Get-Package xNetworking", "1.0.0.0")).to eql(generated_get_cmdlet_with_version)
+ expect(provider.build_powershell_package_command("Get-Package xNetworking", "1.0.0.0")).to eql(generated_get_cmdlet_with_version)
end
it "builds find commands correctly" do
- expect(provider.build_powershell_command("Find-Package xNetworking")).to eql(generated_find_cmdlet)
+ expect(provider.build_powershell_package_command("Find-Package xNetworking")).to eql(generated_find_cmdlet)
end
it "builds find commands correctly when a version is passed" do
- expect(provider.build_powershell_command("Find-Package xNetworking", "1.0.0.0")).to eql(generated_find_cmdlet_with_version)
+ expect(provider.build_powershell_package_command("Find-Package xNetworking", "1.0.0.0")).to eql(generated_find_cmdlet_with_version)
end
it "build install commands correctly" do
- expect(provider.build_powershell_command("Install-Package xNetworking")).to eql(generated_install_cmdlet)
+ expect(provider.build_powershell_package_command("Install-Package xNetworking")).to eql(generated_install_cmdlet)
end
it "build install commands correctly when a version is passed" do
- expect(provider.build_powershell_command("Install-Package xNetworking", "1.0.0.0")).to eql(generated_install_cmdlet_with_version)
+ expect(provider.build_powershell_package_command("Install-Package xNetworking", "1.0.0.0")).to eql(generated_install_cmdlet_with_version)
end
it "build install commands correctly" do
- expect(provider.build_powershell_command("Uninstall-Package xNetworking")).to eql(generated_uninstall_cmdlet)
+ expect(provider.build_powershell_package_command("Uninstall-Package xNetworking")).to eql(generated_uninstall_cmdlet)
end
it "build install commands correctly when a version is passed" do
- expect(provider.build_powershell_command("Uninstall-Package xNetworking", "1.0.0.0")).to eql(generated_uninstall_cmdlet_with_version)
+ expect(provider.build_powershell_package_command("Uninstall-Package xNetworking", "1.0.0.0")).to eql(generated_uninstall_cmdlet_with_version)
end
end
context "when source is set" do
it "build get commands correctly" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Get-Package xNetworking")).to eql(generated_get_cmdlet)
+ expect(provider.build_powershell_package_command("Get-Package xNetworking")).to eql(generated_get_cmdlet)
end
it "build get commands correctly when a version is passed" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Get-Package xNetworking", "1.0.0.0")).to eql(generated_get_cmdlet_with_version)
+ expect(provider.build_powershell_package_command("Get-Package xNetworking", "1.0.0.0")).to eql(generated_get_cmdlet_with_version)
end
it "builds find commands correctly" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Find-Package xNetworking")).to eql(generated_find_cmdlet_with_source)
+ expect(provider.build_powershell_package_command("Find-Package xNetworking")).to eql(generated_find_cmdlet_with_source)
end
it "builds find commands correctly when a version is passed" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Find-Package xNetworking", "1.0.0.0")).to eql(generated_find_cmdlet_with_source_and_version)
+ expect(provider.build_powershell_package_command("Find-Package xNetworking", "1.0.0.0")).to eql(generated_find_cmdlet_with_source_and_version)
end
it "build install commands correctly" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Install-Package xNetworking")).to eql(generated_install_cmdlet_with_source)
+ expect(provider.build_powershell_package_command("Install-Package xNetworking")).to eql(generated_install_cmdlet_with_source)
end
it "build install commands correctly when a version is passed" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Install-Package xNetworking", "1.0.0.0")).to eql(generated_install_cmdlet_with_source_and_version)
+ expect(provider.build_powershell_package_command("Install-Package xNetworking", "1.0.0.0")).to eql(generated_install_cmdlet_with_source_and_version)
end
it "build install commands correctly" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Uninstall-Package xNetworking")).to eql(generated_uninstall_cmdlet)
+ expect(provider.build_powershell_package_command("Uninstall-Package xNetworking")).to eql(generated_uninstall_cmdlet)
end
it "build install commands correctly when a version is passed" do
new_resource.source("MyGallery")
- expect(provider.build_powershell_command("Uninstall-Package xNetworking", "1.0.0.0")).to eql(generated_uninstall_cmdlet_with_version)
+ expect(provider.build_powershell_package_command("Uninstall-Package xNetworking", "1.0.0.0")).to eql(generated_uninstall_cmdlet_with_version)
end
end
end