diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-03-27 19:37:18 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-03-27 19:37:18 -0300 |
commit | b023bcf71b685c0088b2b1f79bc52e8797ce3538 (patch) | |
tree | 7e0eeb223d12e135516d768bb742610998e24f34 /railties | |
parent | 0e1fed537a7699a7ded02f77b71d222d7207c5ad (diff) | |
download | rails-b023bcf71b685c0088b2b1f79bc52e8797ce3538.tar.gz rails-b023bcf71b685c0088b2b1f79bc52e8797ce3538.tar.bz2 rails-b023bcf71b685c0088b2b1f79bc52e8797ce3538.zip |
Make edge and dev options use edge mysql2
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index ab7ed4eb9e..7c9494e46d 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -112,7 +112,15 @@ module Rails end def database_gemfile_entry - options[:skip_active_record] ? "" : "gem '#{gem_for_database}'" + entry = options[:skip_active_record] ? "" : "gem '#{gem_for_database}'" + if options[:database] == 'mysql' + if options.dev? || options.edge? + entry += ", :git => 'git://github.com/brianmario/mysql2.git'" + else + entry += "\n# gem 'mysql2', :git => 'git://github.com/brianmario/mysql2.git'" + end + end + entry end def rails_gemfile_entry @@ -120,22 +128,22 @@ module Rails <<-GEMFILE gem 'rails', :path => '#{Rails::Generators::RAILS_DEV_PATH}' gem 'arel', :git => 'git://github.com/rails/arel.git' -gem "rack", :git => "git://github.com/rack/rack.git" +gem 'rack', :git => 'git://github.com/rack/rack.git' GEMFILE elsif options.edge? <<-GEMFILE gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'arel', :git => 'git://github.com/rails/arel.git' -gem "rack", :git => "git://github.com/rack/rack.git" +gem 'rack', :git => 'git://github.com/rack/rack.git' GEMFILE else <<-GEMFILE gem 'rails', '#{Rails::VERSION::STRING}' # Bundle edge Rails instead: -# gem 'rails', :git => 'git://github.com/rails/rails.git' -# gem 'arel', :git => 'git://github.com/rails/arel.git' -# gem "rack", :git => "git://github.com/rack/rack.git" +# gem 'rails', :git => 'git://github.com/rails/rails.git' +# gem 'arel', :git => 'git://github.com/rails/arel.git' +# gem 'rack', :git => 'git://github.com/rack/rack.git' GEMFILE end end |