pry-try 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 9be4107b9a3260e37eab98cd327a3ce9cd76133c
4
- data.tar.gz: ecb09c7a053714d9ecdb747ea6d9de8b52c9fa65
3
+ metadata.gz: 42dc31f96ce666efa506a7d4eb1818c962517547
4
+ data.tar.gz: aa56f8839c0a5230092967144e31ef8c930f873b
5
5
  SHA512:
6
- metadata.gz: a493f0705ccdeadf414858b67727abcf293c5b627eb40d6f3edb29fd907c6bf5357b24f1ea0c85817aca04d1c22d551c3b3674cef504b0ae5c1a2e3750e5172a
7
- data.tar.gz: b043e9a41d84205dca42dfe001946af3817fe591cfe07cc27a23cabb4f22abfe10ea9d00401bb5ff6cc67dba190904f06e34f1cc4bd4f3c8fa9f00fc47225f6c
6
+ metadata.gz: ab07fa47a0def00a6674df5e061a7434d48f49528d52be5da56258703e81fd606f7f9a6155e5dc70cd5a9214d52b90b94073771d87dbf6bb536e0d8e1b9b3eae
7
+ data.tar.gz: 83cfcbd300813197a593310db9c4f73bf335d0294d094237c35fcb02c6acc90c0fa4d10d4347d752d0729b7ec821faebbd0c31243352ae8a548eae7ddb8c4e0d
data/README.md CHANGED
@@ -1,73 +1,81 @@
1
1
  # pry-try
2
2
 
3
- Open a pry-session with the gems you want to try.
3
+ Start a pry-session with specific gems or a (remote) script loaded.
4
4
 
5
5
  ## Usage
6
6
 
7
- This gem should supports the following usecases:
8
-
9
- ### pipe-in a script
10
-
11
- ```bash
12
- # piped-in content is evaluated in a new pry-session:
13
- $ echo '@a = 1' | pry-try
14
- [1] pry(main)> @a =1
15
- 1
16
- [2] pry(main)>
17
-
18
- # handy to share scripts with others:
19
- $ curl <path-to-raw-gist> | pry-try
20
- ```
21
-
22
- ### try a gem
23
-
24
- Start a new pry-session with the requested gems loaded:
25
-
26
- ```bash
27
- $ pry-try activesupport
28
- Fetching gem metadata from https://rubygems.org/.........
29
- Fetching version metadata from https://rubygems.org/.
30
- Resolving dependencies...
31
- Using concurrent-ruby 1.0.5
32
- Using i18n 0.8.1
33
- Using minitest 5.10.1
34
- Using thread_safe 0.3.6
35
- Using coderay 1.1.1
36
- Using method_source 0.8.2
37
- Using slop 3.6.0
38
- Using bundler 1.14.5
39
- Using tzinfo 1.2.2
40
- Using pry 0.10.4
41
- Using activesupport 5.0.2
42
- [2] pry(main)> 1.second
43
- => 1 second
44
- ```
45
-
46
- Request a specific version, like you would do in a Gemfile:
47
- ```bash
48
- $ pry-try activesupport '~>4.2'
49
- # or multiple gems:
50
- $ pry-try activesupport '~>4.2' redis
51
- ```
52
-
53
- ### try a gem within a pry-session
54
-
55
- ```bash
56
- # given
57
- $ pry
58
- [1] pry(main)> .pry-try 'activesupport'
59
- ...
60
- [2] pry(main)> 1.second
61
- => 1 second
62
- # ^D lets you return to the original pry-session
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 prytry
78
+ $ gem install pry-try
71
79
 
72
80
 
73
81
  ## Development
@@ -1,3 +1,3 @@
1
1
  module PryTry
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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{try a gem or script}
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.0
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: try a gem or script
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: []