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,6 +7,8 @@ gemspec
gem "rake", "~> 13.0"
gem "pry"
gem "debug", "~> 1.0"
gem "solargraph", "~> 0.48"

View file

@ -11,6 +11,7 @@ GEM
ast (2.4.2)
backport (1.2.0)
benchmark (0.2.1)
coderay (1.1.3)
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
@ -26,12 +27,16 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
method_source (1.0.0)
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
parser (3.2.2.0)
ast (~> 2.4.1)
pg (1.5.3)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.6.2)
rainbow (3.1.1)
rake (13.0.6)
@ -81,6 +86,7 @@ PLATFORMS
DEPENDENCIES
debug (~> 1.0)
pry
rake (~> 13.0)
rubocop (~> 1.21)
solargraph (~> 0.48)

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