Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyObtiva committed Jul 24, 2020
1 parent 7528a53 commit 736c526
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,4 +1,4 @@
Copyright (c) 2017 Andy Maleh
Copyright (c) 2017-2020 - Andy Maleh

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
46 changes: 43 additions & 3 deletions README.md
Expand Up @@ -331,6 +331,32 @@ Prints out:
********************************************************************************
```
#### `PutsDebuggerer.wrapper`
(default = `'*'*80`)
Wrapper to include at the top and bottom of every print out (both header and footer).
* Default value is `nil`
* Value `true` enables wrapper as `'*'*80`
* Value `false`, `nil`, or empty string disables wrapper
* Any other string value gets set as a custom wrapper
Example:
```ruby
PutsDebuggerer.wrapper = true
pd (x=1)
```
Prints out:
```bash
********************************************************************************
[PD] /Users/User/example.rb:2
> pd x=1
=> "1"
********************************************************************************
```
#### `PutsDebuggerer.source_line_count`
(default = `1`)
Expand All @@ -353,7 +379,7 @@ Prints out:
Example:
```ruby
PutsDebuggerer.source_line_count = 2
PutsDebuggerer.source_line_count = 2 # setting via global option
pd (true ||
false)
```
Expand Down Expand Up @@ -644,6 +670,19 @@ puts __caller_source_line__
Prints out `puts __caller_source_line__`
## Compatibility
[puts_debuggerer](https://rubygems.org/gems/puts_debuggerer) is fully compatible with:
- [Ruby](https://www.ruby-lang.org/en/)
- [JRuby](https://www.jruby.org/)
- IRB
- Rails Console.
It has partial-compatibility with [Opal Ruby](https://opalrb.com/) with everything working except these features:
- File name display
- Line number display
- Source code call display
## Change Log
[CHANGELOG.md](CHANGELOG.md)
Expand All @@ -666,5 +705,6 @@ Prints out `puts __caller_source_line__`
## Copyright
Copyright (c) 2017 Andy Maleh. See LICENSE.txt for
further details.
[MIT](LICENSE.txt)
Copyright (c) 2017-2020 - Andy Maleh.
5 changes: 3 additions & 2 deletions TODO.md
Expand Up @@ -8,8 +8,9 @@ Here are tasks considered for future versions. Once done, they are moved to the

- `return` option to return printed String
- Support pd arg1, arg2, arg3
- Support Ruby logger API and/or logging gem (and consider adding a formatting for it for logging/logger library)
- Provide as logging device and/or formatter for Ruby logger API and/or logging gem
* fix issue with printing in rspec inside a Rails project without having to do extra configuration
* fix issue with erb support
* display run_at run number in printout
* implement fallback in irb for when line number cannot be discovered (issue happens in pry, perhaps this just means support pry)
* support sequences for run_at, such as print on odd numbers
* pry support: implement fallback in irb for when line number cannot be discovered (issue happens in pry, perhaps this just means support pry)

0 comments on commit 736c526

Please sign in to comment.