Permalink
Browse files

use "pg" gem on 1.9

  • Loading branch information...
1 parent d788ed5 commit db54baab4c9fbc4287b2b6c3b618839e94ef6a0c @mislav committed Jul 29, 2011
View
6 Gemfile
@@ -9,4 +9,8 @@ gem 'rake', '~> 0.8.7'
gem 'mocha'
gem 'sqlite3-ruby', '1.3.1'
gem 'mysql', :group => :mysql
-gem 'postgres', :group => :pg
+
+group :pg do
+ gem 'postgres', :platforms => :ruby_18
+ gem 'pg', :platforms => :ruby_19
+end
View
2 Gemfile.lock
@@ -9,6 +9,7 @@ GEM
activesupport (2.3.12)
mocha (0.9.12)
mysql (2.8.1)
+ pg (0.11.0)
postgres (0.7.9.2008.01.28)
rack (1.1.2)
rake (0.8.7)
@@ -22,6 +23,7 @@ DEPENDENCIES
activerecord (~> 2.3.6)
mocha
mysql
+ pg
postgres
rake (~> 0.8.7)
sqlite3-ruby (= 1.3.1)
View
7 test/ci.rb
@@ -17,22 +17,25 @@ def rails_version(gemfile)
end
gemfiles = ['Gemfile']
-gemfiles.concat Dir['test/gemfiles/*'].reject { |f| f.include? '.lock' }
+gemfiles.concat Dir['test/gemfiles/*'].reject { |f| f.include? '.lock' }.sort.reverse
ruby19 = RUBY_VERSION > '1.9'
ruby19_gemfiles = gemfiles.first
bundler_options = ENV['TRAVIS'] ? '--path vendor/bundle' : ''
+failed = false
+
gemfiles.each do |gemfile|
next if ruby19 and !ruby19_gemfiles.include? gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
if system %(bundle install #{bundler_options})
for db in databases
announce "Rails #{rails_version(gemfile)}", "with #{db}"
ENV['DB'] = db
- system %(bundle exec rake)
+ failed = true unless system %(bundle exec rake)
end
end
end
+exit 1 if failed
View
6 test/gemfiles/Gemfile.1.2
@@ -6,4 +6,8 @@ gem 'rake', '~> 0.8.7'
gem 'mocha'
gem 'sqlite3-ruby', '1.3.1'
gem 'mysql', :group => :mysql
-gem 'postgres', :group => :pg
+
+group :pg do
+ gem 'postgres', :platforms => :ruby_18
+ gem 'pg', :platforms => :ruby_19
+end
View
2 test/gemfiles/Gemfile.1.2.lock
@@ -13,6 +13,7 @@ GEM
activesupport (1.4.4)
mocha (0.9.12)
mysql (2.8.1)
+ pg (0.11.0)
postgres (0.7.9.2008.01.28)
rails (1.2.6)
actionmailer (= 1.3.6)
@@ -30,6 +31,7 @@ PLATFORMS
DEPENDENCIES
mocha
mysql
+ pg
postgres
rails (~> 1.2.6)
rake (~> 0.8.7)
View
6 test/gemfiles/Gemfile.2.0
@@ -9,4 +9,8 @@ gem 'rake', '~> 0.8.7'
gem 'mocha'
gem 'sqlite3-ruby', '1.3.1'
gem 'mysql', :group => :mysql
-gem 'postgres', :group => :pg
+
+group :pg do
+ gem 'postgres', :platforms => :ruby_18
+ gem 'pg', :platforms => :ruby_19
+end
View
2 test/gemfiles/Gemfile.2.0.lock
@@ -8,6 +8,7 @@ GEM
activesupport (2.0.5)
mocha (0.9.12)
mysql (2.8.1)
+ pg (0.11.0)
postgres (0.7.9.2008.01.28)
rake (0.8.7)
sqlite3-ruby (1.3.1)
@@ -20,6 +21,7 @@ DEPENDENCIES
activerecord (~> 2.0.4)
mocha
mysql
+ pg
postgres
rake (~> 0.8.7)
sqlite3-ruby (= 1.3.1)
View
6 test/gemfiles/Gemfile.2.1
@@ -9,4 +9,8 @@ gem 'rake', '~> 0.8.7'
gem 'mocha'
gem 'sqlite3-ruby', '1.3.1'
gem 'mysql', :group => :mysql
-gem 'postgres', :group => :pg
+
+group :pg do
+ gem 'postgres', :platforms => :ruby_18
+ gem 'pg', :platforms => :ruby_19
+end
View
2 test/gemfiles/Gemfile.2.1.lock
@@ -8,6 +8,7 @@ GEM
activesupport (2.1.2)
mocha (0.9.12)
mysql (2.8.1)
+ pg (0.11.0)
postgres (0.7.9.2008.01.28)
rake (0.8.7)
sqlite3-ruby (1.3.1)
@@ -20,6 +21,7 @@ DEPENDENCIES
activerecord (~> 2.1.0)
mocha
mysql
+ pg
postgres
rake (~> 0.8.7)
sqlite3-ruby (= 1.3.1)
View
6 test/gemfiles/Gemfile.2.2
@@ -9,4 +9,8 @@ gem 'rake', '~> 0.8.7'
gem 'mocha'
gem 'sqlite3-ruby', '1.3.1'
gem 'mysql', :group => :mysql
-gem 'postgres', :group => :pg
+
+group :pg do
+ gem 'postgres', :platforms => :ruby_18
+ gem 'pg', :platforms => :ruby_19
+end
View
2 test/gemfiles/Gemfile.2.2.lock
@@ -8,6 +8,7 @@ GEM
activesupport (2.2.3)
mocha (0.9.12)
mysql (2.8.1)
+ pg (0.11.0)
postgres (0.7.9.2008.01.28)
rake (0.8.7)
sqlite3-ruby (1.3.1)
@@ -20,6 +21,7 @@ DEPENDENCIES
activerecord (~> 2.2.2)
mocha
mysql
+ pg
postgres
rake (~> 0.8.7)
sqlite3-ruby (= 1.3.1)

0 comments on commit db54baa

Please sign in to comment.