Permalink
Browse files

Add bundler for easier development setup

Add support to switch between rails versions in dev

Usage:
  bundle install                    # Initial bundle command to build Gemfile.lock
  RAILS_2=true bundle update rails  # Updates gemfile to run agains rails 2
  RAILS_2=true rake                 # Run tests against rails 2
  bundle update rails               # Updates gemfile to run agains rails 3
  rake                              # Run tests against rails 3
  • Loading branch information...
1 parent 1aecc63 commit 249dba1f517d9902c98f95a364c996428159500d @lardawge lardawge committed with justinfrench Nov 17, 2010
Showing with 13 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +3 −0 Gemfile
  3. +6 −1 formtastic.gemspec
  4. +3 −0 spec/spec_helper.rb
View
@@ -7,3 +7,4 @@ pkg
log/*
.rvmrc
.bundle
+Gemfile.lock
View
@@ -0,0 +1,3 @@
+source :rubygems
+
+gemspec
View
@@ -38,7 +38,12 @@ Gem::Specification.new do |s|
s.add_dependency(%q<activesupport>, [">= 2.3.7"])
s.add_dependency(%q<actionpack>, [">= 2.3.7"])
s.add_dependency(%q<i18n>, [">= 0.4.0"])
- s.add_development_dependency(%q<rails>, [">= 3.0.0"])
+
+ if ENV['RAILS_2']
+ s.add_development_dependency(%q<rails>, ["~> 2.3.8"])
+ else
+ s.add_development_dependency(%q<rails>, [">= 3.0.0"])
+ end
s.add_development_dependency(%q<rspec-rails>, ["~> 2.0.0"])
s.add_development_dependency(%q<rspec_tag_matchers>, [">= 1.0.0"])
s.add_development_dependency(%q<hpricot>, ["~> 0.8.3"])
View
@@ -1,5 +1,8 @@
# encoding: utf-8
require 'rubygems'
+require 'bundler'
+Bundler.setup
+
require 'active_support'
require 'action_pack'
require 'action_view'

0 comments on commit 249dba1

Please sign in to comment.