pry-byebug 1.0.1 → 1.1.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/.gitignore +7 -8
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -1
- data/README.md +28 -63
- data/Rakefile +11 -0
- data/lib/pry-byebug/commands.rb +16 -3
- data/lib/pry-byebug/version.rb +1 -1
- data/pry-byebug.gemspec +14 -12
- data/test/base_test.rb +15 -0
- data/test/breakpoints_test.rb +14 -0
- data/test/commands_test.rb +6 -0
- data/test/processor_test.rb +10 -0
- data/test/pry_ext_test.rb +6 -0
- data/test/pry_remote_ext_test.rb +6 -0
- data/test/test_helper.rb +5 -0
- metadata +71 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 121ca8dcd9228688b55ebb264c755664ec8c912f
|
4
|
+
data.tar.gz: ceb7af746b551eb0cec30d952540fcf9e968eb7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f9ce397f963ae6894b003d81df2900cba0f6a620d4a9d422896fe30484b29f3880ddeb99fbf01514bd51bd4f232d77c3866d29f7a404ff04cdf8aa43b10d9b
|
7
|
+
data.tar.gz: 2e2a734a5b1757eabd733fdba6036e61752060592c575b08a9aa33d28c12e80bf36fa39e3c8c1c791367b1174126bc9a2cd32c7ec0389824589cab161c0a6cc6
|
data/.gitignore
CHANGED
@@ -1,18 +1,17 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
tmp
|
2
|
+
pkg
|
3
|
+
doc
|
4
|
+
|
3
5
|
.bundle
|
4
6
|
.config
|
5
7
|
.yardoc
|
6
8
|
.gdb_history
|
9
|
+
.ruby-gemset
|
10
|
+
.ruby-version
|
11
|
+
|
7
12
|
Gemfile.lock
|
8
13
|
InstalledFiles
|
9
14
|
_yardoc
|
10
15
|
coverage
|
11
|
-
doc/
|
12
16
|
lib/bundler/man
|
13
|
-
pkg
|
14
17
|
rdoc
|
15
|
-
spec/reports
|
16
|
-
test/tmp
|
17
|
-
test/version_tmp
|
18
|
-
tmp
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
+
## 1.1.0 (2013-06-06)
|
2
|
+
|
3
|
+
* Adds a test suite (thanks @teeparham!)
|
4
|
+
* Uses byebug ~> 1.4.0
|
5
|
+
* Uses s, n, f and c aliases by default (thanks @jgakos!)
|
6
|
+
|
7
|
+
|
1
8
|
## 1.0.0, 1.0.1 (2013-05-07)
|
2
9
|
|
3
10
|
* Forked from [pry-debugger](https://github.com/nixme/pry-debugger) to support
|
4
11
|
byebug
|
5
12
|
* Dropped pry-remote support
|
6
13
|
|
14
|
+
|
7
15
|
## 0.2.2 (2013-03-07)
|
8
16
|
|
9
17
|
* Relaxed [byebug][byebug] dependency.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@ pry-byebug
|
|
3
3
|
|
4
4
|
_Fast execution control in Pry_
|
5
5
|
|
6
|
-
Adds **step**, **next**, **finish
|
6
|
+
Adds **step**, **next**, **finish** and **continue** commands and
|
7
7
|
**breakpoints** to [Pry][pry] using [byebug][byebug].
|
8
8
|
|
9
9
|
To use, invoke pry normally. No need to start your script or app differently.
|
@@ -19,17 +19,33 @@ For a complete debugging environment, add
|
|
19
19
|
[pry-stack_explorer][pry-stack_explorer] for call-stack frame navigation.
|
20
20
|
|
21
21
|
|
22
|
+
## Installation
|
23
|
+
|
24
|
+
Drop
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'pry-byebug'
|
28
|
+
```
|
29
|
+
|
30
|
+
in your Gemfile and run
|
31
|
+
|
32
|
+
bundle install
|
33
|
+
|
34
|
+
_Make sure you include the gem globally or inside the `:test` group if you plan
|
35
|
+
to use it to debug your tests!_
|
36
|
+
|
37
|
+
|
22
38
|
## Execution Commands
|
23
39
|
|
24
40
|
**step:** Step execution into the next line or method. Takes an optional numeric
|
25
|
-
argument to step multiple times.
|
41
|
+
argument to step multiple times. Aliased to `s`
|
26
42
|
|
27
43
|
**next:** Step over to the next line within the same frame. Also takes an
|
28
|
-
optional numeric argument to step multiple lines.
|
44
|
+
optional numeric argument to step multiple lines. Aliased to `n`
|
29
45
|
|
30
|
-
**finish:** Execute until current stack frame returns.
|
46
|
+
**finish:** Execute until current stack frame returns. Aliased to `f`
|
31
47
|
|
32
|
-
**continue:** Continue program execution and end the Pry session.
|
48
|
+
**continue:** Continue program execution and end the Pry session. Aliased to `c`
|
33
49
|
|
34
50
|
|
35
51
|
## Breakpoints
|
@@ -68,59 +84,12 @@ the source code around each breakpoint.
|
|
68
84
|
|
69
85
|
## Caveats
|
70
86
|
|
71
|
-
|
72
|
-
environments.
|
73
|
-
|
74
|
-
Only supports MRI 1.9.2 and 1.9.3. For a pure ruby approach not reliant on
|
75
|
-
[byebug][byebug], check out [pry-nav][pry-nav]. Note: *pry-nav* and
|
76
|
-
*pry-byebug* cannot be loaded together.
|
77
|
-
|
78
|
-
|
79
|
-
## Remote debugging
|
80
|
-
|
81
|
-
Support for [pry-remote][pry-remote] (>= 0.1.4) is also included. Requires
|
82
|
-
explicity requiring *pry-byebug*, not just relying on pry's plugin loader.
|
83
|
-
|
84
|
-
Want to debug a Rails app running inside [foreman][foreman]? Add to your
|
85
|
-
Gemfile:
|
86
|
-
|
87
|
-
```ruby
|
88
|
-
gem 'pry'
|
89
|
-
gem 'pry-remote'
|
90
|
-
gem 'pry-stack_explorer'
|
91
|
-
gem 'pry-byebug'
|
92
|
-
```
|
93
|
-
|
94
|
-
Then add `binding.remote_pry` where you want to pause:
|
95
|
-
|
96
|
-
```ruby
|
97
|
-
class UsersController < ApplicationController
|
98
|
-
def index
|
99
|
-
binding.remote_pry
|
100
|
-
...
|
101
|
-
end
|
102
|
-
end
|
103
|
-
```
|
104
|
-
|
105
|
-
Load a page that triggers the code. Connect to the session:
|
106
|
-
|
107
|
-
```
|
108
|
-
$ bundle exec pry-remote
|
109
|
-
```
|
110
|
-
|
111
|
-
Using Pry with Rails? Check out [Jazz Hands][jazz_hands].
|
87
|
+
Only supports MRI 2.0.0 or newer.
|
112
88
|
|
113
89
|
|
114
90
|
## Tips
|
115
91
|
|
116
|
-
|
117
|
-
|
118
|
-
```ruby
|
119
|
-
Pry.commands.alias_command 'c', 'continue'
|
120
|
-
Pry.commands.alias_command 's', 'step'
|
121
|
-
Pry.commands.alias_command 'n', 'next'
|
122
|
-
Pry.commands.alias_command 'f', 'finish'
|
123
|
-
```
|
92
|
+
Using Pry with Rails? Check out [Jazz Hands][jazz_hands].
|
124
93
|
|
125
94
|
|
126
95
|
## Contributors
|
@@ -135,15 +104,11 @@ Pry.commands.alias_command 'f', 'finish'
|
|
135
104
|
Patches and bug reports are welcome. Just send a [pull request][pullrequests] or
|
136
105
|
file an [issue][issues]. [Project changelog][changelog].
|
137
106
|
|
138
|
-
|
139
|
-
|
140
107
|
[pry]: http://pry.github.com
|
141
|
-
[byebug]:
|
108
|
+
[byebug]: https://github.com/deivid-rodriguez/byebug
|
142
109
|
[pry-stack_explorer]: https://github.com/pry/pry-stack_explorer
|
143
|
-
[pry-nav]: https://github.com/nixme/pry-nav
|
144
|
-
[pry-remote]: https://github.com/Mon-Ouie/pry-remote
|
145
|
-
[foreman]: https://github.com/ddollar/foreman
|
146
110
|
[jazz_hands]: https://github.com/nixme/jazz_hands
|
147
|
-
[pullrequests]: https://github.com/
|
148
|
-
[issues]: https://github.com/
|
149
|
-
[changelog]: https://github.com/
|
111
|
+
[pullrequests]: https://github.com/deivid-rodriguez/pry-byebug/pulls
|
112
|
+
[issues]: https://github.com/deivid-rodriguez/pry-byebug/issues
|
113
|
+
[changelog]: https://github.com/deivid-rodriguez/pry-byebug/blob/master/CHANGELOG.md
|
114
|
+
[pry-nav]: https://github.com/nixme/pry-nav
|
data/Rakefile
CHANGED
data/lib/pry-byebug/commands.rb
CHANGED
@@ -8,6 +8,7 @@ module PryByebug
|
|
8
8
|
|
9
9
|
banner <<-BANNER
|
10
10
|
Usage: step [TIMES]
|
11
|
+
Aliases: s
|
11
12
|
|
12
13
|
Step execution forward. By default, moves a single step.
|
13
14
|
|
@@ -22,13 +23,14 @@ module PryByebug
|
|
22
23
|
breakout_navigation :step, args.first
|
23
24
|
end
|
24
25
|
end
|
25
|
-
|
26
|
+
alias_command 's', 'step'
|
26
27
|
|
27
28
|
create_command 'next' do
|
28
29
|
description 'Execute the next line within the current stack frame.'
|
29
30
|
|
30
31
|
banner <<-BANNER
|
31
32
|
Usage: next [LINES]
|
33
|
+
Aliases: n
|
32
34
|
|
33
35
|
Step over within the same frame. By default, moves forward a single
|
34
36
|
line.
|
@@ -44,27 +46,38 @@ module PryByebug
|
|
44
46
|
breakout_navigation :next, args.first
|
45
47
|
end
|
46
48
|
end
|
49
|
+
alias_command 'n', 'next'
|
47
50
|
|
48
51
|
|
49
52
|
create_command 'finish' do
|
50
53
|
description 'Execute until current stack frame returns.'
|
51
54
|
|
55
|
+
banner <<-BANNER
|
56
|
+
Usage: finish
|
57
|
+
Aliases: f
|
58
|
+
BANNER
|
59
|
+
|
52
60
|
def process
|
53
61
|
check_file_context
|
54
62
|
breakout_navigation :finish
|
55
63
|
end
|
56
64
|
end
|
57
|
-
|
65
|
+
alias_command 'f', 'finish'
|
58
66
|
|
59
67
|
create_command 'continue' do
|
60
68
|
description 'Continue program execution and end the Pry session.'
|
61
69
|
|
70
|
+
banner <<-BANNER
|
71
|
+
Usage: continue
|
72
|
+
Aliases: c
|
73
|
+
BANNER
|
74
|
+
|
62
75
|
def process
|
63
76
|
check_file_context
|
64
77
|
run 'exit-all'
|
65
78
|
end
|
66
79
|
end
|
67
|
-
|
80
|
+
alias_command 'c', 'continue'
|
68
81
|
|
69
82
|
create_command 'break' do
|
70
83
|
description 'Set or edit a breakpoint.'
|
data/lib/pry-byebug/version.rb
CHANGED
data/pry-byebug.gemspec
CHANGED
@@ -1,25 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require File.expand_path('../lib/pry-byebug/version', __FILE__)
|
1
|
+
require File.dirname(__FILE__) + '/lib/pry-byebug/version'
|
4
2
|
|
5
3
|
Gem::Specification.new do |gem|
|
6
4
|
gem.name = 'pry-byebug'
|
7
5
|
gem.version = PryByebug::VERSION
|
8
|
-
gem.
|
9
|
-
gem.email = '
|
6
|
+
gem.authors = ['David Rodríguez', 'Gopal Patel']
|
7
|
+
gem.email = 'deivid.rodriguez@gmail.com'
|
10
8
|
gem.license = 'MIT'
|
11
9
|
gem.homepage = 'https://github.com/deivid-rodriguez/pry-byebug'
|
12
10
|
gem.summary = 'Fast debugging with Pry.'
|
13
|
-
gem.description =
|
14
|
-
|
15
|
-
|
11
|
+
gem.description = %q{Combine 'pry' with 'byebug'. Adds 'step', 'next', and
|
12
|
+
'continue' commands to control execution.}
|
13
|
+
|
16
14
|
gem.files = `git ls-files`.split("\n")
|
17
|
-
gem.test_files = `git ls-files --
|
18
|
-
gem.require_paths = ["lib"]
|
15
|
+
gem.test_files = `git ls-files -- test/*`.split("\n")
|
19
16
|
|
20
17
|
# Dependencies
|
21
18
|
gem.required_ruby_version = '>= 2.0.0'
|
22
|
-
|
23
|
-
gem.add_runtime_dependency '
|
19
|
+
|
20
|
+
gem.add_runtime_dependency 'pry', '~> 0.9.12'
|
21
|
+
gem.add_runtime_dependency 'byebug', '~> 1.4.0'
|
22
|
+
|
24
23
|
gem.add_development_dependency 'bundler', '~> 1.3.5'
|
24
|
+
gem.add_development_dependency 'rake', '~> 10.0.4'
|
25
|
+
gem.add_development_dependency 'minitest', '~> 5.0.3'
|
26
|
+
gem.add_development_dependency 'mocha', '~> 0.14.0'
|
25
27
|
end
|
data/test/base_test.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class BaseTest < Minitest::Test
|
4
|
+
def test_main_file_context
|
5
|
+
Pry.stubs eval_path: "<main>"
|
6
|
+
assert PryByebug.check_file_context(TOPLEVEL_BINDING)
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_other_file_context
|
10
|
+
Pry.stubs eval_path: "something"
|
11
|
+
refute PryByebug.check_file_context(TOPLEVEL_BINDING)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class BreakpointsTest < Minitest::Test
|
4
|
+
|
5
|
+
def test_add_raises_argument_error
|
6
|
+
Pry.stubs eval_path: "something"
|
7
|
+
File.stubs :exist?
|
8
|
+
assert_raises(ArgumentError) do
|
9
|
+
PryByebug::Breakpoints.add("file", 1)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-byebug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- David Rodríguez
|
7
8
|
- Gopal Patel
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: pry
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- -
|
18
|
+
- - ~>
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.9.
|
20
|
+
version: 0.9.12
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
|
-
- -
|
25
|
+
- - ~>
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.9.
|
27
|
+
version: 0.9.12
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: byebug
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
32
|
- - ~>
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
34
|
+
version: 1.4.0
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
39
|
- - ~>
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
41
|
+
version: 1.4.0
|
41
42
|
- !ruby/object:Gem::Dependency
|
42
43
|
name: bundler
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,9 +53,52 @@ dependencies:
|
|
52
53
|
- - ~>
|
53
54
|
- !ruby/object:Gem::Version
|
54
55
|
version: 1.3.5
|
55
|
-
|
56
|
-
|
57
|
-
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 10.0.4
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 10.0.4
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: minitest
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 5.0.3
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 5.0.3
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: mocha
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 0.14.0
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 0.14.0
|
98
|
+
description: |-
|
99
|
+
Combine 'pry' with 'byebug'. Adds 'step', 'next', and
|
100
|
+
'continue' commands to control execution.
|
101
|
+
email: deivid.rodriguez@gmail.com
|
58
102
|
executables: []
|
59
103
|
extensions: []
|
60
104
|
extra_rdoc_files: []
|
@@ -75,6 +119,13 @@ files:
|
|
75
119
|
- lib/pry-byebug/pry_remote_ext.rb
|
76
120
|
- lib/pry-byebug/version.rb
|
77
121
|
- pry-byebug.gemspec
|
122
|
+
- test/base_test.rb
|
123
|
+
- test/breakpoints_test.rb
|
124
|
+
- test/commands_test.rb
|
125
|
+
- test/processor_test.rb
|
126
|
+
- test/pry_ext_test.rb
|
127
|
+
- test/pry_remote_ext_test.rb
|
128
|
+
- test/test_helper.rb
|
78
129
|
homepage: https://github.com/deivid-rodriguez/pry-byebug
|
79
130
|
licenses:
|
80
131
|
- MIT
|
@@ -99,4 +150,12 @@ rubygems_version: 2.0.3
|
|
99
150
|
signing_key:
|
100
151
|
specification_version: 4
|
101
152
|
summary: Fast debugging with Pry.
|
102
|
-
test_files:
|
153
|
+
test_files:
|
154
|
+
- test/base_test.rb
|
155
|
+
- test/breakpoints_test.rb
|
156
|
+
- test/commands_test.rb
|
157
|
+
- test/processor_test.rb
|
158
|
+
- test/pry_ext_test.rb
|
159
|
+
- test/pry_remote_ext_test.rb
|
160
|
+
- test/test_helper.rb
|
161
|
+
has_rdoc:
|