Sha256: 4760ffb7782882f4db974ca862ff2bcda75dbaff894ec66213127b9b4fb25c6b

Contents?: true

Size: 1.32 KB

Versions: 3

Compression:

Stored size: 1.32 KB

Contents

#!/usr/bin/env bash

# This cannot be executed from within a Ruby-based environment (like Rake)
# since Bundler will affect the subshell environments.

set -e

function header() {
  echo -e "\n$(tput setaf 5)$(tput smul)$1:$(tput sgr0)"
}

function green() {
  echo "$(tput setaf 2)$*$(tput sgr0)"
}

function update() {
  bundle config --local path .bundle
  bundle update | grep -ve "^Using "
}

function install() {
  bundle install --quiet --path=.bundle && green "  OK"
}

root=$(dirname "$0")

# Previously needed by Travis CI; might still be needed at Github Actions
# due to nested repos
unset BUNDLE_GEMFILE

if [[ $1 == "install" ]]; then
  header "Installing gem dependencies"
  install

  for app_path in "$root"/spec/railsapps/rails_*; do
    (
      header "Rails app $(basename "$app_path")"
      cd "$app_path"
      echo -n "Installing gems for $(basename "$app_path")"
      install
    )
  done
  echo ""

elif [[ $1 == "update" ]]; then
  header "Updating gem dependencies"
  update

  for app_path in "$root"/spec/railsapps/rails_*; do
    (
      cd "$app_path"
      header "Updating $(basename "$app_path")"
      update
    )
  done
  echo ""

else
  echo "Usage: $0 [install|update]"
  echo ""
  echo "  Install: Install all bundled updates."
  echo "  Update: Run bundle update on all bundles."
  echo ""
  exit 127
fi

Version data entries

3 entries across 2 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/roadie-rails-3.3.0/setup.sh
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/roadie-rails-3.3.0/setup.sh
roadie-rails-3.3.0 setup.sh