Sha256: 19e84ee059cdc4fd3cc0db134c774c46ee6604ca0b77b64995a02c36ce3e185c

Contents?: true

Size: 522 Bytes

Versions: 23

Compression:

Stored size: 522 Bytes

Contents

#!/usr/bin/env bash

#
# r - Rails shortcut command.
#
r() {
  local action args

  action="$1" ; shift

  args="$@"

  case "$action" in

    c)      action=console   ;;

    db)     action=dbconsole ;;

    g)      action=generate  ;;

    h|help) action="-h"      ;;

  esac

  if [[ -s config.ru ]] ; then

    ruby ./script/rails $args

  else

    if [[ -s ./script/$action ]] ; then

      ruby ./script/$action $args

    else

      printf "ERROR: Missing script ./script/$action !!!"

    fi

  fi

  return 0
}

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
rvm-1.1.4 contrib/r
rvm-1.1.3 contrib/r
rvm-1.1.2 contrib/r
rvm-1.1.1 contrib/r
rvm-1.1.0 contrib/r
rvm-1.0.23 contrib/r
rvm-1.0.22 contrib/r
rvm-1.0.21 contrib/r
rvm-1.0.20 contrib/r
rvm-1.0.19 contrib/r
rvm-1.0.18 contrib/r
rvm-1.0.17 contrib/r
rvm-1.0.15 contrib/r
gemrage-1.0.0 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r
gemrage-0.4.1 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r
gemrage-0.4.0 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r
gemrage-0.3.2 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r
gemrage-0.3.1 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r
gemrage-0.3.0 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r
gemrage-0.2.0 vendor/ruby/1.8/gems/rvm-1.0.14/contrib/r