lib/rconf/support/package_installer.rb in rconf-0.10.1 vs lib/rconf/support/package_installer.rb in rconf-1.0.0

- old
+ new

@@ -21,10 +21,11 @@ # === Parameters # packages(String|Array):: Package name or Packages list # opts[:abort_on_failure](String):: Optional, abort configuration # and display given error message if install fails when set # opts[:report](TrueClass|FalseClass):: Whether to report installation + # opts[:post_install](String):: Message displayed only when software was installed # # === Block # If a block is given it will get called with no argument prior to the # packages being installed. If the block returns true then installation # will proceed otherwise it won't. Use the block to check whether @@ -45,9 +46,10 @@ end if must_install report_check("Installing #{packages.join(', ')}") if report Platform.dispatch(packages, opts) { :install } report_success if report + opts && opts[:post_install] && report('Note: '.blue + opts[:post_install]) end true end protected