pry-stack_explorer 0.4.9.2 → 0.4.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/README.md +2 -81
- data/lib/pry-stack_explorer.rb +2 -1
- data/lib/pry-stack_explorer/commands.rb +1 -1
- data/lib/pry-stack_explorer/version.rb +1 -1
- data/pry-stack_explorer.gemspec +2 -6
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bb70a79cb849e48172099c2d9c3f5af036aef30
|
4
|
+
data.tar.gz: 20fa1752792193771ddffc61d3c366567cba14cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af459d4520f7939f5f89969329e5db9240c00ecefc9b66b4db046456f5f67241cd344ea72cf18d0772708587ce11ce059becf1158e4e657d6ebcf9fe9c79ee4a
|
7
|
+
data.tar.gz: bfc842c51b1314ea90f876e8b31609bb5ba36e0eaba2b89db041152cf95b8d5660abfe5b461f0b08cb344edac70fb62e8c120b0105ad2865e8bb88af3c6b5bc6
|
data/.travis.yml
CHANGED
@@ -1,9 +1,23 @@
|
|
1
1
|
script:
|
2
2
|
rake test --trace
|
3
3
|
|
4
|
+
before_install:
|
5
|
+
- gem update --system
|
6
|
+
|
4
7
|
rvm:
|
5
|
-
- 1.9.2
|
6
8
|
- 1.9.3
|
9
|
+
- 2.0
|
10
|
+
- 2.1.10
|
11
|
+
- 2.2.9
|
12
|
+
- 2.3.6
|
13
|
+
- 2.4.3
|
14
|
+
- 2.5.0
|
15
|
+
- ruby-head
|
16
|
+
|
17
|
+
matrix:
|
18
|
+
allow_failures:
|
19
|
+
- rmv: ruby-head
|
20
|
+
fast_finish: true
|
7
21
|
|
8
22
|
notifications:
|
9
23
|
irc: "irc.freenode.org#pry"
|
data/README.md
CHANGED
@@ -34,91 +34,12 @@ After installing `pry-stack_explorer`, just start Pry as normal (typically via a
|
|
34
34
|
Example: Moving around between frames
|
35
35
|
--------
|
36
36
|
|
37
|
-
|
38
|
-
[8] pry(J)> show-stack
|
39
|
-
|
40
|
-
Showing all accessible frames in stack:
|
41
|
-
--
|
42
|
-
=> #0 [method] c <Object#c()>
|
43
|
-
#1 [block] block in b <Object#b()>
|
44
|
-
#2 [method] b <Object#b()>
|
45
|
-
#3 [method] alphabet <Object#alphabet(y)>
|
46
|
-
#4 [class] <class:J>
|
47
|
-
#5 [block] block in <main>
|
48
|
-
#6 [eval] <main>
|
49
|
-
#7 [top] <main>
|
50
|
-
[9] pry(J)> frame 3
|
51
|
-
|
52
|
-
Frame number: 3/7
|
53
|
-
Frame type: method
|
54
|
-
|
55
|
-
From: /Users/john/ruby/projects/pry-stack_explorer/examples/example.rb @ line 10 in Object#alphabet:
|
56
|
-
|
57
|
-
5:
|
58
|
-
6: require 'pry-stack_explorer'
|
59
|
-
7:
|
60
|
-
8: def alphabet(y)
|
61
|
-
9: x = 20
|
62
|
-
=> 10: b
|
63
|
-
11: end
|
64
|
-
12:
|
65
|
-
13: def b
|
66
|
-
14: x = 30
|
67
|
-
15: proc {
|
68
|
-
[10] pry(J)> x
|
69
|
-
=> 20
|
70
|
-
```
|
37
|
+
[![asciicast](https://asciinema.org/a/eJnrZNaUhTl12AVtnCG304d0V.png)](https://asciinema.org/a/eJnrZNaUhTl12AVtnCG304d0V)
|
71
38
|
|
72
39
|
Example: Modifying state in a caller
|
73
40
|
-------
|
74
41
|
|
75
|
-
|
76
|
-
Frame number: 0/3
|
77
|
-
Frame type: method
|
78
|
-
|
79
|
-
From: /Users/john/ruby/projects/pry-stack_explorer/examples/example2.rb @ line 15 in Object#beta:
|
80
|
-
|
81
|
-
10: beta
|
82
|
-
11: puts x
|
83
|
-
12: end
|
84
|
-
13:
|
85
|
-
14: def beta
|
86
|
-
=> 15: binding.pry
|
87
|
-
16: end
|
88
|
-
17:
|
89
|
-
18: alpha
|
90
|
-
[1] pry(main)> show-stack
|
91
|
-
|
92
|
-
Showing all accessible frames in stack:
|
93
|
-
--
|
94
|
-
=> #0 [method] beta <Object#beta()>
|
95
|
-
#1 [method] alpha <Object#alpha()>
|
96
|
-
#2 [eval] <main>
|
97
|
-
#3 [top] <main>
|
98
|
-
[2] pry(main)> up
|
99
|
-
|
100
|
-
Frame number: 1/3
|
101
|
-
Frame type: method
|
102
|
-
|
103
|
-
From: /Users/john/ruby/projects/pry-stack_explorer/examples/example2.rb @ line 10 in Object#alpha:
|
104
|
-
|
105
|
-
5:
|
106
|
-
6:
|
107
|
-
7:
|
108
|
-
8: def alpha
|
109
|
-
9: x = "hello"
|
110
|
-
=> 10: beta
|
111
|
-
11: puts x
|
112
|
-
12: end
|
113
|
-
13:
|
114
|
-
14: def beta
|
115
|
-
15: binding.pry
|
116
|
-
[3] pry(main)> x = "goodbye"
|
117
|
-
=> "goodbye"
|
118
|
-
[4] pry(main)> ^D
|
119
|
-
|
120
|
-
OUTPUT: goodbye
|
121
|
-
```
|
42
|
+
[![asciicast](https://asciinema.org/a/0KtCL9HB1bP08wNHLfIeOMa8K.png)](https://asciinema.org/a/0KtCL9HB1bP08wNHLfIeOMa8K)
|
122
43
|
|
123
44
|
Output from above is `goodbye` as we changed the `x` local inside the `alpha` (caller) stack frame.
|
124
45
|
|
data/lib/pry-stack_explorer.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# pry-stack_explorer.rb
|
2
2
|
# (C) John Mair (banisterfiend); MIT license
|
3
3
|
|
4
|
+
require "pry" unless defined?(::Pry)
|
4
5
|
require "pry-stack_explorer/version"
|
5
6
|
require "pry-stack_explorer/commands"
|
6
7
|
require "pry-stack_explorer/frame_manager"
|
@@ -125,7 +126,7 @@ Pry.config.commands.import PryStackExplorer::Commands
|
|
125
126
|
|
126
127
|
# monkey-patch the whereami command to show some frame information,
|
127
128
|
# useful for navigating stack.
|
128
|
-
Pry.config.
|
129
|
+
Pry.config.hooks.add_hook(:before_whereami, :stack_explorer) do
|
129
130
|
if PryStackExplorer.frame_manager(_pry_) && !internal_binding?(target)
|
130
131
|
bindings = PryStackExplorer.frame_manager(_pry_).bindings
|
131
132
|
binding_index = PryStackExplorer.frame_manager(_pry_).binding_index
|
data/pry-stack_explorer.gemspec
CHANGED
@@ -1,19 +1,15 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: pry-stack_explorer 0.4.9.2 ruby lib
|
3
|
-
|
4
1
|
Gem::Specification.new do |s|
|
5
2
|
s.name = "pry-stack_explorer"
|
6
|
-
s.version = "0.4.9.
|
3
|
+
s.version = "0.4.9.3"
|
7
4
|
|
8
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
6
|
s.authors = ["John Mair (banisterfiend)"]
|
10
|
-
s.date =
|
7
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
11
8
|
s.description = "Walk the stack in a Pry session"
|
12
9
|
s.email = "jrmair@gmail.com"
|
13
10
|
s.files = [".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "Gemfile", "LICENSE", "README.md", "Rakefile", "examples/example.rb", "examples/example2.rb", "examples/example3.rb", "lib/pry-stack_explorer.rb", "lib/pry-stack_explorer/commands.rb", "lib/pry-stack_explorer/frame_manager.rb", "lib/pry-stack_explorer/version.rb", "lib/pry-stack_explorer/when_started_hook.rb", "pry-stack_explorer.gemspec", "test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack_explorer.rb", "tester.rb"]
|
14
11
|
s.homepage = "https://github.com/pry/pry-stack_explorer"
|
15
12
|
s.require_paths = ["lib"]
|
16
|
-
s.rubygems_version = "2.1.11"
|
17
13
|
s.summary = "Walk the stack in a Pry session"
|
18
14
|
s.test_files = ["test/helper.rb", "test/test_commands.rb", "test/test_frame_manager.rb", "test/test_stack_explorer.rb"]
|
19
15
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-stack_explorer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.9.
|
4
|
+
version: 0.4.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mair (banisterfiend)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.9.11
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.9.11
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bacon
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.1.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.1.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.9'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.9'
|
69
69
|
description: Walk the stack in a Pry session
|
@@ -72,10 +72,10 @@ executables: []
|
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
|
-
- .gemtest
|
76
|
-
- .gitignore
|
77
|
-
- .travis.yml
|
78
|
-
- .yardopts
|
75
|
+
- ".gemtest"
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
78
|
+
- ".yardopts"
|
79
79
|
- CHANGELOG
|
80
80
|
- Gemfile
|
81
81
|
- LICENSE
|
@@ -104,17 +104,17 @@ require_paths:
|
|
104
104
|
- lib
|
105
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.6.13
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Walk the stack in a Pry session
|