From a26124d39b8db9b3908bdbb953b4850c2022d8eb Mon Sep 17 00:00:00 2001 From: Juan Artero Date: Thu, 7 Nov 2019 09:05:18 +0100 Subject: [PATCH] Set PostgreSQL as default database We always use PostgreSQL in our projects, make sense that this was the default database --- recipes/database.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/database.rb b/recipes/database.rb index e71d3e4..76d074e 100644 --- a/recipes/database.rb +++ b/recipes/database.rb @@ -1,22 +1,24 @@ +# frozen_string_literal: true + module Recipes class Database < Base - is_auto_runnable def gems case @template.options.database when 'postgresql' - @template.gem 'pg', '~> 0.18' + @template.gem 'pg' when 'mysql' @template.gem 'mysql2', '>= 0.3.18' - else + when 'sqlite3' @template.gem 'sqlite3' + else + @template.gem 'pg' end end def cook @template.rake 'db:create' end - end end