Removes Bacon and Mocha
Reasoning explained in this comment: https://github.com/pry/pry/issues/277#issuecomment-51708712
Mostly this went smoothly. There were a few errors that I fixed along
the way, e.g. tests that were failing but for various reasons still
passed. Should have documented them, but didn't think about it until
very near the end. But generaly, I remember 2 reasons this would happen:
`lambda { raise "omg" }.should.raise(RuntimeError, /not-omg/)` will pass
because the second argument is ignored by Bacon. And `1.should == 2`
will return false instead of raising an error when it is not in an it
block (e.g. if stuck in a describe block, that would just return false)
The only one that I felt unsure about was spec/helpers/table_spec.rb
`Pry::Helpers.tablify_or_one_line('head', %w(ing)).should == 'head: ing'`
This is wrong, but was not failing because it was in a describe block
instead of an it block. In reality, it returns `"head: ing\n"`,
I updated the test to reflect this, though I don't know for sure
this is the right thing to do
This will fail on master until https://github.com/pry/pry/pull/1281 is merged.
This makes https://github.com/pry/pry/pull/1278 unnecessary.
change 2nd argument of Pry.view_clip() to accept a Hash of options
with two keys: max_length (default 60) and id (default false)
the custom prompt proc's in lib/pry.rb clip the object shown to
look better visually. this change still supports that behavior but
also adds the option to include a hex representation of the object's
ID by including id: true.
@rf- suggested supporting both (with & without id) to be able to
keep printer proc's pretty but also support other code that's okay
with printing inspects that are hex-y, like the Pry::CLIPPED_PRINT.
also changes Pry::CLIPPED_PRINT to print return values with a hex
ID included since it is a bit different from prompt proc's.
Fix issue #885 (Add an API for extending Pry.view_clip)
[1] pry(main)> class Barbie
| def inspect
| 'You can brush my hair, undress me everywhere!'
| end
| end
=> nil
[2] pry(main)>
[3] pry(main)> Pry.config.prompt_safe_objects << Barbie
=> [String, Numeric, Symbol, nil, true, false, Barbie]
[4] pry(main)> cd Barbie.new
[5] pry(You can brush my hair, undress me everywhere!):1>
Many plugins only define a puts method on the output object. This change
removse the ability to customize the formatter used when outputting
variables in `ls`. We should reconsider the best way to do this.
* removed most historicla junk from lib/pry/test/helper.rb
* relocated recalcitrant junk to the local spec/helper.rb (this isn't exposed to 3rd parties)