pry-try 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +67 -59
- data/lib/pry-try/version.rb +1 -1
- data/pry-try.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42dc31f96ce666efa506a7d4eb1818c962517547
|
4
|
+
data.tar.gz: aa56f8839c0a5230092967144e31ef8c930f873b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab07fa47a0def00a6674df5e061a7434d48f49528d52be5da56258703e81fd606f7f9a6155e5dc70cd5a9214d52b90b94073771d87dbf6bb536e0d8e1b9b3eae
|
7
|
+
data.tar.gz: 83cfcbd300813197a593310db9c4f73bf335d0294d094237c35fcb02c6acc90c0fa4d10d4347d752d0729b7ec821faebbd0c31243352ae8a548eae7ddb8c4e0d
|
data/README.md
CHANGED
@@ -1,73 +1,81 @@
|
|
1
1
|
# pry-try
|
2
2
|
|
3
|
-
|
3
|
+
Start a pry-session with specific gems or a (remote) script loaded.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
1
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
[2] pry(main)>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
```bash
|
48
|
-
$ pry
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
[
|
61
|
-
=> 1
|
62
|
-
|
63
|
-
|
7
|
+
* start a pry-session with one or more gems loaded:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
$ pry-try activesupport
|
11
|
+
Fetching gem metadata from https://rubygems.org/.........
|
12
|
+
Fetching version metadata from https://rubygems.org/.
|
13
|
+
Resolving dependencies...
|
14
|
+
Using concurrent-ruby 1.0.5
|
15
|
+
Using i18n 0.8.1
|
16
|
+
Using minitest 5.10.1
|
17
|
+
Using thread_safe 0.3.6
|
18
|
+
Using coderay 1.1.1
|
19
|
+
Using method_source 0.8.2
|
20
|
+
Using slop 3.6.0
|
21
|
+
Using bundler 1.14.5
|
22
|
+
Using tzinfo 1.2.2
|
23
|
+
Using pry 0.10.4
|
24
|
+
Using activesupport 5.0.2
|
25
|
+
[2] pry(main)> 1.second
|
26
|
+
=> 1 second
|
27
|
+
```
|
28
|
+
|
29
|
+
Use a specific version:
|
30
|
+
|
31
|
+
```bash
|
32
|
+
$ pry-try activesupport '~>4.2'
|
33
|
+
...
|
34
|
+
[2] pry(main)>
|
35
|
+
```
|
36
|
+
|
37
|
+
Multiple gems:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
$ pry-try activesupport '~>4.2' redis
|
41
|
+
...
|
42
|
+
[2] pry(main)>
|
43
|
+
```
|
44
|
+
|
45
|
+
* start pry-session from within pry:
|
46
|
+
|
47
|
+
```bash
|
48
|
+
$ pry
|
49
|
+
[1] pry(main)> .pry-try activesupport
|
50
|
+
...
|
51
|
+
[2] pry(main)>
|
52
|
+
This session is isolated from the initial session.
|
53
|
+
^d to return to initial session
|
54
|
+
```
|
55
|
+
|
56
|
+
* pipe-in script and start a pry-session:
|
57
|
+
|
58
|
+
```bash
|
59
|
+
$ echo '@a = 1' | pry-try
|
60
|
+
[1] pry(main)> @a
|
61
|
+
=> 1
|
62
|
+
[2] pry(main)>
|
63
|
+
|
64
|
+
# handy when sharing code with others:
|
65
|
+
$ curl https://gist.githubusercontent.com/eval/76955c57512c1e4ac01cdd913b76c92d/raw/bf714a15789eca3e968c3544f85b9b786b8eae8f/hello.rb | pry-try
|
66
|
+
|
67
|
+
# or via the gist command:
|
68
|
+
$ gist -r 76955c57512c1e4ac01cdd913b76c92d | pry-try
|
69
|
+
```
|
70
|
+
|
71
|
+
**NOTE:** curl-pipe-runtime is [not without risk](https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/). A tool like [vipe](https://github.com/madx/moreutils/blob/master/vipe) ([npm variant](https://github.com/juliangruber/vipe#vipe)) allows you to inspect the fetched script before handing it over to pry-try.
|
64
72
|
|
65
73
|
|
66
74
|
## Installation
|
67
75
|
|
68
76
|
Install system-wide:
|
69
77
|
|
70
|
-
$ gem install
|
78
|
+
$ gem install pry-try
|
71
79
|
|
72
80
|
|
73
81
|
## Development
|
data/lib/pry-try/version.rb
CHANGED
data/pry-try.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Gert Goet"]
|
10
10
|
spec.email = ["gert@thinkcreate.nl"]
|
11
11
|
|
12
|
-
spec.summary = %q{try a gem or script}
|
13
|
-
spec.description = %q{
|
12
|
+
spec.summary = %q{Quickly try a gem or script on the repl}
|
13
|
+
spec.description = %q{Start a pry-session with specific gems or a (remote) script loaded.}
|
14
14
|
spec.homepage = "https://gitlab.com/eval/pry-try/tree/master#pry-try"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-try
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Goet
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
description:
|
69
|
+
description: Start a pry-session with specific gems or a (remote) script loaded.
|
70
70
|
email:
|
71
71
|
- gert@thinkcreate.nl
|
72
72
|
executables:
|
@@ -110,5 +110,5 @@ rubyforge_project:
|
|
110
110
|
rubygems_version: 2.5.2
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
|
-
summary: try a gem or script
|
113
|
+
summary: Quickly try a gem or script on the repl
|
114
114
|
test_files: []
|