Permalink
Browse files

Refactor Gemfile so that Jeweler creates a nice gemspec.

  • Loading branch information...
1 parent 01f65be commit 250508c71e07a55a8d50c3db5f46245583255b29 Greg Spurrier committed Nov 19, 2010
Showing with 25 additions and 24 deletions.
  1. +13 −12 Gemfile
  2. +1 −1 Gemfile.lock
  3. +7 −7 features/support/env.rb
  4. +4 −4 spec/spec_helper.rb
View
25 Gemfile
@@ -1,20 +1,21 @@
source 'http://rubygems.org'
-if ENV['AR_VERSION'] == '2.3'
- gem 'activerecord', '~> 2.3.8'
-else
- gem 'activerecord', '~> 3.0.3'
+gem 'activerecord', '>= 2.3.8', :require => 'active_record'
+
+group :meta_where do
gem 'meta_where'
end
-gem 'rspec', '~> 2.1.0'
-gem 'cucumber', '~> 0.9.3'
+group :test do
+ gem 'rspec', '~> 2.1.0'
+ gem 'cucumber', '~> 0.9.3'
-platforms :ruby do
- gem 'sqlite3-ruby', :require => 'sqlite3'
-end
+ platforms :ruby do
+ gem 'sqlite3-ruby', :require => 'sqlite3'
+ end
-platforms :jruby do
- gem 'jdbc-sqlite3'
- gem 'activerecord-jdbcsqlite3-adapter', '~> 0.9.7'
+ platforms :jruby do
+ gem 'jdbc-sqlite3'
+ gem 'activerecord-jdbcsqlite3-adapter', '~> 0.9.7'
+ end
end
View
@@ -45,7 +45,7 @@ PLATFORMS
ruby
DEPENDENCIES
- activerecord (~> 3.0.3)
+ activerecord (>= 2.3.8)
activerecord-jdbcsqlite3-adapter (~> 0.9.7)
cucumber (~> 0.9.3)
jdbc-sqlite3
View
@@ -1,20 +1,20 @@
$LOAD_PATH << File.expand_path('../../../lib', __FILE__)
-ENV['AR_VERSION'] ||= '3.0'
-
require 'rubygems'
-require 'bundler/setup'
-require 'has_enumeration'
+require 'bundler'
+Bundler.require(:default, :test)
-if ENV['AR_VERSION'] == '3.0'
- require 'meta_where'
-end
+require 'has_enumeration'
ActiveRecord::Base.establish_connection(
:adapter => defined?(JRUBY_VERSION) ? 'jdbcsqlite3': 'sqlite3',
:database => File.expand_path('../database', __FILE__)
)
+if ActiveRecord::VERSION::MAJOR >= 3
+ Bundler.require(:meta_where)
+end
+
class CreateTables < ActiveRecord::Migration
create_table :explicitly_mapped_models, :force => true do |t|
t.integer :color
View
@@ -1,7 +1,7 @@
-ENV['AR_VERSION'] ||= '3.0'
-
require 'rubygems'
-require 'bundler/setup'
+require 'bundler'
+Bundler.require(:default, :test)
+
require 'rspec'
require File.expand_path('../lib/has_enumeration', File.dirname(__FILE__))
@@ -13,7 +13,7 @@
)
if ActiveRecord::VERSION::MAJOR >= 3
- require 'meta_where'
+ Bundler.require(:meta_where)
end
class CreateTables < ActiveRecord::Migration

0 comments on commit 250508c

Please sign in to comment.