From 4c152c9e13b3a82f9cec3e7f42caa9cd97039018 Mon Sep 17 00:00:00 2001 From: Piotr Murach Date: Sat, 23 Jun 2012 17:58:34 +0100 Subject: [PATCH] Add configuration dotfiles. --- .gitignore | 1 + .rspec | 1 + .rvmrc | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 9 +++++++++ 4 files changed, 45 insertions(+) create mode 100644 .rspec create mode 100644 .rvmrc create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index d87d4be..f61f58b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ spec/reports test/tmp test/version_tmp tmp +*.swp diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..4e1e0d2 --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--color diff --git a/.rvmrc b/.rvmrc new file mode 100644 index 0000000..c2555aa --- /dev/null +++ b/.rvmrc @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +environment_id="1.9.3@rack-policy" + +# +# First we attempt to load the desired environment directly from the environment +# file. This is very fast and efficient compared to running through the entire +# CLI and selector. If you want feedback on which environment was used then +# insert the word 'use' after --create as this triggers verbose mode. +# +if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \ + && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] +then + \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id" + + if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] + then + . "${rvm_path:-$HOME/.rvm}/hooks/after_use" + fi +else + # If the environment file has not yet been created, use the RVM CLI to select. + if ! rvm --create "$environment_id" + then + echo "Failed to create RVM environment '${environment_id}'." + return 1 + fi +fi + +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 interactive shells +fi diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ab0c065 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +--- +rvm: +- 1.8.7 +- 1.9.2 +- 1.9.3 +- rbx-18mode +- rbx-19mode +- jruby +- ruby-head