Sha256: 3adfefa26a6bd7c52a9256d1b497bbbc6a22ba314b29cc07d7d3a0608a654692

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

#!/usr/local/bin/bash

if [ $# -eq 0 ]; then
  echo "Please specify 'rspec' or 'bundle', 'list'"
  exit 1
fi

# Check if rbenv is installed
which rbenv > /dev/null 2>&1 && if [ $? -ne 0 ]; then echo -e 'rbenv is need\nPlease install rbenv: https://github.com/rbenv/rbenv'; exit 1; fi

declare -a all_support_ruby=(
  '2.3.3'
  '2.4.2'
  '2.5.8'
  '2.6.6'
  '2.7.1'
)

declare -a target_ruby
declare -a versions=${@:2:$#}
if [[ $# > 1 ]]; then
  target_ruby=("${versions[@]}")
else
  target_ruby=("${all_support_ruby[@]}")
fi

command=$1
case $command in
  "bundle")
    source "$(pwd)/devscript/bundle_for_all_support_ruby.sh" "${target_ruby[@]}";;
  "rspec")
    source "$(pwd)/devscript/rspec_for_all_support_ruby.sh" "${target_ruby[@]}";;
  "list")
    echo "===== Display All Support Ruby Version ====="
    for version in "${target_ruby[@]}"; do
      echo "${version}"
    done
    echo "============================================";;
  *)
    echo -n "Do not support command: ${command}\nPlease specify 'bundle' or 'rspec', 'list'"
    exit 1;;
esac

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
r2-oas-0.3.1 devscript/all_support_ruby.sh
r2-oas-0.3.0 devscript/all_support_ruby.sh