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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5342d5a36c1fc18c0d20b822ea80173f77f2a435fdfc6d82537ed2605a2ecaae
4
- data.tar.gz: 8f22a52c546f352010c08b73d15fe48cc658ab12a0c69251f469dc4626241923
3
+ metadata.gz: cef89b14f7e9ae764d7231ddaa5ab880ccaacd5366cdde5db8cebf6096ef6ddc
4
+ data.tar.gz: 0ce08e74da428ede072d3d343e983a499f78939ddd5134ed262ca8505fb824d5
5
5
  SHA512:
6
- metadata.gz: ec85fd9e9792767aa70cc9a2cd3d8e8b87de690d52a812c3890a501b75d12a2ed5c8c76af3c49c9e68d4ee28e989895b09f62763b54ddc44fef675e29737aa20
7
- data.tar.gz: a9467cf4aa3acf6003f15cdccb6a67b96438a54be41f511a9defb466acc387c10f8081779b339756219426a7d1a66cbe2da0fd4ac69e7fb76395ad8ef4a65705
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.4'
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.4
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 and Pry).
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.4
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
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-02-14 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print