post_install() {
  set -e
  cd /usr/share/unisec
  # rm -f Gemfile.lock
  bundle config set build.nokogiri --use-system-libraries
  bundle config set --local path 'vendor/bundle'
  bundle config set --local without development install test lint docs
  bundle install
  echo
  echo "For shell completiion setup, see https://noraj.github.io/unisec/#/pages/install?id=shell-completion."
}

post_upgrade() {
  post_install "$@"
}

post_remove() {
  rm -r /usr/share/unisec/{vendor,.bundle}
  rmdir /usr/share/unisec
}
