diff --git a/Gemfile b/Gemfile index 4540f12..fc09e1c 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,8 @@ gemspec gem "rake", "~> 13.0" +gem "pry" + gem "debug", "~> 1.0" gem "solargraph", "~> 0.48" diff --git a/Gemfile.lock b/Gemfile.lock index a1b9bf8..7da520e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/bin/console b/bin/console index b426583..900ae5d 100755 --- a/bin/console +++ b/bin/console @@ -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