pryx 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f026b0034b9947eee339d8063f5fb839e747637e2a42ba3f64b337a2851eb86
4
- data.tar.gz: a9f544c647ef0c0a9f844d72c20fd3a2b3b754c44c0186edce2a5de080a55629
3
+ metadata.gz: d4f8e26858d1dfc13351ca2e8287a4aae69a1be7bf123f98ff7556f006a706a2
4
+ data.tar.gz: c921a886c8a596e129037bf74c8837a97e2d934b7943aa78b923945c6cc04855
5
5
  SHA512:
6
- metadata.gz: cab620e8b026be0f92d73615cc3770dac0eb3932d20817da429a743a41e9395a3068ea0189884c7d38b0978d9204eeef0862085a50323b2991941292231aea66
7
- data.tar.gz: '09f1655674251316bcdc7ae12cf6ce4b0cebc636b6c1f296c9f12028893b52c884a6260a2f06b43fff6efabb85785970e0d58f58a652da2915bb1e4c54504e90'
6
+ metadata.gz: 734080308ca63da288f250c333c60fece9de7d29612f705953859f78241768bfcacb2c7ef7a5e414f54f65d9eacc99c16508f91230de8ad8bfb90cb72c21e250
7
+ data.tar.gz: 429e9841ff95fa3327b1c48f39c588f6fac4c0b5d418589ab1723f15e29f183ab10114ba81df96b027af63615152f05a21c8876776597651d9b4f23eb4dab686
data/README.md CHANGED
@@ -9,6 +9,8 @@ Don't add this gem into bundler's Gemfile.
9
9
  Instead, install it directly via RubyGems
10
10
 
11
11
  $ gem install pryx
12
+
13
+ Then use can use pryx cross all your's project.
12
14
 
13
15
  ## Usage
14
16
 
@@ -30,9 +32,32 @@ $: RUBYOPT+='-rpryx' ruby your_file.rb # add pry! in your_file for start pry se
30
32
 
31
33
  Then, try add `pry!` into your's ruby code, then run it, have fun!
32
34
 
33
- ## useful command add directly to Kernel#
35
+ Following is a example, assume we have test.rb, it content like this:
36
+
37
+ ```rb
38
+ # test.rb
39
+ 3.times do
40
+ pry!
41
+ puts 'hello'
42
+ end
43
+ ```
44
+
45
+ Then, when you run `RUBYOPT='-rpryx' ruby test.rb`
46
+
47
+ ![pry.png](images/pry!.png)
48
+
49
+ You can even connect to a pry session started from remote or background process
50
+ use http connection.
51
+
52
+ ![pry_remote.png](images/pry_remote.png)
53
+
54
+
55
+ Until now, you've only seen the tip of the iceberg, please have a try.
56
+
57
+
58
+ ## useful command which added directly to Kernel#
34
59
 
35
- ### pry!
60
+ ### Kernel#pry!
36
61
 
37
62
  start a pry session, this session only can be intercept once if add into a loop.
38
63
  when used with a rails/roda web server, it only intercept one per request.
@@ -61,7 +86,7 @@ Following feature only available when start a Pry session:
61
86
  6. add `up/down/frame/stack` command, see [pry-stack_explorer](https://github.com/pry/pry-stack_explorer)
62
87
  2. add `yes` or `y` command, see [pry-yes](https://github.com/christofferh/pry-yes)
63
88
 
64
- ### pry1 pry2 (sorry for this bad name, please create a issue you have a better one)
89
+ ### Kernel#pry1 Kernel#pry2 (sorry for this bad name, please create a issue you have a better one)
65
90
 
66
91
  pry2 do nothing, but it will be interceptd and start a pry session only after pry1 is running.
67
92
 
@@ -69,26 +94,26 @@ I haven use this hack for avoid pry session start on working place.
69
94
 
70
95
  You know what i means.
71
96
 
72
- ### irb1 irb2
97
+ ### Kernel#irb1 Kernel#irb2
73
98
 
74
99
  IRB equivalent for pry1, pry2
75
100
  we have irb1 and irb2 too.
76
101
 
77
- ### pry3
102
+ ### Kernel#pry3
78
103
 
79
104
  It just normal `binding.pry`, that is, will always be intercept if code can reach.
80
105
  but above plugins and libraries all correct configured.
81
106
 
82
107
  we have another Kernel#pry?, which enable `pry-state` automatically, see [pry-state](https://github.com/SudhagarS/pry-state)
83
108
 
84
- ### we have 3 binary, pryx, irbx, pry! installed
109
+ ### We add three command line command, pryx, irbx, pry!
85
110
 
86
111
  pryx is same as pry, but, with plugins and libraries correct configured.
87
112
 
88
113
  irbx is same things for irb.
89
114
 
90
- pry! is same as pry-remote command, when `pry!` was intercepted in a background process,
91
- you can run pry! in terminal connnect to it.
115
+ pry! just a alias to `pry-remote` command, when `Kernel#pry!` was intercepted in a background process,
116
+ you can run `pry!` directly in terminal connect to it.
92
117
 
93
118
  if your's pry-remote server started background on another host, or on a container, you man need
94
119
  specify hostname and port, e.g. connnect to 192.168.1.100, with port 9876
@@ -104,7 +129,7 @@ But, you should only use it when development, though, it was tested when use in
104
129
 
105
130
  ## Support
106
131
 
107
- * MRI 2.2+
132
+ * MRI 2.6+
108
133
 
109
134
  ## History
110
135
 
data/lib/pry-disasm.rb CHANGED
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  require 'pry'
4
2
  require 'pry-disasm/commands'
5
3
 
data/lib/pryx/pry_hack.rb CHANGED
@@ -11,31 +11,8 @@ class Binding
11
11
  end
12
12
 
13
13
  require 'pryx/ap_hack'
14
-
15
14
  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
-
29
- # 这个必须在最后才有效, 但是目前存在一个问题,就是会将 pry3, pry! 加入 stacks
30
- # stack 显示 stack 的列表,frame 显示当前所在 stack, stack N 也可以根据数字跳转到 N
31
- require 'pry-stack_explorer' # Support: up, down, bottom, top, stack, frame
32
-
33
-
34
- Pry::Commands.block_command 'cc', 'Continue, but stop in pry! breakpoint' do
35
- Pry.instance_variable_set(:@initial_session, true)
36
- ENV['Pry_was_started'] = nil
37
- throw(:breakout)
38
- end
15
+ require 'pryx/pry_plugins'
39
16
 
40
17
  if host
41
18
  notify_send('loading remote pry ...')
@@ -0,0 +1,21 @@
1
+ require 'pry-power_assert'
2
+
3
+ require 'pry-doc'
4
+
5
+ require 'pry-yes'
6
+ Pry.commands.alias_command 'y', 'yes'
7
+
8
+ require 'pry-hier'
9
+
10
+ require 'pry-aa_ancestors'
11
+ Pry::Commands.alias_command 'aa', 'aa_ancestors'
12
+
13
+ # 这个必须在最后才有效, 但是目前存在一个问题,就是会将 pry3, pry! 加入 stacks
14
+ # stack 显示 stack 的列表,frame 显示当前所在 stack, stack N 也可以根据数字跳转到 N
15
+ require 'pry-stack_explorer' # Support: up, down, bottom, top, stack, frame
16
+
17
+ Pry::Commands.block_command 'cc', 'Continue, but stop in pry! breakpoint' do
18
+ Pry.instance_variable_set(:@initial_session, true)
19
+ ENV['Pry_was_started'] = nil
20
+ throw(:breakout)
21
+ end
data/lib/pryx/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pryx
4
- VERSION = [0, 4, 4]
4
+ VERSION = [0, 5, 0]
5
5
 
6
6
  class << VERSION
7
7
  include Comparable
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pryx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Billy.Zheng(zw963)
@@ -201,6 +201,7 @@ files:
201
201
  - lib/pryx/irb_hack.rb
202
202
  - lib/pryx/looksee_hack.rb
203
203
  - lib/pryx/pry_hack.rb
204
+ - lib/pryx/pry_plugins.rb
204
205
  - lib/pryx/trap_backtrace.rb
205
206
  - lib/pryx/version.rb
206
207
  - lib/pryx_irb.rb
@@ -217,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
218
  requirements:
218
219
  - - ">="
219
220
  - !ruby/object:Gem::Version
220
- version: 2.2.2
221
+ version: '2.6'
221
222
  required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  requirements:
223
224
  - - ">="