pryx 0.2.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/irbx +12 -0
- data/bin/pryx +14 -0
- data/lib/pry-state/hook_action.rb +61 -0
- data/lib/pry-state/printer.rb +51 -0
- data/lib/pry-state.rb +7 -0
- data/lib/pry-yes.rb +37 -0
- data/lib/pryx/ap_hack.rb +3 -3
- data/lib/pryx/background.rb +20 -0
- data/lib/pryx/break_hack.rb +4 -0
- data/lib/pryx/irb_hack.rb +46 -0
- data/lib/pryx/pry_hack.rb +49 -74
- data/lib/pryx/version.rb +1 -1
- data/lib/pryx.rb +3 -0
- data/lib/pryx_irb.rb +11 -0
- metadata +41 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a6ae2e11955f264a9c73ecf4b11b06be4449e5ca5700010e8d1cb0790cee06b
|
4
|
+
data.tar.gz: 5bb01a1eb5eb2115ef31711a8d160afa25abaf0677b1172b2a383bbcc53d279c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78b9fe62e3330c1b8619f8638f7d5121e4e9806eee6e5e242d9e91cb572c238462761bd9fcde671c882cd806e5b5559bcf93ddfb7228f250d014ce386c436e5c
|
7
|
+
data.tar.gz: 6c68b315d94c28d7dba89d87e548b52fe3506dcecea7660571a7dd7eb41bf7b3cc835ce34bc2a05e04756d8d0e3343e5c1b5ea9938e7bb46750889e239e6c43e
|
data/bin/irbx
ADDED
data/bin/pryx
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# (C) John Mair (banisterfiend)
|
5
|
+
# MIT license
|
6
|
+
|
7
|
+
$0 = 'pry'
|
8
|
+
|
9
|
+
require 'pry'
|
10
|
+
require 'pryx'
|
11
|
+
|
12
|
+
# Process command line options and run Pry
|
13
|
+
opts = Pry::CLI.parse_options
|
14
|
+
Pry::CLI.start(opts)
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'pry-state/printer'
|
2
|
+
|
3
|
+
class HookAction
|
4
|
+
IGNORABLE_LOCAL_VARS = [:__, :_, :_ex_, :_pry_, :_out_, :_in_, :_dir_, :_file_]
|
5
|
+
|
6
|
+
CONTROLLER_INSTANCE_VARIABLES = [:@_request, :@_response, :@_routes]
|
7
|
+
RSPEC_INSTANCE_VARIABLES = [:@__inspect_output, :@__memoized]
|
8
|
+
IGNORABLE_INSTANCE_VARS = CONTROLLER_INSTANCE_VARIABLES + RSPEC_INSTANCE_VARIABLES
|
9
|
+
IGNORABLE_GLOBAL_VARS = [:$@]
|
10
|
+
|
11
|
+
def initialize binding, pry
|
12
|
+
@binding, @pry = binding, pry
|
13
|
+
end
|
14
|
+
|
15
|
+
def act
|
16
|
+
if ENV['SHOW_GLOBAL_VARIABLES']
|
17
|
+
(binding.eval('global_variables').sort - IGNORABLE_GLOBAL_VARS).each do |var|
|
18
|
+
eval_and_print var, var_color: 'white', value_colore: 'yellow'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
unless ENV['HIDE_INSTANCE_VARIABLES']
|
23
|
+
(binding.eval('instance_variables').sort - IGNORABLE_INSTANCE_VARS).each do |var|
|
24
|
+
eval_and_print var, var_color: 'green'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
unless ENV['HIDE_LOCAL_VARIABLES']
|
29
|
+
(binding.eval('local_variables').sort - IGNORABLE_LOCAL_VARS).each do |var|
|
30
|
+
eval_and_print var, var_color: 'cyan'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
attr_reader :binding, :pry
|
37
|
+
|
38
|
+
def eval_and_print var, var_color: 'green', value_color: 'white'
|
39
|
+
value = binding.eval(var.to_s)
|
40
|
+
if value_changed? var, value
|
41
|
+
var_color = "bright_#{var_color}"; value_color = 'bright_yellow'
|
42
|
+
end
|
43
|
+
PryState::Printer.trunc_and_print var, value, var_color, value_color
|
44
|
+
stick_value! var, value # to refer the value in next
|
45
|
+
end
|
46
|
+
|
47
|
+
def value_changed? var, value
|
48
|
+
prev_state[var] and prev_state[var] != value
|
49
|
+
end
|
50
|
+
|
51
|
+
def stick_value! var, value
|
52
|
+
prev_state[var] = value
|
53
|
+
end
|
54
|
+
|
55
|
+
def prev_state
|
56
|
+
# init a hash to store state to be used in next session
|
57
|
+
# in finding diff
|
58
|
+
pry.config.extra_sticky_locals[:pry_state_prev] ||= {}
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module PryState
|
2
|
+
module Printer
|
3
|
+
extend self
|
4
|
+
|
5
|
+
WIDTH = ENV['COLUMNS'] ? ENV['COLUMNS'].to_i : 80
|
6
|
+
MAX_LEFT_COLUMN_WIDTH = 25
|
7
|
+
# Ratios are 1:3 left:right, or 1/4 left
|
8
|
+
COLUMN_RATIO = 3 # right column to left ratio
|
9
|
+
LEFT_COLUMN_WIDTH = [(WIDTH / (COLUMN_RATIO + 1)).floor, MAX_LEFT_COLUMN_WIDTH].min
|
10
|
+
|
11
|
+
# Defaults to true
|
12
|
+
TRUNCATE = ENV['PRY_STATE_TRUNCATE'] != 'false'
|
13
|
+
|
14
|
+
def trunc_and_print var, value, var_color, value_color
|
15
|
+
var_name_adjusted = var.to_s.ljust(LEFT_COLUMN_WIDTH)
|
16
|
+
# Ensure at least 1 space between left and right columns
|
17
|
+
left_column_text = truncate(var_name_adjusted, LEFT_COLUMN_WIDTH - 1) + ' '
|
18
|
+
print Pry::Helpers::Text.send(var_color, left_column_text)
|
19
|
+
print stringified_val_or_nil(value, value_color, WIDTH - LEFT_COLUMN_WIDTH)
|
20
|
+
print "\n"
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
def truncate text, length
|
25
|
+
if text.nil? then return end
|
26
|
+
return text unless ENV['TRUNCATE']
|
27
|
+
l = length - "...".length
|
28
|
+
(text.chars.to_a.size > length ? text.chars.to_a[0...l].join + "..." : text).to_s
|
29
|
+
end
|
30
|
+
|
31
|
+
def stringified_val_or_nil value, color, length
|
32
|
+
value = stringify_value value
|
33
|
+
if value.empty?
|
34
|
+
Pry::Helpers::Text.red 'nil'
|
35
|
+
else
|
36
|
+
text = truncate(value, length)
|
37
|
+
Pry::Helpers::Text.send(color, text)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def stringify_value value
|
42
|
+
if value.class == String
|
43
|
+
"\"#{value}\""
|
44
|
+
elsif value.class == Array
|
45
|
+
"len:#{value.count} #{value.inspect}"
|
46
|
+
else
|
47
|
+
value.inspect
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/lib/pry-state.rb
ADDED
data/lib/pry-yes.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
Pry::Commands.create_command "yes" do
|
2
|
+
description 'Re-runs previous command with "Did you mean?" suggestion.'
|
3
|
+
def options(opt)
|
4
|
+
opt.on :d, :debug, 'Debug mode.'
|
5
|
+
end
|
6
|
+
|
7
|
+
def process
|
8
|
+
ex = target.eval("defined?(_ex_) and _ex_")
|
9
|
+
return unless ex && ex.message.include?("Did you mean?")
|
10
|
+
|
11
|
+
matched_exception = ex.message.match(
|
12
|
+
/undefined.*`(.*)'|uninitialized constant (.*)\n/)
|
13
|
+
return unless matched_exception
|
14
|
+
|
15
|
+
typo = matched_exception.captures.compact.first
|
16
|
+
return unless typo
|
17
|
+
|
18
|
+
typo_guess = ex.message.split('Did you mean? ').last.split.first
|
19
|
+
last_command = Pry.history.to_a[-2]
|
20
|
+
guessed_command = last_command.gsub(typo, typo_guess)
|
21
|
+
|
22
|
+
pry_instance.input = StringIO.new(guessed_command)
|
23
|
+
rescue => e
|
24
|
+
# Schhh
|
25
|
+
raise e if opts.present?(:debug)
|
26
|
+
ensure
|
27
|
+
if opts.present?(:debug)
|
28
|
+
puts "matched_exception: #{matched_exception}"
|
29
|
+
puts "typo: #{typo}"
|
30
|
+
puts "typo_guess: #{typo_guess}"
|
31
|
+
puts "last_command: #{last_command}"
|
32
|
+
puts "guessed_command: #{guessed_command}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module PryYes; end
|
data/lib/pryx/ap_hack.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
module Pryx::Background
|
2
|
+
# 如果是前台进程,则这个进程的组ID(pgid)一定会等于当前 terminal 的gid (tpgid)
|
3
|
+
# 否则,如果不等,那么就是后台进程。
|
4
|
+
# system("\\cat /proc/#{pid}/stat |awk '$5==$8 {exit 1}'")
|
5
|
+
def self.background?(pid=$$)
|
6
|
+
# 这个实现似乎有错, 因为针对 nohup 1.rb& 这种情况,返回为前台进程。
|
7
|
+
# 执行 reverse 再处理,是因为要考虑文件名包含空格因素。例如:‘hello) (world’
|
8
|
+
# ary = File.read("/proc/#{pid}/stat").split(' ').reverse
|
9
|
+
# is_bg = (ary[46] != ary[48])
|
10
|
+
|
11
|
+
# 这个实现依赖于一些 linux 下基本工具,但是准确
|
12
|
+
is_bg = system("ps -e -o pid,pgid,tpgid |grep '^\s*#{pid}' |awk '$2==$3 {exit 1}'")
|
13
|
+
|
14
|
+
is_bg && !$stdout.tty?
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.foreground?(pid=$$)
|
18
|
+
not background?(pid)
|
19
|
+
end
|
20
|
+
end
|
data/lib/pryx/break_hack.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'binding_of_caller'
|
2
|
+
|
3
|
+
class Binding
|
4
|
+
def _irb(_host=nil)
|
5
|
+
warn '[1m[33mloading irb ...[0m'
|
6
|
+
|
7
|
+
if defined? Break and defined? IRB
|
8
|
+
# This is need for work with looksee better.
|
9
|
+
# See discuss on https://github.com/oggy/looksee/issues/57
|
10
|
+
IRB.conf[:USE_COLORIZE] = false
|
11
|
+
else
|
12
|
+
warn "For work with Break and Looksee, please set
|
13
|
+
export RUBYOPT='-rpryx_irb'
|
14
|
+
instead of
|
15
|
+
export RUBYOPT='-rpryx'
|
16
|
+
"
|
17
|
+
end
|
18
|
+
|
19
|
+
self.irb
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
module Kernel
|
24
|
+
def irb!
|
25
|
+
return unless ENV['IRB_was_started'].nil?
|
26
|
+
|
27
|
+
ENV['IRB_was_started'] = 'true'
|
28
|
+
|
29
|
+
binding.of_caller(1)._irb
|
30
|
+
end
|
31
|
+
|
32
|
+
def reirb!
|
33
|
+
ENV['IRB_was_started'] = nil
|
34
|
+
end
|
35
|
+
|
36
|
+
def irb1
|
37
|
+
ENV['IRB2_should_start'] = 'true'
|
38
|
+
end
|
39
|
+
|
40
|
+
def irb2(caller=1, remote: nil, port: 9876)
|
41
|
+
if ENV['IRB2_should_start'] == 'true'
|
42
|
+
ENV['IRB2_should_start'] = nil
|
43
|
+
binding.of_caller(caller)._irb
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/pryx/pry_hack.rb
CHANGED
@@ -9,10 +9,27 @@ class Binding
|
|
9
9
|
else
|
10
10
|
require 'pry'
|
11
11
|
end
|
12
|
+
|
12
13
|
require 'pryx/ap_hack'
|
14
|
+
|
13
15
|
require 'pryx/break_hack'
|
16
|
+
|
17
|
+
require 'pry-power_assert'
|
18
|
+
|
19
|
+
require 'pry-doc'
|
20
|
+
|
21
|
+
require 'pry-yes'
|
22
|
+
Pry.commands.alias_command 'y', 'yes'
|
23
|
+
|
24
|
+
require 'pry-hier'
|
25
|
+
|
26
|
+
require 'pry-aa_ancestors'
|
27
|
+
Pry::Commands.alias_command 'aa', 'aa_ancestors'
|
28
|
+
|
14
29
|
# 这个必须在最后才有效, 但是目前存在一个问题,就是会将 pry3, pry! 加入 stacks
|
15
|
-
|
30
|
+
# stack 显示 stack 的列表,frame 显示当前所在 stack, stack N 也可以根据数字跳转到 N
|
31
|
+
require 'pry-stack_explorer' # Support: up, down, bottom, top, stack, frame
|
32
|
+
|
16
33
|
|
17
34
|
Pry::Commands.block_command 'cc', 'Continue, but stop in pry! breakpoint' do
|
18
35
|
Pry.instance_variable_set(:@initial_session, true)
|
@@ -29,38 +46,20 @@ class Binding
|
|
29
46
|
self.pry
|
30
47
|
end
|
31
48
|
end
|
32
|
-
|
33
|
-
def _irb(_host=nil)
|
34
|
-
warn '[1m[33mloading irb ...[0m'
|
35
|
-
|
36
|
-
IRB.conf[:USE_COLORIZE] = false
|
37
|
-
|
38
|
-
self.irb
|
39
|
-
end
|
40
49
|
end
|
41
50
|
|
42
51
|
module Kernel
|
43
52
|
# 运行 pry! 会被拦截, 且只会被拦截一次.
|
44
|
-
def pry!(
|
53
|
+
def pry!(remote: nil, port: 9876)
|
45
54
|
return unless ENV['Pry_was_started'].nil?
|
46
55
|
|
47
56
|
ENV['Pry_was_started'] = 'true'
|
48
57
|
|
49
|
-
|
50
|
-
remote = '0.0.0.0'
|
51
|
-
port = 9876
|
52
|
-
end
|
53
|
-
|
54
|
-
pry3(caller, remote: remote, port: port)
|
58
|
+
pry3(2, remote: remote, port: port)
|
55
59
|
|
56
60
|
# 这里如果有代码, 将会让 pry! 进入这个方法, 因此保持为空.
|
57
61
|
end
|
58
62
|
|
59
|
-
# 注意:pryr 总是会被拦截。
|
60
|
-
def pryr
|
61
|
-
pry3(caller=2, remote: '0.0.0.0', port: 9876)
|
62
|
-
end
|
63
|
-
|
64
63
|
# 在 pry! 之前如果输入这个,会让下次执行的 pry! 被拦截一次, 而不管之前是否有执行过 pry!
|
65
64
|
def repry!
|
66
65
|
ENV['Pry_was_started'] = nil
|
@@ -68,13 +67,13 @@ module Kernel
|
|
68
67
|
|
69
68
|
# 和 pry! 的差别就是,pry? 使用 pry-state 插件输出当前 context 的很多变量内容。
|
70
69
|
# 注意:不需要总是开启 pry-state,因为有时候会输出太多内容,造成刷屏。
|
71
|
-
def pry?(
|
70
|
+
def pry?(remote: nil, port: 9876)
|
72
71
|
return unless ENV['Pry_was_started'].nil?
|
73
72
|
|
74
73
|
require 'pry-state'
|
75
74
|
ENV['Pry_was_started'] = 'true'
|
76
75
|
|
77
|
-
pry3(
|
76
|
+
pry3(2, remote: remote, port: port)
|
78
77
|
|
79
78
|
# 这里如果有代码, 将会让 pry! 进入这个方法, 因此保持为空.
|
80
79
|
end
|
@@ -82,6 +81,8 @@ module Kernel
|
|
82
81
|
# 等价于默认的 binding.pry, 会反复被拦截。
|
83
82
|
# 起成 pry3 这个名字,也是为了方便直接使用。
|
84
83
|
def pry3(caller=1, remote: nil, port: 9876)
|
84
|
+
remote = '0.0.0.0' if Pryx::Background.background?
|
85
|
+
|
85
86
|
binding.of_caller(caller)._pry(remote, port)
|
86
87
|
end
|
87
88
|
|
@@ -94,75 +95,49 @@ module Kernel
|
|
94
95
|
|
95
96
|
def pry2(caller=1, remote: nil, port: 9876)
|
96
97
|
if ENV['Pry2_should_start'] == 'true'
|
97
|
-
# 首先恢复 Pry2_is_start 为未启动, 避免稍后的 pry2 再次被拦截.
|
98
98
|
ENV['Pry2_should_start'] = nil
|
99
99
|
binding.of_caller(caller)._pry(remote, port)
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
103
|
-
def
|
104
|
-
|
105
|
-
end
|
106
|
-
|
107
|
-
def irb!
|
108
|
-
return unless ENV['IRB_was_started'].nil?
|
109
|
-
|
110
|
-
ENV['IRB_was_started'] = 'true'
|
111
|
-
|
112
|
-
binding.of_caller(1)._irb
|
113
|
-
end
|
103
|
+
def notify_send(msg)
|
104
|
+
system("notify-send \"#{msg}\"") if system 'which notify-send &>/dev/null'
|
114
105
|
|
115
|
-
|
116
|
-
|
106
|
+
system('aplay "#{__dir__}/drip.wav" &>/dev/null') if system 'which aplay &>/dev/null'
|
107
|
+
warn "[1m[33m#{msg}[0m"
|
117
108
|
end
|
109
|
+
end
|
118
110
|
|
119
|
-
|
120
|
-
|
121
|
-
# 首先恢复 Pry2_is_start 为未启动, 避免稍后的 pry2 再次被拦截.
|
122
|
-
ENV['IRB2_should_start'] = nil
|
123
|
-
binding.of_caller(caller)._irb
|
124
|
-
end
|
125
|
-
end
|
111
|
+
# Hack for roda/rails, 在每一次发送请求之前,总是设定 ENV['Pry_was_started'] to nil.
|
112
|
+
# 这可以确保,pry! 总是会被拦截,但是仅仅只会被拦截一次。
|
126
113
|
|
127
|
-
|
128
|
-
|
129
|
-
# system("ps -e -o pid,pgid,tpgid |grep '^\s*#{pid}' |awk '$2==$3 {exit 1}'")
|
130
|
-
# system("\\cat /proc/#{pid}/stat |awk '$5==$8 {exit 1}'")
|
131
|
-
def background?(pid=$$)
|
132
|
-
# 考虑是否需要验证
|
133
|
-
ary = File.read("/proc/#{pid}/stat").split(' ').reverse
|
134
|
-
# 执行 reverse 再处理,是因为要考虑文件名包含空格因素。例如:‘hello) (world’
|
135
|
-
(ary[46] != ary[48]) && !$stdout.tty?
|
136
|
-
end
|
114
|
+
class Pryx::PryHackForRodaRailsMiddleware
|
115
|
+
attr_reader :app
|
137
116
|
|
138
|
-
def
|
139
|
-
|
117
|
+
def initialize(app)
|
118
|
+
@app = app
|
140
119
|
end
|
141
120
|
|
142
|
-
def
|
143
|
-
|
144
|
-
|
145
|
-
system('aplay "#{__dir__}/drip.wav" &>/dev/null') if system 'which aplay &>/dev/null'
|
146
|
-
warn "[1m[33m#{msg}[0m"
|
121
|
+
def call(env)
|
122
|
+
ENV['Pry_was_started'] = nil
|
123
|
+
@app.call(env)
|
147
124
|
end
|
148
125
|
end
|
149
126
|
|
150
|
-
# Hack roda, 在每一次发送请求之前,总是设定 ENV['Pry_was_started'] to nil.
|
151
|
-
# 这可以确保,pry! 总是会被拦截,但是仅仅只会被拦截一次。
|
152
127
|
begin
|
153
128
|
require 'roda'
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
def initialize(app)
|
158
|
-
@app = app
|
159
|
-
end
|
129
|
+
Roda.use Pryx::PryHackForRodaRailsMiddleware
|
130
|
+
rescue LoadError
|
131
|
+
end
|
160
132
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
133
|
+
begin
|
134
|
+
require 'active_support/lazy_load_hooks'
|
135
|
+
ActiveSupport.on_load(:before_configuration) do
|
136
|
+
# because exits less command error when use in container, use irb instead.
|
137
|
+
# require 'pry'
|
138
|
+
# require 'pryx'
|
139
|
+
# Rails.application.config.console = Pry
|
140
|
+
Rails.application.config.middleware.use Pryx::PryHackForRodaRailsMiddleware
|
165
141
|
end
|
166
|
-
Roda.use PryHackRodaMiddleware
|
167
142
|
rescue LoadError
|
168
143
|
end
|
data/lib/pryx/version.rb
CHANGED
data/lib/pryx.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'pryx/version'
|
4
|
+
require 'pryx/background'
|
4
5
|
require 'pryx/trap_backtrace'
|
5
6
|
require 'pryx/looksee_hack'
|
6
7
|
require 'pryx/pry_hack'
|
8
|
+
require 'pryx/irb_hack'
|
7
9
|
|
8
10
|
# Add the non-bundler managermented gems back
|
9
11
|
# this step is necessory when install pryx in docker-compose
|
10
12
|
ENV['RUBYLIB'] = $LOAD_PATH.grep(/gems/).join(':')
|
11
13
|
|
14
|
+
# set export RUBYOPT+=" -rpryx" to work with pryx.
|
12
15
|
module Pryx
|
13
16
|
end
|
data/lib/pryx_irb.rb
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# We need apply those hack before irb was loaded for work with irb.
|
2
|
+
# So we have to add it here, same hacks for Pry is add to method
|
3
|
+
# Binding#_pry which defined in lib/pryx/pry_hack.rb
|
4
|
+
|
5
|
+
# we need set `export RUBYOPT+=" -rpryx_irb"` instead of `-rpryx` to make
|
6
|
+
# irb work with break and ap gem.
|
7
|
+
|
8
|
+
# ap_hack 可以确保,当时用 irb! 的时候,输入代码是彩色的,并且 looksee 也正常显示
|
9
|
+
# 但是,ap_hack 不可以放到 break_hack 后面,否则会失效。
|
10
|
+
# WARN: 下面两行代码顺序不要换。
|
1
11
|
require 'pryx/ap_hack'
|
2
12
|
require 'pryx/break_hack'
|
13
|
+
|
3
14
|
require 'pryx'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pryx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Billy.Zheng(zw963)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.0.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-hier
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.1'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.1'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-aa_ancestors
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: pry-stack_explorer
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,13 +168,17 @@ description: ''
|
|
140
168
|
email:
|
141
169
|
- vil963@gmail.com
|
142
170
|
executables:
|
171
|
+
- irbx
|
143
172
|
- pry!
|
173
|
+
- pryx
|
144
174
|
extensions: []
|
145
175
|
extra_rdoc_files: []
|
146
176
|
files:
|
147
177
|
- LICENSE
|
148
178
|
- README.md
|
179
|
+
- bin/irbx
|
149
180
|
- bin/pry!
|
181
|
+
- bin/pryx
|
150
182
|
- lib/break/pry/extensions.rb
|
151
183
|
- lib/pry-byebug.rb
|
152
184
|
- lib/pry-byebug/WARN
|
@@ -157,10 +189,16 @@ files:
|
|
157
189
|
- lib/pry-disasm.rb
|
158
190
|
- lib/pry-disasm/commands.rb
|
159
191
|
- lib/pry-remote.rb
|
192
|
+
- lib/pry-state.rb
|
193
|
+
- lib/pry-state/hook_action.rb
|
194
|
+
- lib/pry-state/printer.rb
|
195
|
+
- lib/pry-yes.rb
|
160
196
|
- lib/pryx.rb
|
161
197
|
- lib/pryx/ap_hack.rb
|
198
|
+
- lib/pryx/background.rb
|
162
199
|
- lib/pryx/break_hack.rb
|
163
200
|
- lib/pryx/drip.wav
|
201
|
+
- lib/pryx/irb_hack.rb
|
164
202
|
- lib/pryx/looksee_hack.rb
|
165
203
|
- lib/pryx/pry_hack.rb
|
166
204
|
- lib/pryx/trap_backtrace.rb
|
@@ -189,5 +227,5 @@ requirements: []
|
|
189
227
|
rubygems_version: 3.3.3
|
190
228
|
signing_key:
|
191
229
|
specification_version: 4
|
192
|
-
summary:
|
230
|
+
summary: pry extension tools!
|
193
231
|
test_files: []
|