chore: properly set up PRY Ruby console

This commit is contained in:
David Bailey 2023-05-18 14:07:54 +02:00
parent 30eab9065e
commit 2a20ba8b76
3 changed files with 15 additions and 5 deletions

View file

@ -7,9 +7,11 @@ require "timeseries/hoarder"
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start
$pg = PG.connect('user=postgres dbname=tshoard_test')
$pg.exec("DROP TABLE IF EXISTS ts_hoarder.test CASCADE")
require "irb"
IRB.start(__FILE__)
$db = Timeseries::Hoarder::Database.new($pg)
# (If you use this, don't forget to add pry to your Gemfile!)
require "pry"
Pry.start