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