pry-byebug-reloaded 3.10.1 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac5c1a8ef056c4fda6d4517ee478ddbc804b1f1cf1fc85b2cd851bb7ec8696fb
4
- data.tar.gz: eed33b1993ad70645eef3676c041022845c71fb2e3d61251a58bde53d3ce4de3
3
+ metadata.gz: 1e8c9207c1f9895e0deb9ad5f24141614237c9d4905da0da1dee70d1e75cf811
4
+ data.tar.gz: 995cf5881bb28f3afc682ec5383b8593d4cd03a9bcf76014816631ad56c257ed
5
5
  SHA512:
6
- metadata.gz: cd49c629b3b8b8fed2583ccfd60f4e0989d951d322e0715de367318cdc1757afb00270477e726b090372962da2922fe3a80a17b9f05076f9a5bb1938b06dbfb3
7
- data.tar.gz: 509840deca1bead6f397d8f737eceba6e3f6b3910a6dc7ce780f331fbcb00a605a9244c0a7d857b0b10b52a1618e667b40be8fe6eeea2949a35157c7f91bb678
6
+ metadata.gz: bfa81f4d634cbdad76551273b47693c00b0280735a907b1f28cb271f1af3ed1a14c042d8b543babd06e04fe20ba117bf02140f2f2544c10b2fe1521388d2c03f
7
+ data.tar.gz: aa89fbf80e067a2bedee8734d847d95facb30b3b0e8e7ecb431ec42833f6c648d91641151bdfd331957a5b9afc1688a270dfc8a55e751d7daac669fd462cceec
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 3.11.0 (2025-03-28)
6
+
7
+ ### Added
8
+
9
+ * Byebug 12 compatibility, with Ruby 3.1, 3.2, and 3.3 support (#434).
10
+ * Support for pry 0.15 (#428).
11
+
12
+ ### Removed
13
+
14
+ * Support for Ruby 2.7, and 3.0. Pry-byebug no longer installs on these platforms (#433).
15
+
5
16
  ## 3.10.1 (2022-08-16)
6
17
 
7
18
  ### Fixed
data/README.md CHANGED
@@ -8,7 +8,7 @@ A version-relaxed fork of
8
8
  [pry-byebug-reloaded](https://github.com/deivid-rodriguez/pry-byebug) with some patches
9
9
  applied:
10
10
 
11
- * https://github.com/deivid-rodriguez/pry-byebug-reloaded/pull/339
11
+ * [pry-remote-pr]
12
12
 
13
13
  Adds step-by-step debugging and stack navigation capabilities to [pry] using
14
14
  [byebug].
@@ -193,3 +193,5 @@ Patches and bug reports are welcome.
193
193
  [CIURL]: https://github.com/Jack12816/pry-byebug-reloaded/actions?query=workflow%3Aubuntu
194
194
  [InchCIBadge]: http://inch-ci.org/github/Jack12816/pry-byebug-reloaded.svg?branch=master
195
195
  [InchCIURL]: http://inch-ci.org/github/Jack12816/pry-byebug-reloaded
196
+
197
+ [pry-remote-pr]: https://github.com/deivid-rodriguez/pry-byebug/pull/339
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "byebug/core"
4
+
5
+ module Byebug
6
+ #
7
+ # Extends the PryProcessor to make it work with Pry-Remote
8
+ #
9
+ class PryRemoteProcessor < PryProcessor
10
+ def self.start
11
+ super
12
+
13
+ Byebug.current_context.step_out(5, true)
14
+ end
15
+
16
+ def resume_pry
17
+ new_binding = frame._binding
18
+
19
+ run do
20
+ return unless server
21
+
22
+ if defined?(@pry) && @pry
23
+ @pry.repl(new_binding)
24
+ else
25
+ @pry = Pry::REPL.start_without_pry_byebug(target: new_binding,
26
+ input: input,
27
+ output: output)
28
+ end
29
+ end
30
+ rescue Errno::ECONNREFUSED
31
+ nil
32
+ end
33
+
34
+ private
35
+
36
+ def input
37
+ server.client.input_proxy
38
+ end
39
+
40
+ def output
41
+ server.client.output
42
+ end
43
+
44
+ def server
45
+ PryByebug.current_remote_server
46
+ end
47
+ end
48
+ end
@@ -7,7 +7,9 @@ require "pry-byebug/helpers/location"
7
7
  #
8
8
  module PryByebug
9
9
  # Reference to currently running pry-remote server. Used by the processor.
10
- attr_accessor :current_remote_server
10
+ class << self
11
+ attr_accessor :current_remote_server
12
+ end
11
13
 
12
14
  module_function
13
15
 
@@ -10,6 +10,7 @@ module PryByebug
10
10
  def process
11
11
  super
12
12
  ensure
13
+ PryByebug.current_remote_server&.teardown
13
14
  Byebug.stop if Byebug.stoppable?
14
15
  end
15
16
  end
@@ -18,6 +18,7 @@ module PryByebug
18
18
  BANNER
19
19
 
20
20
  def process
21
+ PryByebug.current_remote_server&.teardown
21
22
  PryByebug.check_file_context(target)
22
23
 
23
24
  breakout_navigation :finish
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "byebug/processors/pry_processor"
4
+ require "byebug/processors/pry_remote_processor"
4
5
 
5
6
  class << Pry::REPL
6
7
  alias start_without_pry_byebug start
@@ -8,8 +9,13 @@ class << Pry::REPL
8
9
  def start_with_pry_byebug(options = {})
9
10
  target = options[:target]
10
11
 
11
- if target.is_a?(Binding) && PryByebug.file_context?(target)
12
- Byebug::PryProcessor.start unless ENV["DISABLE_PRY"]
12
+ if target.is_a?(Binding) && PryByebug.file_context?(target) && !ENV["DISABLE_PRY"]
13
+ if run_remote?
14
+ Byebug::PryRemoteProcessor.start
15
+ return start_without_pry_byebug(options)
16
+ end
17
+
18
+ Byebug::PryProcessor.start
13
19
  else
14
20
  # No need for the tracer unless we have a file context to step through
15
21
  start_without_pry_byebug(options)
@@ -17,4 +23,8 @@ class << Pry::REPL
17
23
  end
18
24
 
19
25
  alias start start_with_pry_byebug
26
+
27
+ def run_remote?
28
+ PryByebug.current_remote_server
29
+ end
20
30
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pry-remote"
3
+ require "pry-remote-reloaded"
4
4
 
5
- module PryRemote
5
+ module PryRemoteReloaded
6
6
  #
7
7
  # Overrides PryRemote::Server
8
8
  #
@@ -11,28 +11,28 @@ module PryRemote
11
11
  # Override the call to Pry.start to save off current Server, and not
12
12
  # teardown the server right after Pry.start finishes.
13
13
  #
14
+ alias original_run run
14
15
  def run
15
16
  raise("Already running a pry-remote session!") if
16
17
  PryByebug.current_remote_server
17
18
 
18
19
  PryByebug.current_remote_server = self
19
20
 
20
- setup
21
- Pry.start @object, input: client.input_proxy, output: client.output
21
+ catch(:breakout_nav) { original_run }
22
22
  end
23
23
 
24
24
  #
25
25
  # Override to reset our saved global current server session.
26
26
  #
27
- alias teardown_without_pry_byebug teardown
28
- def teardown_with_pry_byebug
27
+ alias original_teardown teardown
28
+ def teardown
29
+ original_teardown
30
+
29
31
  return if @torn
30
32
 
31
- teardown_without_pry_byebug
32
33
  PryByebug.current_remote_server = nil
33
34
  @torn = true
34
35
  end
35
- alias teardown teardown_with_pry_byebug
36
36
  end
37
37
  end
38
38
 
@@ -4,5 +4,5 @@
4
4
  # Main container module for Pry-Byebug functionality
5
5
  #
6
6
  module PryByebug
7
- VERSION = "3.10.1"
7
+ VERSION = "3.11.0"
8
8
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-byebug-reloaded
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.1
4
+ version: 3.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodríguez
8
8
  - Gopal Patel
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2023-12-07 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: byebug
@@ -17,14 +16,14 @@ dependencies:
17
16
  requirements:
18
17
  - - "~>"
19
18
  - !ruby/object:Gem::Version
20
- version: '11.0'
19
+ version: '12.0'
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - "~>"
26
25
  - !ruby/object:Gem::Version
27
- version: '11.0'
26
+ version: '12.0'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: pry
30
29
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +33,7 @@ dependencies:
34
33
  version: '0.13'
35
34
  - - "<"
36
35
  - !ruby/object:Gem::Version
37
- version: '0.15'
36
+ version: '0.16'
38
37
  type: :runtime
39
38
  prerelease: false
40
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -44,7 +43,7 @@ dependencies:
44
43
  version: '0.13'
45
44
  - - "<"
46
45
  - !ruby/object:Gem::Version
47
- version: '0.15'
46
+ version: '0.16'
48
47
  description: |-
49
48
  Combine 'pry' with 'byebug'. Adds 'step', 'next', 'finish',
50
49
  'continue' and 'break' commands to control execution.
@@ -59,6 +58,7 @@ files:
59
58
  - LICENSE
60
59
  - README.md
61
60
  - lib/byebug/processors/pry_processor.rb
61
+ - lib/byebug/processors/pry_remote_processor.rb
62
62
  - lib/pry-byebug.rb
63
63
  - lib/pry-byebug/base.rb
64
64
  - lib/pry-byebug/cli.rb
@@ -85,8 +85,11 @@ files:
85
85
  homepage: https://github.com/Jack12816/pry-byebug-reloaded
86
86
  licenses:
87
87
  - MIT
88
- metadata: {}
89
- post_install_message:
88
+ metadata:
89
+ bug_tracker_uri: https://github.com/Jack12816/pry-byebug-reloaded/issues
90
+ changelog_uri: https://github.com/Jack12816/pry-byebug-reloaded/blob/HEAD/CHANGELOG.md
91
+ source_code_uri: https://github.com/Jack12816/pry-byebug-reloaded
92
+ funding_uri: https://liberapay.com/pry-byebug-reloaded
90
93
  rdoc_options: []
91
94
  require_paths:
92
95
  - lib
@@ -94,15 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
97
  requirements:
95
98
  - - ">="
96
99
  - !ruby/object:Gem::Version
97
- version: 2.5.0
100
+ version: 3.1.0
98
101
  required_rubygems_version: !ruby/object:Gem::Requirement
99
102
  requirements:
100
103
  - - ">="
101
104
  - !ruby/object:Gem::Version
102
105
  version: '0'
103
106
  requirements: []
104
- rubygems_version: 3.3.8
105
- signing_key:
107
+ rubygems_version: 3.6.9
106
108
  specification_version: 4
107
109
  summary: Fast debugging with Pry.
108
110
  test_files: []