Add a simple `lotus console` command

`lotus console` will spawn an IRB (or Pry, if bundled) session that
loads the application code. This is a very basic analogue to `rails
console` and would be nice for testing out code ideas or modifying the
database.

Signed-off-by: David Celis <me@davidcel.is>
Have you tried with `Object.send(:remove_const, :Pry)`?


On Thu, Jul 3, 2014 at 4:23 PM, David Celis <notifications@github.com>
wrote:

> In test/commands_console_test.rb:
>
> > +  let(:opts) { Hash.new }
> > +
> > +  before do
> > +    @console = Lotus::Commands::Console.new(opts)
> > +  end
> > +
> > +  describe '#options' do
> > +    it 'merges in default values' do
> > +      @console.options[:config].must_equal 'config.ru'
> > +    end
> > +  end
> > +
> > +  describe '#start' do
> > +    before do
> > +      @rack_builder = Minitest::Mock.new
> > +      @rack_builder.expect(:parse_file, true, ['config.ru'])
>
> I can do that; but it will end up preventing the IRB case, since require
> 'pry' won't end up triggering the LoadError. But perhaps it's better to
> test the Pry case and assume IRB is going to keep working like expected
> (which I'd agree with)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lotus/lotus/pull/37/files#r14515984>.
>