Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions recipes/database.rb
Original file line number Diff line number Diff line change
@@ -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