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