puts_debuggerer 0.13.4 → 0.13.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -4
- data/VERSION +1 -1
- data/lib/puts_debuggerer/core_ext/kernel.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef89b14f7e9ae764d7231ddaa5ab880ccaacd5366cdde5db8cebf6096ef6ddc
|
4
|
+
data.tar.gz: 0ce08e74da428ede072d3d343e983a499f78939ddd5134ed262ca8505fb824d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f473268d3f34d3e12ce51152a9eb4e2295448a623c087705072101d15603da5792abc7d02d2eeb272fba4369727c273d9cc9cf5845cd3d36869bdbc7971b0da5
|
7
|
+
data.tar.gz: d91edb075e81269b9f3a7589cd2f84b0126ff0b9c66633d51cdca3829e25119051a00270fb194fe17c2a7a430c7c7b65d63696cf422162a944aeaf367c5d1d5f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.13.5
|
4
|
+
|
5
|
+
- Fix not printing source line in Rails app w/ Pry
|
6
|
+
- Note that Pry's compatibility (inside Pry) is experimental and fragile because Pry's API is not reliable
|
7
|
+
|
3
8
|
## 0.13.4
|
4
9
|
|
5
10
|
- Reverted change to default `printer` behavior from 0.13.3 to avoid causing a double-print to stdout as it turns out `puts` is not always needed since Rails redirects to standard out by default in `Rails.logger.debug` calls
|
data/README.md
CHANGED
@@ -323,7 +323,7 @@ This is the recommended way for installing in [Rails](rubyonrails.org) apps in a
|
|
323
323
|
Add the following to bundler's `Gemfile`.
|
324
324
|
|
325
325
|
```ruby
|
326
|
-
gem 'puts_debuggerer', '~> 0.13.
|
326
|
+
gem 'puts_debuggerer', '~> 0.13.5'
|
327
327
|
```
|
328
328
|
|
329
329
|
Run:
|
@@ -339,7 +339,7 @@ Optionally, you may configure the [Rails](rubyonrails.org) initializer `config/i
|
|
339
339
|
Or manually install and require library.
|
340
340
|
|
341
341
|
```bash
|
342
|
-
gem install puts_debuggerer -v0.13.
|
342
|
+
gem install puts_debuggerer -v0.13.5
|
343
343
|
```
|
344
344
|
|
345
345
|
```ruby
|
@@ -397,7 +397,7 @@ Output:
|
|
397
397
|
=> "Show me the result of the calculation: 4.0"
|
398
398
|
```
|
399
399
|
|
400
|
-
In addition to the main object/expression output, you get to see the source file name, line number, and source code to help you debug and troubleshoot problems quicker (it even works in IRB
|
400
|
+
In addition to the main object/expression output, you get to see the source file name, line number, and source code to help you debug and troubleshoot problems quicker (it even works in IRB).
|
401
401
|
|
402
402
|
Second, quickly locate printed lines using the Find feature (e.g. CTRL+F) by looking for:
|
403
403
|
* [PD]
|
@@ -1078,7 +1078,7 @@ Prints out `puts __caller_source_line__`
|
|
1078
1078
|
- [Ruby](https://www.ruby-lang.org/en/)
|
1079
1079
|
- [JRuby](https://www.jruby.org/)
|
1080
1080
|
- IRB (including Rails Console)
|
1081
|
-
- Pry
|
1081
|
+
- Pry (experimental and fragile because Pry's API is not reliable)
|
1082
1082
|
|
1083
1083
|
### Opal Ruby
|
1084
1084
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.13.
|
1
|
+
0.13.5
|
@@ -156,7 +156,7 @@ module Kernel
|
|
156
156
|
source_line_number ||= __caller_line_number__(caller_depth+1)
|
157
157
|
source_file ||= __caller_file__(caller_depth+1)
|
158
158
|
source_line = ''
|
159
|
-
if defined?(Pry)
|
159
|
+
if defined?(Pry) && source_file.include?('(pry)')
|
160
160
|
@pry_instance ||= Pry.new
|
161
161
|
source_line = Pry::Command::Hist.new(pry_instance: @pry_instance).call.instance_variable_get(:@buffer).split("\n")[source_line_number - 1] # TODO handle multi-lines in source_line_count
|
162
162
|
elsif defined?(IRB) && TOPLEVEL_BINDING.receiver.respond_to?(:conf)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puts_debuggerer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|