Permalink
Browse files

* allow to use this template with jruby with newer rails versions as …

…well

* since 'bundle install' runs at the end of the rails template then it install the rails version with which the application got generated
  • Loading branch information...
1 parent c071ba3 commit 5705632955dd20cf9c74149a62aad466af0de0fc @mkristian committed Nov 28, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 templates/rails/database.yml.rb
  2. +2 −2 templates/rails/gemfile.rb
@@ -1,7 +1,7 @@
# TODO think about a better way
db_name = app_path.split('/').last
-database = options[:database]
+database = options[:database].sub(/jdbc/, '')
database = 'postgres' if database == 'postgresql'
database = 'sqlite' if database == 'sqlite3'
@@ -3,7 +3,7 @@
DATAMAPPER = '#{DATAMAPPER}'
RSPEC = '#{RSPEC}'
-database = options[:database]
+database = options[:database].sub(/jdbc/, '')
database = 'postgres' if database == 'postgresql'
database = 'sqlite' if database == 'sqlite3'
@@ -12,7 +12,7 @@
<<-GEMFILE
source 'http://rubygems.org'
-RAILS_VERSION = '~> 3.1.1'
+RAILS_VERSION = '#{Rails::VERSION::STRING}'
DM_VERSION = '~> 1.2.0'
gem 'activesupport', RAILS_VERSION, :require => 'active_support'

0 comments on commit 5705632

Please sign in to comment.