Skip to content

Commit

Permalink
Add mysql gem version string for activerecord not to install gem newe…
Browse files Browse the repository at this point in the history
…r than 2.8

- this fix will be reverted when Rails 4 released
  • Loading branch information
udzura committed Jan 8, 2013
1 parent 5ecf1db commit 92ec3bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -100,7 +100,7 @@ def setup_orm
ar.gsub! /!DB_DEVELOPMENT!/, MYSQL.gsub(/!DB_NAME!/,"'#{db}_development'")
ar.gsub! /!DB_PRODUCTION!/, MYSQL.gsub(/!DB_NAME!/,"'#{db}_production'")
ar.gsub! /!DB_TEST!/, MYSQL.gsub(/!DB_NAME!/,"'#{db}_test'")
require_dependencies 'mysql'
require_dependencies 'mysql', :version => "~> 2.8"
when 'mysql2'
ar.gsub! /!DB_DEVELOPMENT!/, MYSQL2.gsub(/!DB_NAME!/,"'#{db}_development'")
ar.gsub! /!DB_PRODUCTION!/, MYSQL2.gsub(/!DB_NAME!/,"'#{db}_production'")
Expand Down
2 changes: 1 addition & 1 deletion padrino-gen/test/test_project_generator.rb
Expand Up @@ -218,7 +218,7 @@ def teardown

should "properly generate mysql" do
out, err = capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--orm=activerecord','--adapter=mysql') }
assert_match_in_file(/gem 'mysql'/, "#{@apptmp}/sample_project/Gemfile")
assert_match_in_file(/gem 'mysql', '~> 2.8'/, "#{@apptmp}/sample_project/Gemfile")
assert_match_in_file(/sample_project_development/, "#{@apptmp}/sample_project/config/database.rb")
assert_match_in_file(%r{:adapter => 'mysql'}, "#{@apptmp}/sample_project/config/database.rb")
end
Expand Down

0 comments on commit 92ec3bf

Please sign in to comment.