post_install() {
  set -e
  cd /usr/share/unisec
  #rm -f Gemfile.lock
  bundle config build.nokogiri --use-system-libraries
  bundle config set --local path 'vendor/bundle'
  bundle config set --local without development install test lint docs
  bundle install
}

post_upgrade() {
  post_install "$@"
}

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

