Skip to content

Commit

Permalink
* allow to use this template with jruby with newer rails versions as …
Browse files Browse the repository at this point in the history
…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
mkristian committed Nov 28, 2011
1 parent c071ba3 commit 5705632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/rails/database.yml.rb
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
4 changes: 2 additions & 2 deletions templates/rails/gemfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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'
Expand Down

0 comments on commit 5705632

Please sign in to comment.