post_install() {
  set -e
  cd /usr/share/aspisec
  #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/aspisec/{vendor,.bundle}
  rmdir /usr/share/aspisec
}

