Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Be more specific about database gem versions

  • Loading branch information...
commit 23319b432ff8636a38c6c2065b203ec934cee927 1 parent acb0c77
@mjankowski mjankowski authored
View
44 Appraisals
@@ -1,22 +1,34 @@
-rails_versions = ['3.0.17', '3.1.8', '3.2.8']
-database_drivers = ['mysql', 'pg', 'sqlite3']
+rails_versions = {
+ '3.0.17' => {
+ 'mysql' => '2.8.1',
+ 'mysql2' => '0.2.18',
+ 'pg' => nil,
+ 'sqlite3' => nil
+ },
+ '3.1.8' => {
+ 'mysql' => '2.8.1',
+ 'mysql2' => '0.3.11',
+ 'pg' => nil,
+ 'sqlite3' => nil
+ },
+ '3.2.8' => {
+ 'mysql' => '2.8.1',
+ 'mysql2' => '0.3.11',
+ 'pg' => nil,
+ 'sqlite3' => nil
+ }
+}
-rails_versions.each do |rails_version|
- database_drivers.each do |database_driver|
- appraise "rails-#{rails_version}-database-#{database_driver}" do
+rails_versions.keys.each do |rails_version|
+ rails_versions[rails_version].keys.each do |database_driver|
+ appraise "rails_#{rails_version}_database_#{database_driver}" do
gem 'rails', rails_version
- gem database_driver
+ if rails_versions[rails_version][database_driver].nil?
+ gem database_driver
+ else
+ gem database_driver, rails_versions[rails_version][database_driver]
+ end
gem 'pacecar', :path => '../'
end
end
end
-
-# The mysql2 gem needed by Rails changes with Rails versions
-rails_to_mysql2_mappings = { '3.2.8' => '0.3.11', '3.1.8' => '0.3.11', '3.0.17' => '0.2.18' }
-rails_to_mysql2_mappings.each do |rails_gem_version, mysql2_gem_version|
- appraise "rails-#{rails_gem_version}-database-mysql2" do
- gem 'rails', rails_gem_version
- gem 'mysql2', mysql2_gem_version
- gem 'pacecar', :path => '../'
- end
-end
View
2  gemfiles/rails_3.0.17_database_mysql.gemfile
@@ -3,7 +3,7 @@
source "http://rubygems.org"
gem "rails", "3.0.17"
-gem "mysql"
+gem "mysql", "2.8.1"
gem "pacecar", :path=>"../"
gemspec :path=>"../"
View
2  gemfiles/rails_3.1.8_database_mysql.gemfile
@@ -3,7 +3,7 @@
source "http://rubygems.org"
gem "rails", "3.1.8"
-gem "mysql"
+gem "mysql", "2.8.1"
gem "pacecar", :path=>"../"
gemspec :path=>"../"
View
2  gemfiles/rails_3.2.8_database_mysql.gemfile
@@ -3,7 +3,7 @@
source "http://rubygems.org"
gem "rails", "3.2.8"
-gem "mysql"
+gem "mysql", "2.8.1"
gem "pacecar", :path=>"../"
gemspec :path=>"../"
Please sign in to comment.
Something went wrong with that request. Please try again.