pryx 0.4.0 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +84 -17
- data/lib/pryx/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d121965f11784fd2deb6c2fbee66d4f96faa2743906a9a9b400b85065359c1b
|
4
|
+
data.tar.gz: 1f90e8cd2c47468f93ad15e1254f3688b91c1e307e98261e305709693f40a4e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 657a819364d7e7c648d603d5b0d924caac8ac4666f874bd3cbc4eb7920831dd889323cfcf235562918e70c3540a55f0cfe53cfc6461b51e4f4dbdc6cb8ad2856
|
7
|
+
data.tar.gz: abdfabd15423b7bb21b16177ab7f20f9e276094983ae92977ee22e0f38c54dd2df78ef32289394ef06e8804b4cd847e1708ced38fef94119e4979c2655d0e34e
|
data/README.md
CHANGED
@@ -1,35 +1,100 @@
|
|
1
|
-
# Pryx [![Build Status](https://travis-ci.
|
1
|
+
# Pryx [![Build Status](https://travis-ci.com/zw963/pryx.svg?branch=master)](https://travis-ci.com/zw963/pryx) [![Gem Version](https://badge.fury.io/rb/pryx.svg)](http://badge.fury.io/rb/pryx)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
## Philosophy
|
6
|
-
|
7
|
-
TODO: Write philosophy
|
3
|
+
Three Virtues of a Programmer: Laziness, Impatience, and Hubris. -- Larry Wall, the author of Perl Programming language.
|
8
4
|
|
9
5
|
## Getting Started
|
10
6
|
|
11
|
-
|
7
|
+
Don't add this gem into bundler's Gemfile.
|
8
|
+
|
9
|
+
Instead, install it directly via RubyGems
|
12
10
|
|
13
11
|
$ gem install pryx
|
14
12
|
|
15
|
-
|
13
|
+
## Usage
|
16
14
|
|
17
|
-
|
15
|
+
Before use it, you need set `RUBYOPT` variable.
|
18
16
|
|
19
|
-
|
17
|
+
You can do this two way in a terminal.
|
20
18
|
|
21
|
-
|
19
|
+
```sh
|
20
|
+
$: export RUBYOPT+=' -rpryx'
|
21
|
+
$: ruby your_file.rb # add pry! in your_file for start pry session
|
22
22
|
|
23
|
-
|
23
|
+
```
|
24
24
|
|
25
|
-
|
25
|
+
or Run your's code directly use:
|
26
|
+
|
27
|
+
```sh
|
28
|
+
$: RUBYOPT+='-rpryx' ruby your_file.rb # add pry! in your_file for start pry session
|
29
|
+
```
|
30
|
+
|
31
|
+
Then, try add `pry!` into your's ruby code, then run it, have fun!
|
32
|
+
|
33
|
+
## useful command add directly to Kernel#
|
34
|
+
|
35
|
+
### pry!
|
36
|
+
|
37
|
+
start a pry session, this session only can be intercept once if add into a loop.
|
38
|
+
when used with a rails/roda web server, it only intercept one per request.
|
39
|
+
|
40
|
+
we have IRB equivalent, named `irb!`, for use more nice feature, use following code instead:
|
41
|
+
|
42
|
+
```sh
|
43
|
+
$: RUBYOPT+='-rpryx_irb' ruby your_file.rb # add irb! in your_file for start pry session
|
44
|
+
```
|
45
|
+
|
46
|
+
Following feature both available when start a Pry or IRB session:
|
47
|
+
|
48
|
+
1. add `next/step/up/down` command for debug, use [break](https://github.com/gsamokovarov/break)
|
49
|
+
2. add `Kernel#ls1`(use ls1 to avoid conflict with pry builtin ls command), see [looksee](https://github.com/oggy/looksee)
|
50
|
+
3. Use AwesomePrint for printer. see [https://github.com/awesome-print/awesome_print]
|
51
|
+
|
52
|
+
Following feature only available when start a Pry session:
|
26
53
|
|
27
|
-
|
28
|
-
|
54
|
+
1. add `$/?` command for see source, see [pry-doc](https://github.com/pry/pry-doc)
|
55
|
+
2. pry-remote debug support. you still use `pry!` no changes, it will use `pry-remote` automatically
|
56
|
+
if current ruby process was running on backround, then, it will use pry-remote, and listen on 0.0.0.0:9876,
|
57
|
+
Then, you can connect to it from another terminal! see [pry-remote](https://github.com/Mon-Ouie/pry-remote)
|
58
|
+
3. add `pa` command, see [pry-power_assert](https://github.com/yui-knk/pry-power_assert)
|
59
|
+
4. add `hier` command for print the class hierarchies, see [pry-hier](https://github.com/phaul/pry-hier)
|
60
|
+
5. add `pry-aa_ancestors` command for print the class hierarchy, see [pry-aa_ancestors](https://github.com/tbpgr/pry-aa_ancestors)
|
61
|
+
6. add `up/down/frame/stack` command, see [pry-stack_explorer](https://github.com/pry/pry-stack_explorer)
|
62
|
+
2. add `yes` or `y` command, see [pry-yes](https://github.com/christofferh/pry-yes)
|
63
|
+
|
64
|
+
### pry1 pry2 (sorry for this bad name, please create a issue you have a better one)
|
29
65
|
|
30
|
-
|
66
|
+
pry2 do nothing, but it will be interceptd and start a pry session only after pry1 is running.
|
67
|
+
|
68
|
+
I haven use this hack for avoid pry session start on working place.
|
69
|
+
|
70
|
+
You know what i means.
|
71
|
+
|
72
|
+
### irb1 irb2
|
73
|
+
|
74
|
+
IRB equivalent for pry1, pry2
|
75
|
+
we have irb1 and irb2 too.
|
76
|
+
|
77
|
+
### pry3
|
78
|
+
|
79
|
+
It just normal `binding.pry`, that is, will always be intercept if code can reach.
|
80
|
+
but above plugins and libraries all correct configured.
|
81
|
+
|
82
|
+
we have another Kernel#pry?, which enable `pry-state` automatically, see [pry-state](https://github.com/SudhagarS/pry-state)
|
83
|
+
|
84
|
+
### we have two binary, pryx, irbx
|
85
|
+
|
86
|
+
pryx is same as pry, but, with plugins and libraries correct configured.
|
87
|
+
|
88
|
+
irbx is same for irb.
|
89
|
+
|
90
|
+
## Philosophy
|
91
|
+
|
92
|
+
This gem is design to maximum limit take effect current ruby program, so, it should be safe to use it.
|
93
|
+
But, you should only use it when development, though, it was tested when use in docker-compose container too.
|
94
|
+
|
95
|
+
## Support
|
31
96
|
|
32
|
-
|
97
|
+
* MRI 2.2+
|
33
98
|
|
34
99
|
## History
|
35
100
|
|
@@ -46,6 +111,8 @@ No known limit.
|
|
46
111
|
* Commit your changes: `git commit -am 'Add some feature'`.
|
47
112
|
* Push to the branch: `git push origin my-new-feature`.
|
48
113
|
* Send a pull request :D.
|
114
|
+
|
115
|
+
Not listed famous pry plugins is welcome!!
|
49
116
|
|
50
117
|
## license
|
51
118
|
|
data/lib/pryx/version.rb
CHANGED