Sha256: 4c309009417cda21585e0642bb2df1506cab165875fb16dec2d2ec438fe28b2e

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

#!/usr/bin/env bash

environment_id="ruby-1.9.3-p194@<%= @namespaced_name %>"

if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
  && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
then
  \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
  [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
    \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
  if [[ $- == *i* ]] # check for interactive shells
  then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
  else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
  fi
else
  # If the environment file has not yet been created, use the RVM CLI to select.
  rvm --create use  "$environment_id" || {
    echo "Failed to create RVM environment '${environment_id}'."
    return 1
  }
fi

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enginizer-0.0.1 lib/enginizer/templates/%namespaced_name%/.rvmrc.tt