lib/beaker/host/freebsd/pkg.rb in beaker-4.42.0 vs lib/beaker/host/freebsd/pkg.rb in beaker-5.0.0

- old
+ new

@@ -6,15 +6,15 @@ "^#{package}-[0-9][0-9a-zA-Z_\\.,]*$" end def check_pkgng_sh 'TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexist ' \ - 'pkg info -x "pkg(-devel)?\\$" > /dev/null 2>&1' + 'pkg info -x "pkg(-devel)?\\$" > /dev/null 2>&1' end def pkgng_active?(opts = {}) - opts = {:accept_all_exit_codes => true}.merge(opts) + opts = { :accept_all_exit_codes => true }.merge(opts) execute("/bin/sh -c '#{check_pkgng_sh}'", opts) { |r| r }.exit_code == 0 end def install_package(package, cmdline_args = nil, opts = {}) cmd = if pkgng_active? @@ -33,10 +33,10 @@ end execute(cmd, opts) { |result| result } end def check_for_package(package, opts = {}) - opts = {:accept_all_exit_codes => true}.merge(opts) + opts = { :accept_all_exit_codes => true }.merge(opts) cmd = if pkgng_active? "pkg info #{package}" else "pkg_info -Ix '#{pkg_info_pattern(package)}'" end