Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Remove the need for a Gemfile.local
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
snusnu committed Nov 25, 2010
1 parent d41c09c commit a591738
Showing 1 changed file with 15 additions and 81 deletions.
96 changes: 15 additions & 81 deletions Gemfile
@@ -1,100 +1,34 @@
# 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 datamapper gems from local paths. This means that you can use
# the same environment variables, like ADAPTER(S) or PLUGIN(S) 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.
# In order to create a local Gemfile, all you need to do is run:
#
# bundle exec rake local_gemfile
#
# This 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
#
# You can also specify which adapter(s) should be part of the bundle by setting
# an environment variable. This of course also works when using the Gemfile.local
#
# bundle foo # dm-sqlite-adapter
# ADAPTER=mysql bundle foo # dm-mysql-adapter
# ADAPTERS=sqlite,mysql bundle foo # dm-sqlite-adapter and dm-mysql-adapter
#
# Of course you can also use the ADAPTER(S) variable when using the Gemfile.local
# and running specs against selected adapters.
#
# For easily working with adapters supported on your machine, it's recommended
# that you first install all adapters that you are planning to use or work on
# by doing something like
#
# ADAPTERS=sqlite,mysql,postgres bundle install
#
# This will clone the various repositories and make them available to bundler.
# Once you have them installed you can easily switch between adapters for the
# various development tasks. Running something like
#
# ADAPTER=mysql bundle exec rake spec
#
# will make sure that the dm-mysql-adapter is part of the bundle, and will be used
# when running the specs.
#
# You can also specify which plugin(s) should be part of the bundle by setting
# an environment variable. This also works when using the Gemfile.local
#
# bundle foo # dm-migrations
# PLUGINS=dm-validations bundle foo # dm-migrations and dm-validations
# PLUGINS=dm-validations,dm-types bundle foo # dm-migrations, dm-validations and dm-types
#
# Of course you can combine the PLUGIN(S) and ADAPTER(S) env vars to run specs
# for certain adapter/plugin combinations.
#
# Finally, to speed up running specs and other 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)

if ENV['EXTLIB']
gem 'extlib', '~> 0.9.15', :git => "#{DATAMAPPER}/extlib.git"
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

gem 'dm-core', DM_VERSION, :git => "#{DATAMAPPER}/dm-core.git"
gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
gem 'fastercsv', '~> 1.5.3'
gem 'json_pure', '~> 1.4.3'

end

group(:development) do # Development dependencies (as in the gemspec)

gem 'dm-validations', DM_VERSION, :git => "#{DATAMAPPER}/dm-validations.git"
gem 'dm-validations', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-validations#{REPO_POSTFIX}"
gem 'nokogiri', '~> 1.4.1'

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

Expand All @@ -116,7 +50,7 @@ group :datamapper do # We need this because we want to pin these dependencies to

if (do_adapters = DM_DO_ADAPTERS & adapters).any?
options = {}
options[:git] = "#{DATAMAPPER}/do.git" if ENV['DO_GIT'] == 'true'
options[:git] = "#{DATAMAPPER}/do#{REPO_POSTFIX}" if ENV['DO_GIT'] == 'true'

gem 'data_objects', DO_VERSION, options.dup

Expand All @@ -125,18 +59,18 @@ group :datamapper do # We need this because we want to pin these dependencies to
gem "do_#{adapter}", DO_VERSION, options.dup
end

gem 'dm-do-adapter', DM_VERSION, :git => "#{DATAMAPPER}/dm-do-adapter.git"
gem 'dm-do-adapter', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-do-adapter#{REPO_POSTFIX}"
end

adapters.each do |adapter|
gem "dm-#{adapter}-adapter", DM_VERSION, :git => "#{DATAMAPPER}/dm-#{adapter}-adapter.git"
gem "dm-#{adapter}-adapter", DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-#{adapter}-adapter#{REPO_POSTFIX}"
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

0 comments on commit a591738

Please sign in to comment.