pry-byebug 3.7.0 → 3.9.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 +4 -4
- data/CHANGELOG.md +26 -1
- data/README.md +21 -12
- data/lib/pry/byebug/breakpoints.rb +1 -2
- data/lib/pry-byebug/base.rb +3 -1
- data/lib/pry-byebug/commands/breakpoint.rb +2 -0
- data/lib/pry-byebug/commands/continue.rb +2 -0
- data/lib/pry-byebug/commands/exit_all.rb +2 -0
- data/lib/pry-byebug/control_d_handler.rb +2 -2
- data/lib/pry-byebug/helpers/breakpoints.rb +5 -13
- data/lib/pry-byebug/helpers/location.rb +24 -0
- data/lib/pry-byebug/helpers/navigation.rb +2 -2
- data/lib/pry-byebug/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a9be5ab97e10c1247774626e9dee655956d904dfcbdb0e601af7eabcee668a4
|
4
|
+
data.tar.gz: a151143361a89b102f85102c95c7b86a4743413822e69fefcf67087a93cd29cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75a234974314f675ba12d4c435897541c40e63b67807f03239665c31f6ecef9b06a3456ba9d577b9d255e0b59efd55b9486280884c788519a63e783920226a7d
|
7
|
+
data.tar.gz: bc5e1fcc9a82f7ed703d9b9e6272e8f8026300398e4f9265f3e72e9d84d066fa861492ee2e7a6a35c91345444160bdf39bab957c6b638d9b33ab735059b722c9
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
## Master (Unreleased)
|
4
4
|
|
5
|
+
## 3.9.0 (2020-03-21)
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* Dependency on pry being too loose. Now breaking minor releases of pry won't affect pry-byebug users (#289).
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
* Support for pry 0.13.0 (#266).
|
14
|
+
|
15
|
+
### Removed
|
16
|
+
|
17
|
+
* Support for pry older than 0.13.0 (#289).
|
18
|
+
|
19
|
+
## 3.8.0 (2020-01-22)
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
|
23
|
+
* Use `Binding#source_location` instead of evaluating `__FILE__` to avoid
|
24
|
+
warnings on Ruby 2.7 and on Ruby 2.6 in verbose mode (#221).
|
25
|
+
|
26
|
+
### Removed
|
27
|
+
|
28
|
+
* Support for Ruby 2.3. Pry-byebug no longer installs on this platform.
|
29
|
+
|
5
30
|
## 3.7.0 (2019-02-21)
|
6
31
|
|
7
32
|
* Byebug 11 compatibility, with ruby 2.6 support.
|
@@ -16,7 +41,7 @@
|
|
16
41
|
|
17
42
|
### Fixed
|
18
43
|
|
19
|
-
* Allow other threads like Pry
|
44
|
+
* Allow other threads like Pry (#142).
|
20
45
|
|
21
46
|
## 3.5.0 (2017-08-23)
|
22
47
|
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# pry-byebug
|
2
2
|
|
3
3
|
[![Version][VersionBadge]][VersionURL]
|
4
|
-
[![Build][
|
4
|
+
[![Build][CIBadge]][CIURL]
|
5
5
|
[![Inline docs][InchCIBadge]][InchCIURL]
|
6
6
|
[![Coverage][CoverageBadge]][CoverageURL]
|
7
7
|
|
@@ -23,7 +23,7 @@ puts 'Goodbye World' # Run 'next' in the console to move here.
|
|
23
23
|
|
24
24
|
## Requirements
|
25
25
|
|
26
|
-
MRI 2.
|
26
|
+
MRI 2.4.0 or higher.
|
27
27
|
|
28
28
|
## Installation
|
29
29
|
|
@@ -149,14 +149,23 @@ mentioned here if they are present in your Gemfile.
|
|
149
149
|
|
150
150
|
See [Getting Started with Development](CONTRIBUTING.md).
|
151
151
|
|
152
|
-
|
153
|
-
[Liberapay][liberapay.com].
|
152
|
+
## Funding
|
154
153
|
|
155
|
-
|
154
|
+
Subscribe to [Tidelift] to ensure pry-byebug stays actively maintained, and at
|
155
|
+
the same time get licensing assurances and timely security notifications for
|
156
|
+
your open source dependencies.
|
156
157
|
|
157
|
-
[
|
158
|
-
|
159
|
-
[
|
158
|
+
You can also help `pry-byebug` by leaving a small (or big) tip through [Liberapay].
|
159
|
+
|
160
|
+
[Tidelift]: https://tidelift.com/subscription/pkg/rubygems-pry-byebug?utm_source=rubygems-pry-byebug&utm_medium=referral&utm_campaign=readme
|
161
|
+
[Liberapay]: https://liberapay.com/pry-byebug/donate
|
162
|
+
|
163
|
+
## Security contact information
|
164
|
+
|
165
|
+
Please use the Tidelift security contact to [report a security vulnerability].
|
166
|
+
Tidelift will coordinate the fix and disclosure.
|
167
|
+
|
168
|
+
[report a security vulnerability]: https://tidelift.com/security
|
160
169
|
|
161
170
|
## Credits
|
162
171
|
|
@@ -175,9 +184,9 @@ Patches and bug reports are welcome.
|
|
175
184
|
|
176
185
|
[VersionBadge]: https://badge.fury.io/rb/pry-byebug.svg
|
177
186
|
[VersionURL]: http://badge.fury.io/rb/pry-byebug
|
178
|
-
[
|
179
|
-
[
|
187
|
+
[CIBadge]: https://github.com/deivid-rodriguez/pry-byebug/workflows/ubuntu/badge.svg?branch=master
|
188
|
+
[CIURL]: https://github.com/deivid-rodriguez/pry-byebug/actions?query=workflow%3Aubuntu
|
180
189
|
[InchCIBadge]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug.svg?branch=master
|
181
190
|
[InchCIURL]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug
|
182
|
-
[CoverageBadge]: https://
|
183
|
-
[CoverageURL]: https://codeclimate.com/github/deivid-rodriguez/pry-byebug
|
191
|
+
[CoverageBadge]: https://api.codeclimate.com/v1/badges/a88e27809329c03af017/test_coverage
|
192
|
+
[CoverageURL]: https://codeclimate.com/github/deivid-rodriguez/pry-byebug/test_coverage
|
@@ -88,7 +88,6 @@ class Pry
|
|
88
88
|
#
|
89
89
|
def delete(id)
|
90
90
|
deleted =
|
91
|
-
::Byebug.started? &&
|
92
91
|
::Byebug::Breakpoint.remove(id) &&
|
93
92
|
breakpoints.delete(find_by_id(id))
|
94
93
|
|
@@ -100,7 +99,7 @@ class Pry
|
|
100
99
|
#
|
101
100
|
def delete_all
|
102
101
|
@breakpoints = []
|
103
|
-
::Byebug.breakpoints.clear
|
102
|
+
::Byebug.breakpoints.clear
|
104
103
|
end
|
105
104
|
|
106
105
|
#
|
data/lib/pry-byebug/base.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "pry-byebug/helpers/location"
|
4
|
+
|
3
5
|
#
|
4
6
|
# Main container module for Pry-Byebug functionality
|
5
7
|
#
|
@@ -13,7 +15,7 @@ module PryByebug
|
|
13
15
|
# Checks that a target binding is in a local file context.
|
14
16
|
#
|
15
17
|
def file_context?(target)
|
16
|
-
file =
|
18
|
+
file = Helpers::Location.current_file(target)
|
17
19
|
file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
|
18
20
|
end
|
19
21
|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "pry/byebug/breakpoints"
|
4
4
|
require "pry-byebug/helpers/breakpoints"
|
5
|
+
require "pry-byebug/helpers/location"
|
5
6
|
require "pry-byebug/helpers/multiline"
|
6
7
|
|
7
8
|
module PryByebug
|
@@ -10,6 +11,7 @@ module PryByebug
|
|
10
11
|
#
|
11
12
|
class BreakCommand < Pry::ClassCommand
|
12
13
|
include Helpers::Breakpoints
|
14
|
+
include Helpers::Location
|
13
15
|
include Helpers::Multiline
|
14
16
|
|
15
17
|
match "break"
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "pry-byebug/helpers/navigation"
|
4
4
|
require "pry-byebug/helpers/breakpoints"
|
5
|
+
require "pry-byebug/helpers/location"
|
5
6
|
|
6
7
|
module PryByebug
|
7
8
|
#
|
@@ -10,6 +11,7 @@ module PryByebug
|
|
10
11
|
class ContinueCommand < Pry::ClassCommand
|
11
12
|
include Helpers::Navigation
|
12
13
|
include Helpers::Breakpoints
|
14
|
+
include Helpers::Location
|
13
15
|
|
14
16
|
match "continue"
|
15
17
|
group "Byebug"
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
original_handler = Pry.config.control_d_handler
|
4
4
|
|
5
|
-
Pry.config.control_d_handler = proc do |
|
5
|
+
Pry.config.control_d_handler = proc do |pry_instance|
|
6
6
|
Byebug.stop if Byebug.stoppable?
|
7
7
|
|
8
|
-
original_handler.call(
|
8
|
+
original_handler.call(pry_instance)
|
9
9
|
end
|
@@ -15,19 +15,11 @@ module PryByebug
|
|
15
15
|
Pry::Byebug::Breakpoints
|
16
16
|
end
|
17
17
|
|
18
|
-
#
|
19
|
-
# Current file in the target binding. Used as the default breakpoint
|
20
|
-
# location.
|
21
|
-
#
|
22
|
-
def current_file
|
23
|
-
target.eval("__FILE__")
|
24
|
-
end
|
25
|
-
|
26
18
|
#
|
27
19
|
# Prints a message with bold font.
|
28
20
|
#
|
29
21
|
def bold_puts(msg)
|
30
|
-
output.puts(
|
22
|
+
output.puts(bold(msg))
|
31
23
|
end
|
32
24
|
|
33
25
|
#
|
@@ -40,14 +32,14 @@ module PryByebug
|
|
40
32
|
status = breakpoint.enabled? ? "Enabled" : "Disabled"
|
41
33
|
code = breakpoint.source_code.with_line_numbers.to_s
|
42
34
|
condition = if breakpoint.expr
|
43
|
-
"#{
|
35
|
+
"#{bold('Condition:')} #{breakpoint.expr}\n"
|
44
36
|
else
|
45
37
|
""
|
46
38
|
end
|
47
39
|
|
48
40
|
output.puts <<-BREAKPOINT.gsub(/ {8}/, "")
|
49
41
|
|
50
|
-
#{
|
42
|
+
#{bold(header)} #{breakpoint} (#{status}) #{condition}
|
51
43
|
|
52
44
|
#{code}
|
53
45
|
|
@@ -73,8 +65,8 @@ module PryByebug
|
|
73
65
|
|
74
66
|
output.puts <<-BREAKPOINTS.gsub(/ {8}/, "")
|
75
67
|
|
76
|
-
#{
|
77
|
-
#{
|
68
|
+
#{bold(header)}
|
69
|
+
#{bold('-' * header.size)}
|
78
70
|
|
79
71
|
BREAKPOINTS
|
80
72
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PryByebug
|
4
|
+
module Helpers
|
5
|
+
#
|
6
|
+
# Compatibility helper to handle source location
|
7
|
+
#
|
8
|
+
module Location
|
9
|
+
module_function
|
10
|
+
|
11
|
+
#
|
12
|
+
# Current file in the target binding. Used as the default breakpoint
|
13
|
+
# location.
|
14
|
+
#
|
15
|
+
def current_file(source = target)
|
16
|
+
# Guard clause for Ruby >= 2.6 providing now Binding#source_location ...
|
17
|
+
return source.source_location[0] if source.respond_to?(:source_location)
|
18
|
+
|
19
|
+
# ... to avoid warning: 'eval may not return location in binding'
|
20
|
+
source.eval("__FILE__")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -10,9 +10,9 @@ module PryByebug
|
|
10
10
|
# Breaks out of the REPL loop and signals tracer
|
11
11
|
#
|
12
12
|
def breakout_navigation(action, options = {})
|
13
|
-
|
13
|
+
pry_instance.binding_stack.clear
|
14
14
|
|
15
|
-
throw :breakout_nav, action: action, options: options, pry:
|
15
|
+
throw :breakout_nav, action: action, options: options, pry: pry_instance
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/pry-byebug/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-byebug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Rodríguez
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: byebug
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 0.13.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 0.13.0
|
42
42
|
description: |-
|
43
43
|
Combine 'pry' with 'byebug'. Adds 'step', 'next', 'finish',
|
44
44
|
'continue' and 'break' commands to control execution.
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/pry-byebug/commands/up.rb
|
70
70
|
- lib/pry-byebug/control_d_handler.rb
|
71
71
|
- lib/pry-byebug/helpers/breakpoints.rb
|
72
|
+
- lib/pry-byebug/helpers/location.rb
|
72
73
|
- lib/pry-byebug/helpers/multiline.rb
|
73
74
|
- lib/pry-byebug/helpers/navigation.rb
|
74
75
|
- lib/pry-byebug/pry_ext.rb
|
@@ -87,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
88
|
requirements:
|
88
89
|
- - ">="
|
89
90
|
- !ruby/object:Gem::Version
|
90
|
-
version: 2.
|
91
|
+
version: 2.4.0
|
91
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
93
|
requirements:
|
93
94
|
- - ">="
|
94
95
|
- !ruby/object:Gem::Version
|
95
96
|
version: '0'
|
96
97
|
requirements: []
|
97
|
-
rubygems_version: 3.0.
|
98
|
+
rubygems_version: 3.2.0.pre1
|
98
99
|
signing_key:
|
99
100
|
specification_version: 4
|
100
101
|
summary: Fast debugging with Pry.
|