break 0.30.0 → 0.40.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 +10 -1
- data/README.md +12 -0
- data/lib/break/pry/extensions.rb +0 -37
- data/lib/break/pry/remote.rb +43 -0
- data/lib/break/pry.rb +0 -13
- data/lib/break/remote.rb +2 -0
- data/lib/break/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdf6c48bd31f4c1f5429be6e033e16c6a4b8f00338f4b7e06b0b4dfa667bb8fd
|
4
|
+
data.tar.gz: 251bf10ffd1cf68afcd65563b0217c92fb19993eb97c0a7d27c5b17bdc9aba43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b7249a8df78892931d60a88198b577185bce8937500c0e90d77104489e915b78bfc9650eb961394c478e60c62643adb496f9106557cac2f751a152ef818de5
|
7
|
+
data.tar.gz: 28fad7cbe70a6eb09094761cc776889b9243cb694f04c422d2abe946d8e575ace9dae0edea1635648f6904328423eed103058ae0224340d0fe6ac97f97e9d6b7
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## 0.40.0 (2022-05-06)
|
4
|
+
### Changed
|
5
|
+
- Remote integration (`pry-remote`) needs to be manually activated by requiring `break/remote` ([@gsamokovarov][])
|
6
|
+
|
7
|
+
## 0.30.0 (2021-06-20)
|
8
|
+
### Added
|
9
|
+
- Officially Ruby 3.0 support. ([@gsamokovarov][])
|
10
|
+
### Fixed
|
11
|
+
- Fix broken `next` command for Ruby 2.7+. ([@gsamokovarov][])
|
12
|
+
- Fix circular require for `pry` integrations. ([@gsamokovarov][])
|
4
13
|
|
5
14
|
## 0.21.0 (2020-08-19)
|
6
15
|
### Fixed
|
data/README.md
CHANGED
@@ -49,6 +49,18 @@ If you need to debug your program, type a `next` to go to the next line of
|
|
49
49
|
program execution or `step` to step into a method, block, or class/module
|
50
50
|
opening call. All of this, in the comfort of IRB or [Pry]. Simple!
|
51
51
|
|
52
|
+
## Remote usage
|
53
|
+
|
54
|
+
Break can integrate with `pry-remote` for remote process debugging. You have to
|
55
|
+
require `break/remote` for Break's integration to kick in.
|
56
|
+
|
57
|
+
You can declare `break` in your `Gemfile` with a custom `require` to get the
|
58
|
+
remote integration loaded automatically by Bundler:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
gem "break", require: "break/remote"
|
62
|
+
```
|
63
|
+
|
52
64
|
## Why we need a debugger in Ruby?
|
53
65
|
|
54
66
|
We had our fair share of abandoned Ruby debuggers written in C. During Ruby 1.8
|
data/lib/break/pry/extensions.rb
CHANGED
@@ -13,40 +13,3 @@ module Break::Pry
|
|
13
13
|
end
|
14
14
|
|
15
15
|
Pry.prepend Break::Pry::PryExtensions
|
16
|
-
|
17
|
-
begin
|
18
|
-
require "pry-remote"
|
19
|
-
|
20
|
-
module Break::Pry
|
21
|
-
class << self
|
22
|
-
attr_accessor :current_remote_server
|
23
|
-
end
|
24
|
-
|
25
|
-
module PryRemoteServerExtensions
|
26
|
-
def initialize(*)
|
27
|
-
Break::Pry.current_remote_server&.teardown
|
28
|
-
|
29
|
-
super
|
30
|
-
end
|
31
|
-
|
32
|
-
def run
|
33
|
-
return if Break::Pry.current_remote_server
|
34
|
-
Break::Pry.current_remote_server = self
|
35
|
-
|
36
|
-
setup
|
37
|
-
|
38
|
-
Pry.start @object, @options.merge(input: client.input_proxy, output: client.output)
|
39
|
-
end
|
40
|
-
|
41
|
-
def teardown
|
42
|
-
super
|
43
|
-
ensure
|
44
|
-
Break::Pry.current_remote_server = nil
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
PryRemote::Server.prepend Break::Pry::PryRemoteServerExtensions
|
50
|
-
rescue LoadError
|
51
|
-
# Do nothing if we cannot require pry-remote.
|
52
|
-
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
begin
|
2
|
+
require "pry-remote"
|
3
|
+
|
4
|
+
module Break::Pry
|
5
|
+
class << self
|
6
|
+
attr_accessor :current_remote_server
|
7
|
+
end
|
8
|
+
|
9
|
+
module PryRemoteServerExtensions
|
10
|
+
def initialize(*)
|
11
|
+
Break::Pry.current_remote_server&.teardown
|
12
|
+
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
def run
|
17
|
+
return if Break::Pry.current_remote_server
|
18
|
+
Break::Pry.current_remote_server = self
|
19
|
+
|
20
|
+
setup
|
21
|
+
|
22
|
+
Pry.start @object, @options.merge(input: client.input_proxy, output: client.output)
|
23
|
+
end
|
24
|
+
|
25
|
+
def teardown
|
26
|
+
super
|
27
|
+
ensure
|
28
|
+
Break::Pry.current_remote_server = nil
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
PryRemote::Server.prepend Break::Pry::PryRemoteServerExtensions
|
34
|
+
|
35
|
+
Break::Filter.register_internal binding.method(:remote_pry).source_location.first.chomp('.rb')
|
36
|
+
Break::Filter.register_internal DRb.method(:start_service).source_location.first.chomp('/drb.rb')
|
37
|
+
|
38
|
+
at_exit do
|
39
|
+
Break::Pry.current_remote_server&.teardown
|
40
|
+
end
|
41
|
+
rescue LoadError
|
42
|
+
# Do nothing if we cannot require pry-remote.
|
43
|
+
end
|
data/lib/break/pry.rb
CHANGED
@@ -19,19 +19,6 @@ begin
|
|
19
19
|
end
|
20
20
|
|
21
21
|
Pry.config.commands.import Break::Pry::Commands
|
22
|
-
|
23
|
-
begin
|
24
|
-
require "pry-remote"
|
25
|
-
|
26
|
-
Break::Filter.register_internal binding.method(:remote_pry).source_location.first.chomp('.rb')
|
27
|
-
Break::Filter.register_internal DRb.method(:start_service).source_location.first.chomp('/drb.rb')
|
28
|
-
|
29
|
-
at_exit do
|
30
|
-
Break::Pry.current_remote_server&.teardown
|
31
|
-
end
|
32
|
-
rescue LoadError
|
33
|
-
# Do nothing if we cannot require pry-remote.
|
34
|
-
end
|
35
22
|
rescue LoadError
|
36
23
|
# Do nothing if we cannot require pry.
|
37
24
|
end
|
data/lib/break/remote.rb
ADDED
data/lib/break/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: break
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.40.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genadi Samokovarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,6 +84,8 @@ files:
|
|
84
84
|
- lib/break/pry/commands.rb
|
85
85
|
- lib/break/pry/extensions.rb
|
86
86
|
- lib/break/pry/frontend.rb
|
87
|
+
- lib/break/pry/remote.rb
|
88
|
+
- lib/break/remote.rb
|
87
89
|
- lib/break/session.rb
|
88
90
|
- lib/break/testing.rb
|
89
91
|
- lib/break/version.rb
|
@@ -106,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
108
|
- !ruby/object:Gem::Version
|
107
109
|
version: '0'
|
108
110
|
requirements: []
|
109
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.1.6
|
110
112
|
signing_key:
|
111
113
|
specification_version: 4
|
112
114
|
summary: Lightweight Ruby debugger
|