pry-byebug 3.6.0 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE +2 -2
- data/README.md +7 -7
- data/lib/byebug/processors/pry_processor.rb +2 -0
- data/lib/pry-byebug.rb +2 -0
- data/lib/pry-byebug/base.rb +10 -8
- data/lib/pry-byebug/cli.rb +2 -0
- data/lib/pry-byebug/commands.rb +2 -0
- data/lib/pry-byebug/commands/backtrace.rb +2 -0
- data/lib/pry-byebug/commands/breakpoint.rb +2 -0
- data/lib/pry-byebug/commands/continue.rb +2 -0
- data/lib/pry-byebug/commands/down.rb +2 -0
- data/lib/pry-byebug/commands/exit_all.rb +2 -0
- data/lib/pry-byebug/commands/finish.rb +2 -0
- data/lib/pry-byebug/commands/frame.rb +3 -1
- data/lib/pry-byebug/commands/next.rb +2 -0
- data/lib/pry-byebug/commands/step.rb +3 -1
- data/lib/pry-byebug/commands/up.rb +2 -0
- data/lib/pry-byebug/control_d_handler.rb +2 -0
- data/lib/pry-byebug/helpers/breakpoints.rb +12 -6
- data/lib/pry-byebug/helpers/multiline.rb +2 -0
- data/lib/pry-byebug/helpers/navigation.rb +2 -0
- data/lib/pry-byebug/pry_ext.rb +2 -0
- data/lib/pry-byebug/pry_remote_ext.rb +3 -1
- data/lib/pry-byebug/version.rb +3 -1
- data/lib/pry/byebug/breakpoints.rb +4 -0
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4cd2bc1326c6edbd61bd8625d299e0e1511e2e6532b3846b863d241ea5fc5f6
|
4
|
+
data.tar.gz: 12cc7a42a8132a9f4f9c07360f3b9f323459c6d4950cb945802ed2499f76ddd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a84505cfef66d8e5ef228a914c5a7cfa0be6847e4aeb9cf2c12680b1fdc3810c3d80f585d6329cae904633b37cf46e337a68cfa02e91651d70bda9f1f6b57fd9
|
7
|
+
data.tar.gz: 8b7fe6eb239aec73c80c87787927b279d27c509bd3579be321cfa8d9c9c81698897c64405d8532949be6d24183fec89c5f564b6f4e07790e1ac26b22e8afe20d
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
MIT
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c) David Rodríguez <deivid.rodriguez@
|
3
|
+
Copyright (c) 2018 David Rodríguez <deivid.rodriguez@riseup.net>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# pry-byebug
|
2
2
|
|
3
3
|
[![Version][VersionBadge]][VersionURL]
|
4
|
-
[![Build][
|
4
|
+
[![Build][CircleCIBadge]][CircleCIURL]
|
5
5
|
[![Inline docs][InchCIBadge]][InchCIURL]
|
6
6
|
[![Coverage][CoverageBadge]][CoverageURL]
|
7
7
|
|
@@ -23,9 +23,7 @@ puts 'Goodbye World' # Run 'next' in the console to move here.
|
|
23
23
|
|
24
24
|
## Requirements
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
* Recommended: MRI 2.3.0 or higher.
|
26
|
+
MRI 2.3.0 or higher.
|
29
27
|
|
30
28
|
## Installation
|
31
29
|
|
@@ -37,7 +35,9 @@ gem 'pry-byebug'
|
|
37
35
|
|
38
36
|
to your Gemfile and run
|
39
37
|
|
40
|
-
|
38
|
+
```console
|
39
|
+
bundle install
|
40
|
+
```
|
41
41
|
|
42
42
|
Make sure you include the gem globally or inside the `:test` group if you plan
|
43
43
|
to use it to debug your tests!
|
@@ -175,8 +175,8 @@ Patches and bug reports are welcome.
|
|
175
175
|
|
176
176
|
[VersionBadge]: https://badge.fury.io/rb/pry-byebug.svg
|
177
177
|
[VersionURL]: http://badge.fury.io/rb/pry-byebug
|
178
|
-
[
|
179
|
-
[
|
178
|
+
[CircleCIBadge]: https://circleci.com/gh/deivid-rodriguez/pry-byebug/tree/master.svg?style=shield
|
179
|
+
[CircleCIURL]: https://circleci.com/gh/deivid-rodriguez/pry-byebug/tree/master
|
180
180
|
[InchCIBadge]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug.svg?branch=master
|
181
181
|
[InchCIURL]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug
|
182
182
|
[CoverageBadge]: https://img.shields.io/codeclimate/coverage/github/deivid-rodriguez/pry-byebug.svg
|
data/lib/pry-byebug.rb
CHANGED
data/lib/pry-byebug/base.rb
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# Main container module for Pry-Byebug functionality
|
3
5
|
#
|
4
6
|
module PryByebug
|
7
|
+
# Reference to currently running pry-remote server. Used by the processor.
|
8
|
+
attr_accessor :current_remote_server
|
9
|
+
|
10
|
+
module_function
|
11
|
+
|
5
12
|
#
|
6
13
|
# Checks that a target binding is in a local file context.
|
7
14
|
#
|
@@ -9,17 +16,12 @@ module PryByebug
|
|
9
16
|
file = target.eval("__FILE__")
|
10
17
|
file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
|
11
18
|
end
|
12
|
-
module_function :file_context?
|
13
19
|
|
14
20
|
#
|
15
21
|
# Ensures that a command is executed in a local file context.
|
16
22
|
#
|
17
|
-
def check_file_context(target,
|
18
|
-
|
19
|
-
raise(Pry::CommandError,
|
23
|
+
def check_file_context(target, msg = nil)
|
24
|
+
msg ||= "Cannot find local context. Did you use `binding.pry`?"
|
25
|
+
raise(Pry::CommandError, msg) unless file_context?(target)
|
20
26
|
end
|
21
|
-
module_function :check_file_context
|
22
|
-
|
23
|
-
# Reference to currently running pry-remote server. Used by the processor.
|
24
|
-
attr_accessor :current_remote_server
|
25
27
|
end
|
data/lib/pry-byebug/cli.rb
CHANGED
data/lib/pry-byebug/commands.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "pry-byebug/helpers/navigation"
|
2
4
|
|
3
5
|
module PryByebug
|
@@ -20,7 +22,7 @@ module PryByebug
|
|
20
22
|
Examples:
|
21
23
|
frame #=> Show current frame #.
|
22
24
|
frame 5 #=> Move to frame 5.
|
23
|
-
|
25
|
+
BANNER
|
24
26
|
|
25
27
|
def process
|
26
28
|
PryByebug.check_file_context(target)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "pry-byebug/helpers/navigation"
|
2
4
|
|
3
5
|
module PryByebug
|
@@ -19,7 +21,7 @@ module PryByebug
|
|
19
21
|
Examples:
|
20
22
|
step #=> Move a single step forward.
|
21
23
|
step 5 #=> Execute the next 5 steps.
|
22
|
-
|
24
|
+
BANNER
|
23
25
|
|
24
26
|
def process
|
25
27
|
PryByebug.check_file_context(target)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "byebug"
|
2
4
|
|
3
5
|
module PryByebug
|
@@ -33,15 +35,19 @@ module PryByebug
|
|
33
35
|
#
|
34
36
|
# Includes surrounding code at that point.
|
35
37
|
#
|
36
|
-
def print_full_breakpoint(
|
37
|
-
header = "Breakpoint #{
|
38
|
-
status =
|
39
|
-
code =
|
40
|
-
condition =
|
38
|
+
def print_full_breakpoint(breakpoint)
|
39
|
+
header = "Breakpoint #{breakpoint.id}:"
|
40
|
+
status = breakpoint.enabled? ? "Enabled" : "Disabled"
|
41
|
+
code = breakpoint.source_code.with_line_numbers.to_s
|
42
|
+
condition = if breakpoint.expr
|
43
|
+
"#{text.bold('Condition:')} #{breakpoint.expr}\n"
|
44
|
+
else
|
45
|
+
""
|
46
|
+
end
|
41
47
|
|
42
48
|
output.puts <<-BREAKPOINT.gsub(/ {8}/, "")
|
43
49
|
|
44
|
-
#{text.bold(header)} #{
|
50
|
+
#{text.bold(header)} #{breakpoint} (#{status}) #{condition}
|
45
51
|
|
46
52
|
#{code}
|
47
53
|
|
data/lib/pry-byebug/pry_ext.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "pry-remote"
|
2
4
|
|
3
5
|
module PryRemote
|
@@ -38,5 +40,5 @@ end
|
|
38
40
|
# 'next' on the last line of a program won't hit Byebug::PryProcessor#run,
|
39
41
|
# which normally handles cleanup.
|
40
42
|
at_exit do
|
41
|
-
PryByebug.current_remote_server
|
43
|
+
PryByebug.current_remote_server&.teardown
|
42
44
|
end
|
data/lib/pry-byebug/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Pry
|
2
4
|
module Byebug
|
3
5
|
#
|
@@ -61,6 +63,7 @@ class Pry
|
|
61
63
|
def add_file(file, line, expression = nil)
|
62
64
|
real_file = (file != Pry.eval_path)
|
63
65
|
raise(ArgumentError, "Invalid file!") if real_file && !File.exist?(file)
|
66
|
+
|
64
67
|
validate_expression expression
|
65
68
|
|
66
69
|
path = (real_file ? File.expand_path(file) : file)
|
@@ -142,6 +145,7 @@ class Pry
|
|
142
145
|
def find_by_id(id)
|
143
146
|
breakpoint = find { |b| b.id == id }
|
144
147
|
raise(ArgumentError, "No breakpoint ##{id}!") unless breakpoint
|
148
|
+
|
145
149
|
breakpoint
|
146
150
|
end
|
147
151
|
|
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.7.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: 2019-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: byebug
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '11.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '11.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: pry
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,15 +87,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 2.
|
90
|
+
version: 2.3.0
|
91
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
|
98
|
-
rubygems_version: 2.7.4
|
97
|
+
rubygems_version: 3.0.2
|
99
98
|
signing_key:
|
100
99
|
specification_version: 4
|
101
100
|
summary: Fast debugging with Pry.
|