Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding a script, `prerelease`, to test against various versions of Ru…

…by and AR.

Ripped off from the active_hash project. (Nods to Jeff Dean.)
  • Loading branch information...
commit cfecf342906046633680a19520925cecefc1ec88 1 parent 18bb0ec
@flavorjones flavorjones authored
View
1  .gitignore
@@ -1,3 +1,2 @@
-Gemfile
Gemfile*.lock
.bundle
View
20 Gemfile
@@ -0,0 +1,20 @@
+source :gemcutter
+
+activerecord_version = ENV['ACTS_AS_FU_ACTIVERECORD_VERSION']
+
+if activerecord_version == "edge"
+ git "https://github.com/rails/rails.git" do
+ gem "activerecord"
+ gem "activesupport"
+ end
+elsif activerecord_version && activerecord_version.strip != ""
+ gem "activerecord", activerecord_version
+else
+ gem "activerecord"
+end
+
+gem "sqlite3-ruby"
+
+group :development do
+ gem "rspec", "~>1"
+end
View
8 Gemfile-2.2
@@ -1,8 +0,0 @@
-source :gemcutter
-
-gem "activerecord", "2.2.3"
-gem "sqlite3-ruby"
-
-group :development do
- gem "rspec", "~>1"
-end
View
8 Gemfile-2.3
@@ -1,8 +0,0 @@
-source :gemcutter
-
-gem "activerecord", "2.3.8"
-gem "sqlite3-ruby"
-
-group :development do
- gem "rspec", "~>1"
-end
View
8 Gemfile-3.0
@@ -1,8 +0,0 @@
-source :gemcutter
-
-gem "activerecord", "3.0.0"
-gem "sqlite3-ruby"
-
-group :development do
- gem "rspec", "~>1"
-end
View
8 Gemfile-3.1
@@ -1,8 +0,0 @@
-source :gemcutter
-
-gem "activerecord", "3.1.0"
-gem "sqlite3-ruby"
-
-group :development do
- gem "rspec", "~>1"
-end
View
31 prerelease
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+# Load RVM into a shell session *as a function*
+if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
+ # First try to load from a user install
+ source "$HOME/.rvm/scripts/rvm"
+elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
+ # Then try to load from a root install
+ source "/usr/local/rvm/scripts/rvm"
+else
+ printf "ERROR: An RVM installation was not found.\n"
+fi
+
+set -e
+
+function run {
+ gem list --local bundler | grep bundler || gem install bundler --no-ri --no-rdoc
+
+ for v in 2.3.11 3.0.10 3.1.0 "" ; do
+ ACTS_AS_FU_ACTIVERECORD_VERSION=${v} bundle --quiet update --local activerecord || ACTS_AS_FU_ACTIVERECORD_VERSION=${v} bundle --quiet update activerecord
+ echo "Running $(ruby -v) against $(basename $(bundle show activerecord)) ..."
+ bundle exec spec spec
+ done
+}
+
+for v in ruby-1.8.7 ree-1.8.7 ruby-1.9.2 ; do
+ rvm use ${v}@acts_as_fu --create
+ run
+done
+
+echo 'Success!'
Please sign in to comment.
Something went wrong with that request. Please try again.