From e26f838f63063cce8126c4e34b223793dc98b1fb Mon Sep 17 00:00:00 2001 From: snusnu Date: Thu, 25 Nov 2010 13:53:12 +0100 Subject: [PATCH] Remove the need for a Gemfile.local * Use the latest activesupport gem instead of git * Use the rspec-1.3.1 gem instead of my fork * Use jeweler ~> 1.4.0 to prevent 1.5.1 for now * Use github http clone URLs --- Gemfile | 54 ++++++++++++------------------------------------------ 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/Gemfile b/Gemfile index 57b4998..ba0f01a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,71 +1,41 @@ -# If you're working on more than one datamapper gem at a time, then it's -# recommended to create a local Gemfile and use this instead of the git -# sources. This will make sure that you are developing against your -# other local datamapper sources that you currently work on. Gemfile.local -# will behave identically to the standard Gemfile apart from the fact that -# it fetches the gems from local paths. This means that you can use the -# same environment variables, like ADAPTER when running bundle commands. -# Gemfile.local is added to .gitignore, so you don't need to worry about -# accidentally checking local development paths into git. -# -# bundle exec rake local_gemfile -# -# will give you a Gemfile.local file that points to your local clones of -# the various datamapper gems. It's assumed that all datamapper repo clones -# reside in the same directory. You can use the Gemfile.local like so for -# running any bundle command: -# -# BUNDLE_GEMFILE=Gemfile.local bundle foo -# -# To speed up running bundle tasks, it's recommended to run -# -# bundle lock -# -# after running 'bundle install' for the first time. This will make 'bundle exec' run -# a lot faster compared to the unlocked version. With an unlocked bundle you would -# typically just run 'bundle install' from time to time to fetch the latest sources from -# upstream. When you locked your bundle, you need to run -# -# bundle install --relock -# -# to make sure to fetch the latest updates and then lock the bundle again. Gemfile.lock -# is added to the .gitignore file, so you don't need to worry about accidentally checking -# it into version control. +require 'pathname' source 'http://rubygems.org' -DATAMAPPER = 'git://github.com/datamapper' -DM_VERSION = '~> 1.0.2' +SOURCE = ENV['SOURCE'] ? ENV['SOURCE'].to_sym : :git +REPO_POSTFIX = SOURCE == :path ? '' : '.git' +DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper' +DM_VERSION = '~> 1.0.2' group :runtime do # Runtime dependencies (as in the gemspec) - gem 'dm-core', DM_VERSION, :git => "#{DATAMAPPER}/dm-core.git" + gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}" end group(:development) do # Development dependencies (as in the gemspec) - gem 'dm-migrations', DM_VERSION, :git => "#{DATAMAPPER}/dm-migrations.git" + gem 'dm-migrations', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-migrations#{REPO_POSTFIX}" gem 'rake', '~> 0.8.7' - gem 'rspec', '~> 1.3', :git => 'git://github.com/snusnu/rspec', :branch => 'heckle_fix_plus_gemfile' - gem 'jeweler', '~> 1.4' + gem 'rspec', '~> 1.3.1' + gem 'jeweler', '~> 1.4.0' end group :datamapper do # We need this because we want to pin these dependencies to their git master sources if ENV['EXTLIB'] - gem 'extlib', '~> 0.9.15', :git => "#{DATAMAPPER}/extlib.git", :require => nil + gem 'extlib', '~> 0.9.15', SOURCE => "#{DATAMAPPER}/extlib#{REPO_POSTFIX}", :require => nil else - gem 'activesupport', '~> 3.0.0', :git => 'git://github.com/rails/rails.git', :branch => '3-0-stable', :require => nil + gem 'activesupport', '~> 3.0.3', :require => nil end plugins = ENV['PLUGINS'] || ENV['PLUGIN'] plugins = plugins.to_s.tr(',', ' ').split.push('dm-migrations').uniq plugins.each do |plugin| - gem plugin, DM_VERSION, :git => "#{DATAMAPPER}/#{plugin}.git" + gem plugin, DM_VERSION, SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}" end end