README.md in pry-moves-0.1.0 vs README.md in pry-moves-0.1.1
- old
+ new
@@ -2,19 +2,24 @@
# pry-moves
_An execution control add-on for [Pry][pry]._
+* Install: `gem 'pry-moves'`
+* For non-rails (without auto-require), add to your script: `require 'pry-moves'`
## Commands:
* `n` - **next** line in current frame, including block lines (moving to next line goes as naturally expected)
* `s` - **step** into function execution
* `s func_name` - steps into first method called by name `func_name`
* `f` - **finish** execution of current frame and stop at next line on higher level
* `c` - **continue**
-* `bt` - backtrace
+* `bt` - shows latest 5 lines from backtrace
+ * `bt 10` - latest 10 lines
+ * `bt all`- full backtrace
+* `up`/`down` - move over call stack
* `!` - exit
## Examples
@@ -27,41 +32,27 @@
end
```
### Advanced example
-```ruby
-class A
+<img src="https://user-images.githubusercontent.com/2452269/27320748-37afe7de-55a0-11e7-8b8f-ae05bcb02f37.jpg" width="377">
- def initialize
- b = :some_code
- end
+_Demo class source [here](https://github.com/garmoshka-mo/pry-moves/issues/1)_
- def aa
- self
- end
+## Configuration
- def bb
- block do
- c = :some_code
- end
- d = :some_code
- e = :some_code
- self
- end
+Here is default configuration, you can override it:
- def block
- e = :some_code
- yield
- f = :other_code
+```ruby
+PryMoves::Backtrace::filter =
+ /(\/gems\/|\/rubygems\/|\/bin\/|\/lib\/ruby\/|\/pry-moves\/)/
+
+PryMoves::Backtrace::format do |line|
+ defined?(Rails) : line.gsub( /^#{Rails.root.to_s}/, '') : line
end
-
-end
```
-<img src="https://user-images.githubusercontent.com/2452269/27320748-37afe7de-55a0-11e7-8b8f-ae05bcb02f37.jpg" width="377">
-
## Technical info
`pry-moves` is not yet thread-safe, so only use in single-threaded environments.
Rudimentary support for [`pry-remote`][pry-remote] (>= 0.1.1) is also included.
@@ -91,9 +82,10 @@
file an [issue][issues]. [Project changelog][changelog].
## Acknowledgments
* Gopal Patel's [pry-nav](https://github.com/nixme/pry-nav)
+* John Mair's [pry-stack_explorer](https://github.com/pry/pry-stack_explorer)
* Ruby stdlib's [debug.rb][debug.rb]
* [@Mon-Ouie][Mon-Ouie]'s [pry_debug][pry_debug]
[pry]: http://pryrepl.org/
[pry-remote]: https://github.com/Mon-Ouie/pry-remote