Permalink
Browse files

Fully removed spec from Rakefile & Gemfile

  • Loading branch information...
1 parent 48df288 commit 7aa260168af3af659354cbeb5ba54704bcceec06 @rebx committed Apr 1, 2012
Showing with 81 additions and 3 deletions.
  1. +48 −0 .rvmrc
  2. +1 −0 Gemfile
  3. +29 −0 Gemfile.lock
  4. +3 −3 Rakefile
View
48 .rvmrc
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+
+# This is an RVM Project .rvmrc file, used to automatically load the ruby
+# development environment upon cd'ing into the directory
+
+# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
+# Only full ruby name is supported here, for short names use:
+# echo "rvm use 1.9.3" > .rvmrc
+environment_id="ruby-1.9.3-p125@rush"
+
+# Uncomment the following lines if you want to verify rvm version per project
+# rvmrc_rvm_version="1.11.3" # 1.10.1 seams as a safe start
+# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
+# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
+# return 1
+# }
+
+# 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"
+ [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
+ \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
+else
+ # If the environment file has not yet been created, use the RVM CLI to select.
+ rvm --create "$environment_id" || {
+ echo "Failed to create RVM environment '${environment_id}'."
+ return 1
+ }
+fi
+
+# If you use bundler, this might be useful to you:
+if [[ -s Gemfile ]] && {
+ ! builtin command -v bundle >/dev/null ||
+ builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
+}
+then
+ printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
+ gem install bundler
+fi
+if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
+then
+ bundle install | grep -vE '^Using|Your bundle is complete'
+fi
View
@@ -2,3 +2,4 @@
source "http://rubygems.org"
gem "rspec", "2.8.0"
+gem "jeweler"
View
@@ -0,0 +1,29 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.3)
+ git (1.2.5)
+ jeweler (1.8.3)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rdoc
+ json (1.6.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ jeweler
+ rspec (= 2.8.0)
View
@@ -30,13 +30,13 @@ RSpec::Core::RakeTask.new do |t|
end
desc "Print specdocs"
-Spec::Rake::SpecTask.new(:doc) do |t|
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
+RSpec::Core::RakeTask.new(:doc) do |t|
+ t.rspec_opts = ["--format", "specdoc", "--dry-run"]
t.pattern = "./spec/*_spec.rb"
end
desc "Run all examples with RCov"
-Spec::Rake::SpecTask.new('rcov') do |t|
+RSpec::Core::RakeTask.new('rcov') do |t|
t.pattern = "./spec/*_spec.rb"
t.rcov = true
t.rcov_opts = ['--exclude', 'examples']

0 comments on commit 7aa2601

Please sign in to comment.