summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-13 11:44:32 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-13 11:44:32 -0800
commitaf4afcc712d24dbc85a9c020a124acadeed295d2 (patch)
tree08a71e81175177fee945d09bb831d5ae37a24606 /spec/unit/provider/package
parent1edd3dba71b4531bb1a570dd7e387620e8ee61de (diff)
downloadchef-af4afcc712d24dbc85a9c020a124acadeed295d2.tar.gz
autocorrecting Style/TrailingCommalcg/trailing_comma
chefstyle -a fixed 1044 occurrances
Diffstat (limited to 'spec/unit/provider/package')
-rw-r--r--spec/unit/provider/package/apt_spec.rb40
-rw-r--r--spec/unit/provider/package/easy_install_spec.rb12
-rw-r--r--spec/unit/provider/package/homebrew_spec.rb16
-rw-r--r--spec/unit/provider/package/windows/exe_spec.rb8
-rw-r--r--spec/unit/provider/package/windows/msi_spec.rb8
-rw-r--r--spec/unit/provider/package/windows_spec.rb6
-rw-r--r--spec/unit/provider/package/yum_spec.rb78
7 files changed, 84 insertions, 84 deletions
diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb
index 8528480689..f1845abfb1 100644
--- a/spec/unit/provider/package/apt_spec.rb
+++ b/spec/unit/provider/package/apt_spec.rb
@@ -52,7 +52,7 @@ irssi:
it "should create a current resource with the name of the new_resource" do
expect(@provider).to receive(:shell_out!).with(
"apt-cache policy #{@new_resource.package_name}",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(@shell_out)
@provider.load_current_resource
@@ -95,7 +95,7 @@ libmysqlclient15-dev:
virtual_package = double(:stdout => virtual_package_out,:exitstatus => 0)
expect(@provider).to receive(:shell_out!).with(
"apt-cache policy libmysqlclient15-dev",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(virtual_package)
showpkg_out =<<-SHOWPKG_STDOUT
Package: libmysqlclient15-dev
@@ -118,7 +118,7 @@ libmysqlclient-dev 5.1.41-3ubuntu12
showpkg = double(:stdout => showpkg_out,:exitstatus => 0)
expect(@provider).to receive(:shell_out!).with(
"apt-cache showpkg libmysqlclient15-dev",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(showpkg)
real_package_out=<<-RPKG_STDOUT
libmysqlclient-dev:
@@ -136,7 +136,7 @@ libmysqlclient-dev:
real_package = double(:stdout => real_package_out,:exitstatus => 0)
expect(@provider).to receive(:shell_out!).with(
"apt-cache policy libmysqlclient-dev",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(real_package)
@provider.load_current_resource
end
@@ -152,7 +152,7 @@ mp3-decoder:
virtual_package = double(:stdout => virtual_package_out,:exitstatus => 0)
expect(@provider).to receive(:shell_out!).with(
"apt-cache policy mp3-decoder",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(virtual_package)
showpkg_out=<<-SHOWPKG_STDOUT
Package: mp3-decoder
@@ -178,7 +178,7 @@ mpg123 1.12.1-0ubuntu1
showpkg = double(:stdout => showpkg_out,:exitstatus => 0)
expect(@provider).to receive(:shell_out!).with(
"apt-cache showpkg mp3-decoder",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(showpkg)
expect { @provider.load_current_resource }.to raise_error(Chef::Exceptions::Package)
end
@@ -191,7 +191,7 @@ mpg123 1.12.1-0ubuntu1
allow(@new_resource).to receive(:provider).and_return(nil)
expect(@provider).to receive(:shell_out!).with(
"apt-cache -o APT::Default-Release=lenny-backports policy irssi",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(@shell_out)
@provider.load_current_resource
end
@@ -200,7 +200,7 @@ mpg123 1.12.1-0ubuntu1
@new_resource.source "pluto"
expect(@provider).to receive(:shell_out!).with(
"apt-cache policy #{@new_resource.package_name}",
- :timeout => @timeout
+ :timeout => @timeout,
).and_return(@shell_out)
@provider.load_current_resource
@provider.define_resource_requirements
@@ -220,7 +220,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!). with(
"apt-get -q -y install irssi=0.8.12-7",
:env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil},
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.install_package("irssi", "0.8.12-7")
end
@@ -229,7 +229,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y --force-yes install irssi=0.8.12-7",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@new_resource.options("--force-yes")
@provider.install_package("irssi", "0.8.12-7")
@@ -245,7 +245,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y -o APT::Default-Release=lenny-backports install irssi=0.8.12-7",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.install_package("irssi", "0.8.12-7")
@@ -266,7 +266,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y remove irssi",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil},
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.remove_package("irssi", "0.8.12-7")
end
@@ -275,7 +275,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y --force-yes remove irssi",
:env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@new_resource.options("--force-yes")
@@ -289,7 +289,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y purge irssi",
:env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.purge_package("irssi", "0.8.12-7")
end
@@ -298,7 +298,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y --force-yes purge irssi",
:env => { "DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@new_resource.options("--force-yes")
@@ -317,7 +317,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"debconf-set-selections /tmp/irssi-0.8.12-7.seed",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil},
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.preseed_package(file)
@@ -327,7 +327,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"debconf-set-selections /tmp/irssi-0.8.12-7.seed",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil},
- :timeout => @timeout
+ :timeout => @timeout,
)
file = @provider.get_preseed_file("irssi", "0.8.12-7")
@provider.preseed_package(file)
@@ -348,7 +348,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"dpkg-reconfigure irssi",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.reconfig_package("irssi", "0.8.12-7")
end
@@ -360,7 +360,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y install libmysqlclient-dev",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.install_package("libmysqlclient-dev", "not_a_real_version")
end
@@ -374,7 +374,7 @@ mpg123 1.12.1-0ubuntu1
expect(@provider).to receive(:shell_out!).with(
"apt-get -q -y install libmysqlclient-dev irssi=0.8.12-7",
:env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil },
- :timeout => @timeout
+ :timeout => @timeout,
)
@provider.install_package(["libmysqlclient-dev", "irssi"], ["not_a_real_version", "0.8.12-7"])
end
diff --git a/spec/unit/provider/package/easy_install_spec.rb b/spec/unit/provider/package/easy_install_spec.rb
index b734bc57cf..4ac325e7d4 100644
--- a/spec/unit/provider/package/easy_install_spec.rb
+++ b/spec/unit/provider/package/easy_install_spec.rb
@@ -63,14 +63,14 @@ describe Chef::Provider::Package::EasyInstall do
it "should run easy_install with the package name and version" do
expect(@provider).to receive(:run_command).with({
:command => "easy_install \"boto==1.8d\""
- })
+ },)
@provider.install_package("boto", "1.8d")
end
it "should run easy_install with the package name and version and specified options" do
expect(@provider).to receive(:run_command).with({
:command => "easy_install --always-unzip \"boto==1.8d\""
- })
+ },)
allow(@new_resource).to receive(:options).and_return("--always-unzip")
@provider.install_package("boto", "1.8d")
end
@@ -78,21 +78,21 @@ describe Chef::Provider::Package::EasyInstall do
it "should run easy_install with the package name and version" do
expect(@provider).to receive(:run_command).with({
:command => "easy_install \"boto==1.8d\""
- })
+ },)
@provider.upgrade_package("boto", "1.8d")
end
it "should run easy_install -m with the package name and version" do
expect(@provider).to receive(:run_command).with({
:command => "easy_install -m boto"
- })
+ },)
@provider.remove_package("boto", "1.8d")
end
it "should run easy_install -m with the package name and version and specified options" do
expect(@provider).to receive(:run_command).with({
:command => "easy_install -x -m boto"
- })
+ },)
allow(@new_resource).to receive(:options).and_return("-x")
@provider.remove_package("boto", "1.8d")
end
@@ -100,7 +100,7 @@ describe Chef::Provider::Package::EasyInstall do
it "should run easy_install -m with the package name and version" do
expect(@provider).to receive(:run_command).with({
:command => "easy_install -m boto"
- })
+ },)
@provider.purge_package("boto", "1.8d")
end
diff --git a/spec/unit/provider/package/homebrew_spec.rb b/spec/unit/provider/package/homebrew_spec.rb
index d01d455b09..926c1a0ff0 100644
--- a/spec/unit/provider/package/homebrew_spec.rb
+++ b/spec/unit/provider/package/homebrew_spec.rb
@@ -38,7 +38,7 @@ describe Chef::Provider::Package::Homebrew do
'stable' => '24.3',
'bottle' => false,
'devel' => nil,
- 'head' => nil
+ 'head' => nil,
},
'revision' => 0,
'installed' => [],
@@ -47,7 +47,7 @@ describe Chef::Provider::Package::Homebrew do
'dependencies' => [],
'conflicts_with' => [],
'caveats' => nil,
- 'options' => []
+ 'options' => [],
}
end
@@ -59,7 +59,7 @@ describe Chef::Provider::Package::Homebrew do
'stable' => '24.3',
'bottle' => false,
'devel' => nil,
- 'head' => 'HEAD'
+ 'head' => 'HEAD',
},
'revision' => 0,
'installed' => [{ 'version' => '24.3' }],
@@ -68,7 +68,7 @@ describe Chef::Provider::Package::Homebrew do
'dependencies' => [],
'conflicts_with' => [],
'caveats' => '',
- 'options' => []
+ 'options' => [],
}
end
@@ -80,7 +80,7 @@ describe Chef::Provider::Package::Homebrew do
'stable' => '24.3-keggy',
'bottle' => false,
'devel' => nil,
- 'head' => 'HEAD'
+ 'head' => 'HEAD',
},
'revision' => 0,
'installed' => [{ 'version' => '24.3-keggy' }],
@@ -89,7 +89,7 @@ describe Chef::Provider::Package::Homebrew do
'dependencies' => [],
'conflicts_with' => [],
'caveats' => '',
- 'options' => []
+ 'options' => [],
}
end
@@ -101,7 +101,7 @@ describe Chef::Provider::Package::Homebrew do
'stable' => '24.3-keggy',
'bottle' => false,
'devel' => nil,
- 'head' => 'HEAD'
+ 'head' => 'HEAD',
},
'revision' => 0,
'installed' => [],
@@ -110,7 +110,7 @@ describe Chef::Provider::Package::Homebrew do
'dependencies' => [],
'conflicts_with' => [],
'caveats' => '',
- 'options' => []
+ 'options' => [],
}
end
diff --git a/spec/unit/provider/package/windows/exe_spec.rb b/spec/unit/provider/package/windows/exe_spec.rb
index 677ab87f29..6756ffa9e0 100644
--- a/spec/unit/provider/package/windows/exe_spec.rb
+++ b/spec/unit/provider/package/windows/exe_spec.rb
@@ -42,7 +42,7 @@ describe Chef::Provider::Package::Windows::Exe do
let(:uninstall_hash) do
[{
'DisplayVersion' => 'outdated',
- 'UninstallString' => File.join("uninst_dir", "uninst_file")
+ 'UninstallString' => File.join("uninst_dir", "uninst_file"),
}]
end
let(:uninstall_entry) do
@@ -122,12 +122,12 @@ describe Chef::Provider::Package::Windows::Exe do
[
{
'DisplayVersion' => 'v1',
- 'UninstallString' => File.join("uninst_dir1", "uninst_file1")
+ 'UninstallString' => File.join("uninst_dir1", "uninst_file1"),
},
{
'DisplayVersion' => 'v2',
- 'UninstallString' => File.join("uninst_dir2", "uninst_file2")
- }
+ 'UninstallString' => File.join("uninst_dir2", "uninst_file2"),
+ },
]
end
diff --git a/spec/unit/provider/package/windows/msi_spec.rb b/spec/unit/provider/package/windows/msi_spec.rb
index 9377dcaad9..835bd4ad19 100644
--- a/spec/unit/provider/package/windows/msi_spec.rb
+++ b/spec/unit/provider/package/windows/msi_spec.rb
@@ -35,7 +35,7 @@ describe Chef::Provider::Package::Windows::MSI do
let(:uninstall_hash) do
[{
'DisplayVersion' => 'outdated',
- 'UninstallString' => "MsiExec.exe /X{guid}"
+ 'UninstallString' => "MsiExec.exe /X{guid}",
}]
end
let(:uninstall_entry) do
@@ -130,12 +130,12 @@ describe Chef::Provider::Package::Windows::MSI do
[
{
'DisplayVersion' => 'outdated',
- 'UninstallString' => "MsiExec.exe /X{guid}"
+ 'UninstallString' => "MsiExec.exe /X{guid}",
},
{
'DisplayVersion' => 'really_outdated',
- 'UninstallString' => "MsiExec.exe /X{guid2}"
- }
+ 'UninstallString' => "MsiExec.exe /X{guid2}",
+ },
]
end
diff --git a/spec/unit/provider/package/windows_spec.rb b/spec/unit/provider/package/windows_spec.rb
index 6952a91d92..200cc9888a 100644
--- a/spec/unit/provider/package/windows_spec.rb
+++ b/spec/unit/provider/package/windows_spec.rb
@@ -171,7 +171,7 @@ describe Chef::Provider::Package::Windows, :windows_only do
let(:uninstall_hash) do
[{
'DisplayVersion' => 'outdated',
- 'UninstallString' => "blah blah"
+ 'UninstallString' => "blah blah",
}]
end
let(:uninstall_key) { "blah" }
@@ -192,7 +192,7 @@ describe Chef::Provider::Package::Windows, :windows_only do
let(:uninstall_hash) do
[{
'DisplayVersion' => 'outdated',
- 'UninstallString' => "MsiExec.exe /X{guid}"
+ 'UninstallString' => "MsiExec.exe /X{guid}",
}]
end
@@ -205,7 +205,7 @@ describe Chef::Provider::Package::Windows, :windows_only do
let(:uninstall_hash) do
[{
'DisplayVersion' => 'outdated',
- 'UninstallString' => %q{"c:/hfhfheru/uninst.exe"}
+ 'UninstallString' => %q{"c:/hfhfheru/uninst.exe"},
}]
end
diff --git a/spec/unit/provider/package/yum_spec.rb b/spec/unit/provider/package/yum_spec.rb
index 41118b70fb..70ab257a54 100644
--- a/spec/unit/provider/package/yum_spec.rb
+++ b/spec/unit/provider/package/yum_spec.rb
@@ -36,7 +36,7 @@ describe Chef::Provider::Package::Yum do
:version_available? => true,
:allow_multi_install => [ "kernel" ],
:package_repository => "base",
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -172,7 +172,7 @@ describe Chef::Provider::Package::Yum do
allow(@yum_cache).to receive(:package_available?) { |pkg| pkg == 'cups' ? true : false }
allow(@yum_cache).to receive(:packages_from_require) do |pkg|
[Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.3", "noarch", [], false, true, "base"),
- Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.2", "noarch", [], false, true, "base"),]
+ Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.2", "noarch", [], false, true, "base")]
end
expect(Chef::Log).to receive(:debug).exactly(1).times.with(%r{checking yum info})
expect(Chef::Log).to receive(:debug).exactly(1).times.with(%r{installed version})
@@ -320,7 +320,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "2.0.1.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
}
@@ -395,7 +395,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "2.0.1.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -417,7 +417,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "1.2.4-11.18.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -440,7 +440,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "2.0.1.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -465,7 +465,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "1.2.4-11.18.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -485,7 +485,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "1.2.4-11.18.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -510,7 +510,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "1.2.4-11.18.el5",
:package_available? => false,
:version_available? => true,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -580,7 +580,7 @@ describe Chef::Provider::Package::Yum do
:candidate_version => "1.2.4-11.18.el5_2.3",
:package_available? => true,
:version_available? => nil,
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -599,7 +599,7 @@ describe Chef::Provider::Package::Yum do
:package_available? => true,
:version_available? => true,
:allow_multi_install => [ "kernel" ],
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -619,7 +619,7 @@ describe Chef::Provider::Package::Yum do
:version_available? => true,
:allow_multi_install => [ "cups" ],
:package_repository => "base",
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -643,7 +643,7 @@ describe Chef::Provider::Package::Yum do
:version_available? => true,
:allow_multi_install => [],
:package_repository => "base",
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -710,7 +710,7 @@ describe Chef::Provider::Package::Yum do
:package_available? => true,
:version_available? => true,
:allow_multi_install => [ "kernel" ],
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")
@@ -726,7 +726,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:candidate_version).and_return('11')
expect(@provider).to receive(:upgrade_package).with(
"cups",
- "11"
+ "11",
)
@provider.run_action(:upgrade)
end
@@ -745,7 +745,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:candidate_version).and_return('11')
expect(@provider).to receive(:upgrade_package).with(
"cups",
- "11"
+ "11",
)
@provider.run_action(:upgrade)
end
@@ -792,7 +792,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:shell_out).and_return(@status)
expect(@provider).to receive(:shell_out).once.with(
"yum -d0 -e0 -y install emacs-1.0",
- {:timeout => Chef::Config[:yum_timeout]}
+ {:timeout => Chef::Config[:yum_timeout]},
)
@provider.yum_command("-d0 -e0 -y install emacs-1.0")
end
@@ -802,7 +802,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:shell_out).and_return(@status)
expect(@provider).to receive(:shell_out).once.with(
"yum -d0 -e0 -y install emacs-1.0",
- {:timeout => Chef::Config[:yum_timeout]}
+ {:timeout => Chef::Config[:yum_timeout]},
)
expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec)
end
@@ -813,7 +813,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:shell_out).and_return(@status)
expect(@provider).to receive(:shell_out).once.with(
"yum -d0 -e0 -y install emacs-1.0",
- {:timeout => Chef::Config[:yum_timeout]}
+ {:timeout => Chef::Config[:yum_timeout]},
)
# will still raise an exception, can't stub out the subsequent call
expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec)
@@ -825,7 +825,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:shell_out).and_return(@status)
expect(@provider).to receive(:shell_out).twice.with(
"yum -d0 -e0 -y install emacs-1.0",
- {:timeout => Chef::Config[:yum_timeout]}
+ {:timeout => Chef::Config[:yum_timeout]},
)
# will still raise an exception, can't stub out the subsequent call
expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec)
@@ -839,7 +839,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:shell_out).and_return(@status)
expect(@provider).to receive(:shell_out).once.with(
"yum-deprecated -d0 -e0 -y install emacs-1.0",
- {:timeout => Chef::Config[:yum_timeout]}
+ {:timeout => Chef::Config[:yum_timeout]},
)
@provider.yum_command("-d0 -e0 -y install emacs-1.0")
end
@@ -856,7 +856,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[
[ "0:3.3", [ 0, "3.3", nil ] ],
[ "9:1.7.3", [ 9, "1.7.3", nil ] ],
- [ "15:20020927", [ 15, "20020927", nil ] ]
+ [ "15:20020927", [ 15, "20020927", nil ] ],
].each do |x, y|
expect(@rpmutils.version_parse(x)).to eq(y)
end
@@ -866,7 +866,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[
[ ":3.3", [ 0, "3.3", nil ] ],
[ "-1:1.7.3", [ nil, nil, "1:1.7.3" ] ],
- [ "-:20020927", [ nil, nil, ":20020927" ] ]
+ [ "-:20020927", [ nil, nil, ":20020927" ] ],
].each do |x, y|
expect(@rpmutils.version_parse(x)).to eq(y)
end
@@ -876,7 +876,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[
[ "3.3", [ nil, "3.3", nil ] ],
[ "1.7.3", [ nil, "1.7.3", nil ] ],
- [ "20020927", [ nil, "20020927", nil ] ]
+ [ "20020927", [ nil, "20020927", nil ] ],
].each do |x, y|
expect(@rpmutils.version_parse(x)).to eq(y)
end
@@ -886,7 +886,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[
[ "3..3", [ nil, "3..3", nil ] ],
[ "0001.7.3", [ nil, "0001.7.3", nil ] ],
- [ "20020927,3", [ nil, "20020927,3", nil ] ]
+ [ "20020927,3", [ nil, "20020927,3", nil ] ],
].each do |x, y|
expect(@rpmutils.version_parse(x)).to eq(y)
end
@@ -896,7 +896,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[
[ "3.3-0.pre3.1.60.el5_5.1", [ nil, "3.3", "0.pre3.1.60.el5_5.1" ] ],
[ "1.7.3-1jpp.2.el5", [ nil, "1.7.3", "1jpp.2.el5" ] ],
- [ "20020927-46.el5", [ nil, "20020927", "46.el5" ] ]
+ [ "20020927-46.el5", [ nil, "20020927", "46.el5" ] ],
].each do |x, y|
expect(@rpmutils.version_parse(x)).to eq(y)
end
@@ -906,7 +906,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[
[ "3.3-", [ nil, "3.3", nil ] ],
[ "-1jpp.2.el5", [ nil, nil, "1jpp.2.el5" ] ],
- [ "-0020020927-46.el5", [ nil, "-0020020927", "46.el5" ] ]
+ [ "-0020020927-46.el5", [ nil, "-0020020927", "46.el5" ] ],
].each do |x, y|
expect(@rpmutils.version_parse(x)).to eq(y)
end
@@ -982,7 +982,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
[ nil, "1.0.1", -1 ],
[ "1.0.1", "", 1 ],
[ "", "", 0 ],
- [ "", "1.0.1", -1 ]
+ [ "", "1.0.1", -1 ],
].each do |x, y, result|
expect(@rpmutils.rpmvercmp(x,y)).to eq(result)
end
@@ -1001,7 +1001,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
end
it "tests isalpha good input" do
- [ 'a', 'z', 'A', 'Z', ].each do |t|
+ [ 'a', 'z', 'A', 'Z' ].each do |t|
expect(@rpmutils.isalpha(t)).to eq(true)
end
end
@@ -1013,7 +1013,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
end
it "tests isdigit good input" do
- [ '0', '9', ].each do |t|
+ [ '0', '9' ].each do |t|
expect(@rpmutils.isdigit(t)).to eq(true)
end
end
@@ -1102,7 +1102,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
[ "0:1.4.10-7.20090624svn.el5",
"0:1.4.10-7.20090625svn.el5" ],
[ "0:2.3.4-2.el5",
- "0:2.3.4-2.el6" ]
+ "0:2.3.4-2.el6" ],
].each do |smaller, larger|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
@@ -1128,7 +1128,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
[ "0:1.9",
"3:1.9" ],
[ "2.3-2.el5",
- "2.3-2.el6" ]
+ "2.3-2.el6" ],
].each do |smaller, larger|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
@@ -1145,7 +1145,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
[ "0:2.3-15.el5",
"0:2.3-15.el5" ],
[ "0:alpha9.8-27.2",
- "0:alpha9.8-27.2" ]
+ "0:alpha9.8-27.2" ],
].each do |smaller, larger|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
@@ -1160,7 +1160,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
[ "2.3-15.el5",
"2.3-15.el5" ],
[ "alpha9.8-3",
- "alpha9.8-3" ]
+ "alpha9.8-3" ],
].each do |smaller, larger|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
@@ -1460,7 +1460,7 @@ describe Chef::Provider::Package::Yum::RPMDependency do
[ "=", :== ],
[ "==", :== ],
[ "<=", :<= ],
- [ "<", :< ]
+ [ "<", :< ],
].each do |before, after|
@rpmdep = Chef::Provider::Package::Yum::RPMDependency.parse("testing #{before} 1:1.1-1")
expect(@rpmdep.flag).to eq(after)
@@ -1474,7 +1474,7 @@ describe Chef::Provider::Package::Yum::RPMDependency do
[ ">>", :== ],
[ "<<", :== ],
[ "!", :== ],
- [ "~", :== ]
+ [ "~", :== ],
].each do |before, after|
@rpmdep = Chef::Provider::Package::Yum::RPMDependency.parse("testing #{before} 1:1.1-1")
expect(@rpmdep.name).to eq("testing #{before} 1:1.1-1")
@@ -1549,12 +1549,12 @@ describe Chef::Provider::Package::Yum::RPMDb do
# name, version, arch, installed, available
deps_v = [
Chef::Provider::Package::Yum::RPMDependency.parse("libz.so.1()(64bit)"),
- Chef::Provider::Package::Yum::RPMDependency.parse("test-package-a = 0:1.6.5-9.36.el5")
+ Chef::Provider::Package::Yum::RPMDependency.parse("test-package-a = 0:1.6.5-9.36.el5"),
]
deps_z = [
Chef::Provider::Package::Yum::RPMDependency.parse("libz.so.1()(64bit)"),
Chef::Provider::Package::Yum::RPMDependency.parse("config(test) = 0:1.6.5-9.36.el5"),
- Chef::Provider::Package::Yum::RPMDependency.parse("test-package-c = 0:1.6.5-9.36.el5")
+ Chef::Provider::Package::Yum::RPMDependency.parse("test-package-c = 0:1.6.5-9.36.el5"),
]
@rpm_v = Chef::Provider::Package::Yum::RPMDbPackage.new("test-package-a", "0:1.6.5-9.36.el5", "i386", deps_v, true, false, "base")
@rpm_w = Chef::Provider::Package::Yum::RPMDbPackage.new("test-package-b", "0:1.6.5-9.36.el5", "i386", [], true, true, "extras")
@@ -2127,7 +2127,7 @@ describe "Chef::Provider::Package::Yum - Multi" do
:version_available? => true,
:allow_multi_install => [ 'kernel' ],
:package_repository => 'base',
- :disable_extra_repo_control => true
+ :disable_extra_repo_control => true,
)
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
allow(@yum_cache).to receive(:yum_binary=).with("yum")