1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

17 commits

Author SHA1 Message Date
John Mair
31a9578228 cleaned up lib/pry/test/helper.rb
* 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)
2012-12-07 21:41:05 +01:00
☈king
8f92f5a855 Use Jist.copy, not a Helper; fix @filename 2012-12-07 08:35:25 -06:00
☈king
c51f75a9fc DRY gist command's docs vs tests 2012-12-06 23:14:04 -06:00
☈king
27bbc4383a gist: fix filenames from REPL + refactor + test
I glommed together too much on this commit. ☹
2012-12-06 22:46:01 -06:00
Kyrylo Silin
9b85398d29 Remove some repetitive bits from play_spec.rb
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-12-01 05:49:27 +02:00
Kyrylo Silin
de50544759 Add support for play 69 syntax
`play 69` is a shortcut for `play --file #{_file_} --lines 69`. It plays
lines from the current file. Example (I omitted some useless
information):

  pry(main)> show-source hello
    def hello
      binding.pry
      true
      puts "hi"
      69
    end
  pry(main)> hello
    1: def hello
 => 2:   binding.pry
    3:   true
    4:   puts "hi"
    5:   69
    6: end
  pry(main)> play 5
  => 69
  pry(main)> play 3..4
  hi
  => nil
  pry(main)>

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-12-01 05:22:16 +02:00
Andrew Vos
cd5f0ae3be Reading the output of ls is hard, tablify it
ls now shows items more like how the unix ls works
2012-11-29 10:51:08 +00:00
Conrad Irwin
83d3ceeb5f Don't recolorize output with ANSI escapes [Fixes #751] 2012-11-28 15:21:14 -08:00
John Mair
d1489a59a3 moved test helper.rb to lib/pry/test/helper.rb, so plugins can use our test helpers 2012-11-28 02:05:30 +01:00
Kyrylo Silin
8a39813708 Fix subcommands
A few things were missing. I had to add a new method and slightly adjust
ClassCommand#slop method. Without these changes subcommands doesn't work
properly.

Add some unit tests for subcommands.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-11-26 18:07:32 +02:00
Kyrylo Silin
30ec15ab1c Rename "sub_command" to "subcommand"
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-11-23 13:56:58 +02:00
Kyrylo Silin
cf786881bb Extend ClassCommand so it can define sub commands
Create `ClassCommand::Options` class, which ties up sub commands and
default options together.

Let's consider the command `food make --tea`. `food` is a command,
`make` is a sub command and `--tea` is an option of `make` sub command.
We can access `--tea` via `opts[:make][:tea].

Also, we can check the freshness of our food like so: `food --freshness`.
`--freshness` is a default option. We can access it like so:
`opts.freshness?` or `opts[:freshness]`.

Add unit tests for `ClassCommand::Option` and some other tests that
reflect the additions.

Finally, document everything and fix different typos in the existing
documentation.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-11-23 13:41:44 +02:00
Conrad Irwin
a6c4c6950d Revert "Make whereami more consistent (and less cheeky) [Fixes #383]"
This reverts commit f937bb6097.
2012-11-18 16:42:29 -08:00
Conrad Irwin
f937bb6097 Make whereami more consistent (and less cheeky) [Fixes #383] 2012-11-18 16:29:48 -08:00
Conrad Irwin
fae1417e5c Fix specs on jruby-19mode on travis
This is working around (another) brokenness in jruby 1.6.8s splat
handling in ruby 1.9 mode; but I figure that now jruby 1.7 is out,
we can not bother fixing it.
2012-11-18 01:42:22 -08:00
Conrad Irwin
71bd613f13 More spec fixtures around 2012-11-18 01:33:32 -08:00
☈king
848b6bdbeb Rename for tabcompletion-friendliness. 2012-11-15 18:59:51 -06:00