From d61ab78202c49bc3f7b6815e81ff2eb904ba1920 Mon Sep 17 00:00:00 2001 From: Piotr Solnica Date: Mon, 23 Nov 2020 18:56:38 +0100 Subject: [PATCH] Fix bin/console --- bin/console | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/console b/bin/console index dd6128a..06d8dfa 100755 --- a/bin/console +++ b/bin/console @@ -2,9 +2,11 @@ # frozen_string_literal: true -require "pry" require "bundler/setup" -require "dry-validation" + +require "pry" +require "dry/validation" +require "dry/types" module Types include Dry::Types() @@ -28,4 +30,8 @@ class Context end end -Pry.start(Context.new, prompt: [proc { "dry-validation> " }, proc { "dry-validation*> " }]) +prompt = Pry::Prompt.new( + :dry_validation, "dry-validation", [proc { "dry-validation> " }, proc { "dry-validation*> " }] +) + +Pry.start(Context.new, prompt: prompt)