ripl 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemspec +3 -3
- data/.travis.yml +3 -1
- data/CHANGELOG.rdoc +4 -0
- data/CONTRIBUTING.md +1 -0
- data/README.rdoc +116 -69
- data/lib/ripl/history.rb +3 -1
- data/lib/ripl/version.rb +1 -1
- metadata +12 -12
- data/deps.rip +0 -1
- data/test/deps.rip +0 -4
data/.gemspec
CHANGED
@@ -9,15 +9,15 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = "gabriel.horner@gmail.com"
|
10
10
|
s.homepage = "http://github.com/cldwalker/ripl"
|
11
11
|
s.summary = "ruby interactive print loop - A light, modular alternative to irb and a shell framework"
|
12
|
-
s.description = "ripl is a light
|
12
|
+
s.description = "ripl is a light shell that encourages common middleware for shells i.e. rack for ruby shells. It is also a modular alternative to irb. Like irb, it loads ~/.irbrc, has autocompletion and keeps history in ~/.irb_history. Unlike irb, it is highly customizable via plugins and supports commands i.e. ripl-play. This customizability makes it easy to build custom shells (i.e. for a gem or application) and complex shells (i.e. for the web). Works on ruby 1.8.7 and greater."
|
13
13
|
s.required_rubygems_version = ">= 1.3.6"
|
14
14
|
s.executables = %w(ripl)
|
15
|
-
s.add_dependency 'bond', '~> 0.
|
15
|
+
s.add_dependency 'bond', '~> 0.5.1'
|
16
16
|
s.add_development_dependency 'bacon', '>= 1.1.0'
|
17
17
|
s.add_development_dependency 'rr', '>= 1.0.4'
|
18
18
|
s.add_development_dependency 'bacon-bits'
|
19
19
|
s.add_development_dependency 'bacon-rr'
|
20
|
-
s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc} ext/**/*.{rb,c}
|
20
|
+
s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc,md} ext/**/*.{rb,c}]) + %w{Rakefile .gemspec .travis.yml}
|
21
21
|
s.files += Dir.glob(['man/*', '*.gemspec']) + %w{test/.riplrc}
|
22
22
|
s.extra_rdoc_files = ["README.rdoc", "LICENSE.txt"]
|
23
23
|
s.license = 'MIT'
|
data/.travis.yml
CHANGED
data/CHANGELOG.rdoc
CHANGED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Thanks for trying out this project! [See here for contribution guidelines.](http://tagaholic.me/contributing.html)
|
data/README.rdoc
CHANGED
@@ -1,20 +1,24 @@
|
|
1
1
|
== Description
|
2
2
|
|
3
|
-
ripl is a light
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
{
|
8
|
-
|
3
|
+
ripl is a light shell that encourages common middleware for shells i.e. rack for
|
4
|
+
ruby shells. It is also a modular alternative to irb. Like irb, it loads
|
5
|
+
~/.irbrc, has autocompletion and keeps history in ~/.irb_history. Unlike irb, it
|
6
|
+
is highly customizable via plugins and supports commands i.e.
|
7
|
+
{ripl-play}[https://github.com/cldwalker/ripl-play#readme]. This
|
8
|
+
customizability makes it easy to build custom shells (i.e. for a gem or
|
9
|
+
application) and complex shells (i.e. for the
|
10
|
+
{web}[https://github.com/cldwalker/nirvana#readme]). Works on ruby 1.8.7 and
|
11
|
+
greater.
|
9
12
|
|
10
13
|
== Install
|
11
14
|
|
12
|
-
If you have {readline}[http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html],
|
15
|
+
If you have {readline}[http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html],
|
16
|
+
install ripl with:
|
13
17
|
|
14
18
|
gem install ripl
|
15
19
|
|
16
20
|
If you don't have readline, first install ripl with {a pure ruby
|
17
|
-
readline}[https://github.com/luislavena/rb-readline]:
|
21
|
+
readline}[https://github.com/luislavena/rb-readline#readme]:
|
18
22
|
|
19
23
|
gem install ripl rb-readline -- --without-readline
|
20
24
|
|
@@ -53,11 +57,13 @@ To view ripl's man page:
|
|
53
57
|
|
54
58
|
== Coming from irb
|
55
59
|
|
56
|
-
When first trying ripl, you may experience errors in your ~/.irbrc due to an
|
57
|
-
configuration. In order to have ripl and irb coexist peacefully,
|
58
|
-
To silence them without touching your
|
59
|
-
|
60
|
-
|
60
|
+
When first trying ripl, you may experience errors in your ~/.irbrc due to an
|
61
|
+
irb-specific configuration. In order to have ripl and irb coexist peacefully,
|
62
|
+
you should silence these errors. To silence them without touching your
|
63
|
+
~/.irbrc, install the {ripl-irb}[https://github.com/cldwalker/ripl-irb#readme]
|
64
|
+
gem. This ripl plugin fakes irb's existence and points to ripl equivalents for
|
65
|
+
your irb configurations. Otherwise, if you don't mind modifying ~/.irbrc,
|
66
|
+
wrap your irb-specific configuration in a block as follow:
|
61
67
|
|
62
68
|
if defined? IRB
|
63
69
|
IRB.conf[:BLAH] = 'blah'
|
@@ -71,7 +77,7 @@ modifying ~/.irbrc, wrap your irb-specific configuration in a block as follow:
|
|
71
77
|
* Appends to ~/.irb_history on exit
|
72
78
|
* Autocompletion (from bond)
|
73
79
|
* _ for last result
|
74
|
-
* Type
|
80
|
+
* Type exit, quit or press Ctrl-D to exit
|
75
81
|
* 6 common commandline options: -f, -r, -I, -d, -h, -v
|
76
82
|
* IRB.conf -> Ripl.config
|
77
83
|
* Handles Ctrl-C quietly
|
@@ -85,22 +91,23 @@ modifying ~/.irbrc, wrap your irb-specific configuration in a block as follow:
|
|
85
91
|
* Create console commands in a simple, modular way
|
86
92
|
* Custom commandline options can be added via a plugin
|
87
93
|
* ~/.irbrc errors caught
|
88
|
-
* Well-integrated internationalization (see {ripl-i18n}[
|
94
|
+
* Well-integrated internationalization (see {ripl-i18n}[https://github.com/cldwalker/ripl-i18n#readme])
|
89
95
|
* Different from irb
|
90
96
|
* No multi-line evaluation by default (but there is a plugin,
|
91
|
-
{ripl-multi_line}[
|
97
|
+
{ripl-multi_line}[https://github.com/janlelis/ripl-multi_line#readme]).
|
92
98
|
* No irb subsessions or workspaces (though ripl has jumps via
|
93
|
-
{ripl-commands}[
|
94
|
-
* Some IRB.conf features aren't supported yet (see {ripl-irb}[
|
99
|
+
{ripl-commands}[https://github.com/cldwalker/ripl-commands#readme])
|
100
|
+
* Some IRB.conf features aren't supported yet (see {ripl-irb}[https://github.com/cldwalker/ripl-irb#readme]
|
95
101
|
for details)
|
96
102
|
|
97
103
|
Note: Irb features not in ripl can be implemented as plugins.
|
98
104
|
|
99
105
|
== Plugins
|
100
106
|
|
101
|
-
A ripl plugin is a module that is included into Ripl::Shell or extended into
|
102
|
-
they can be packaged as gems and reused
|
103
|
-
|
107
|
+
A ripl plugin is a module that is included into Ripl::Shell or extended into
|
108
|
+
Ripl::Runner. Being simply modules, they can be packaged as gems and reused
|
109
|
+
across shells as needed. ripl highly encourages plugins by loading them as
|
110
|
+
early as possible and allowing them to extend most of ripl's functionality.
|
104
111
|
|
105
112
|
As an example plugin, let's color error messages red:
|
106
113
|
|
@@ -116,20 +123,23 @@ As an example plugin, let's color error messages red:
|
|
116
123
|
end
|
117
124
|
Ripl::Shell.include Ripl::RedError
|
118
125
|
|
119
|
-
Note this plugin extends format_error() by invoking the original
|
120
|
-
|
121
|
-
extension
|
126
|
+
Note this plugin extends format_error() by invoking the original
|
127
|
+
format_error() with super. This is possible for any method that is available
|
128
|
+
for extension by plugins. To see what methods are available for extension, see
|
129
|
+
Ripl::Shell::API and Ripl::Runner::API.
|
122
130
|
|
123
|
-
If we want to add a config for this plugin, we can simply add a key to
|
124
|
-
underscored version of the plugin name i.e.
|
131
|
+
If we want to add a config for this plugin, we can simply add a key to
|
132
|
+
Ripl.config that matches the underscored version of the plugin name i.e.
|
133
|
+
Ripl.config[:red_error].
|
125
134
|
|
126
135
|
For available plugins, see Ripl Plugins below.
|
127
136
|
|
128
137
|
== Configuration
|
129
138
|
|
130
|
-
Since ripl is highly customizable, it loads ~/.riplrc before it does anything.
|
131
|
-
require and/or define plugins. Any ripl configurations
|
132
|
-
For an example riplrc,
|
139
|
+
Since ripl is highly customizable, it loads ~/.riplrc before it does anything.
|
140
|
+
This ruby file should require and/or define plugins. Any ripl configurations
|
141
|
+
via Ripl.config should also be done here. For an example ~/.riplrc,
|
142
|
+
see {mine}[https://github.com/cldwalker/dotfiles/tree/master/.riplrc].
|
133
143
|
|
134
144
|
== Create Custom Shells
|
135
145
|
|
@@ -147,61 +157,97 @@ start on a specific binding:
|
|
147
157
|
== Create Commands
|
148
158
|
|
149
159
|
If you want to invoke your custom shell with ripl, make it a ripl command.
|
150
|
-
To create one, create an executable in the format ripl-<command> and make sure
|
151
|
-
$PATH. For example, the file
|
152
|
-
|
153
|
-
|
160
|
+
To create one, create an executable in the format ripl-<command> and make sure
|
161
|
+
it's in your shell's $PATH. For example, the file ripl-my_gem would be
|
162
|
+
invoked with ripl my_gem. Note that with your command you can take arguments
|
163
|
+
and parse your options as you please. For an example command,
|
164
|
+
see {ripl-rails}[https://github.com/cldwalker/ripl-rails#readme].
|
154
165
|
|
155
166
|
== Credits
|
167
|
+
|
156
168
|
* janlelis and godfat for bug fix and tweaks
|
157
169
|
* JoshCheek for bug fixes
|
158
170
|
* postmodern for windows fixes and no history support
|
159
171
|
|
160
172
|
== Bugs/Issues
|
161
|
-
|
173
|
+
|
174
|
+
Please report them {on github}[https://github.com/cldwalker/ripl/issues].
|
162
175
|
|
163
176
|
== Contributing
|
177
|
+
|
164
178
|
{See here}[http://tagaholic.me/contributing.html]
|
165
179
|
|
166
180
|
== Ripl Plugins
|
167
181
|
|
168
|
-
* {ripl-multi_line}[
|
169
|
-
|
170
|
-
* {ripl-
|
171
|
-
|
172
|
-
* {ripl-
|
173
|
-
|
174
|
-
* {ripl-
|
175
|
-
|
176
|
-
* {ripl-
|
177
|
-
|
178
|
-
* {ripl-
|
179
|
-
|
180
|
-
* {ripl-
|
181
|
-
|
182
|
-
* {ripl-
|
183
|
-
|
184
|
-
* {ripl-
|
185
|
-
|
182
|
+
* {ripl-multi_line}[https://github.com/janlelis/ripl-multi_line#readme]:
|
183
|
+
evaluate multiple lines
|
184
|
+
* {ripl-ripper}[https://github.com/cldwalker/ripl-ripper#readme]:
|
185
|
+
evaluate multiple lines with ripper
|
186
|
+
* {ripl-rails}[https://github.com/cldwalker/ripl-rails#readme]:
|
187
|
+
console for rails
|
188
|
+
* {ripl-rack}[https://github.com/cldwalker/ripl-rack#readme]:
|
189
|
+
console for rack
|
190
|
+
* {ripl-play}[https://github.com/cldwalker/ripl-play#readme]:
|
191
|
+
play back and record input into ripl
|
192
|
+
* {ripl-debug}[https://github.com/cldwalker/ripl-debug#readme]:
|
193
|
+
automatically debugs a failed eval
|
194
|
+
* {ripl-after_rc}[https://github.com/cldwalker/ripl-after_rc#readme]:
|
195
|
+
provide blocks to run after ~/.irbrc is loaded
|
196
|
+
* {ripl-irb}[https://github.com/cldwalker/ripl-irb#readme]:
|
197
|
+
smooths transition from irb
|
198
|
+
* {ripl-i18n}[https://github.com/cldwalker/ripl-i18n#readme]:
|
199
|
+
translates ripl to your language
|
200
|
+
* {ripl-commands}[https://github.com/cldwalker/ripl-commands#readme]:
|
201
|
+
adds ripl commands similar to irb's commands
|
202
|
+
* {ripl-shell_commands}[https://github.com/postmodern/ripl-shell_commands#readme]:
|
203
|
+
adds support for !ls shell commands.
|
204
|
+
* {ripl-color_error}[https://github.com/cldwalker/ripl-color_error#readme]:
|
205
|
+
colorize errors
|
206
|
+
* {ripl-color_streams}[https://github.com/janlelis/ripl-color_streams#readme]:
|
207
|
+
colorizes stderr + stdout
|
208
|
+
* {ripl-color_result}[https://github.com/janlelis/ripl-color_result#readme]:
|
209
|
+
colorizes results
|
210
|
+
* {ripl-auto_indent}[https://github.com/janlelis/ripl-auto_indent#readme]:
|
211
|
+
auto indents multi-line input
|
212
|
+
* {ripl-hirb}[https://github.com/cldwalker/hirb#readme]:
|
213
|
+
comes with hirb to make it a proper riplzen
|
214
|
+
* {ripl-hijack}[https://github.com/cldwalker/ripl-hijack#readme]:
|
215
|
+
ripl console to a ruby process
|
216
|
+
* {ripl-misc}[https://github.com/cldwalker/ripl-misc#readme]:
|
217
|
+
a playground for ripl plugins
|
218
|
+
* {ripl-profiles}[https://github.com/janlelis/ripl-profiles#readme]:
|
219
|
+
load ripl profiles with a --profile option
|
186
220
|
* {ripl-short_errors}[https://github.com/janlelis/ripl-misc/blob/master/lib/ripl/short_errors.rb]:
|
187
221
|
display short backtrace
|
188
|
-
* {ripl-rocket}[https://github.com/janlelis/ripl-rocket]:
|
189
|
-
|
190
|
-
* {
|
191
|
-
|
192
|
-
* {
|
193
|
-
|
222
|
+
* {ripl-rocket}[https://github.com/janlelis/ripl-rocket#readme]:
|
223
|
+
outputs ripl result as a hash rocket
|
224
|
+
* {ripl-padrino}[https://github.com/achiu/ripl-padrino#readme]:
|
225
|
+
console for padrino
|
226
|
+
* {ripltools}[https://github.com/janlelis/ripltools#readme]:
|
227
|
+
a collection of ripl plugins
|
228
|
+
* {ripl-rc}[https://github.com/godfat/ripl-rc#readme]:
|
229
|
+
ripl plugins for debugging, class-based coloring and more
|
230
|
+
* {ripl-em}[https://github.com/cldwalker/ripl-em#readme]:
|
231
|
+
interact with EM libraries asynchronously
|
232
|
+
* {ripl-readline-em}[https://github.com/pmahoney/ripl-readline-em#readme]:
|
233
|
+
another async EM interface
|
194
234
|
|
195
235
|
== Ripl Shells
|
236
|
+
|
196
237
|
Shells built on top of ripl:
|
197
238
|
|
198
|
-
* {nirvana}[
|
199
|
-
|
200
|
-
* {
|
201
|
-
|
202
|
-
* {
|
203
|
-
|
204
|
-
|
239
|
+
* {nirvana}[https://github.com/cldwalker/nirvana#readme]:
|
240
|
+
A ruby web shell complete with autocomplete
|
241
|
+
* {fresh}[https://github.com/janlelis/fresh#readme]:
|
242
|
+
An interesting ruby/system hybrid shell
|
243
|
+
* {ripl-johnson}[https://github.com/cldwalker/ripl-johnson#readme]:
|
244
|
+
A js shell based on johnson (firefox tracemonkey)
|
245
|
+
* {ronin}[http://ronin-ruby.github.io]:
|
246
|
+
An exploit development platform using ripl for its console
|
247
|
+
* {tux}[https://github.com/cldwalker/tux#readme]:
|
248
|
+
A sinatra shell
|
249
|
+
* {rack-webconsole}[https://github.com/codegram/rack-webconsole#readme]:
|
250
|
+
A rack middleware that adds a web shell to any rack app
|
205
251
|
|
206
252
|
== More Ripl Links
|
207
253
|
|
@@ -210,9 +256,10 @@ Shells built on top of ripl:
|
|
210
256
|
* {slides at euroko about ruby consoles}[http://rbjl.net/irbtools+ripl.pdf]
|
211
257
|
|
212
258
|
== Irb Alternatives
|
259
|
+
|
213
260
|
Some other irb alternatives to check out:
|
214
261
|
|
215
|
-
* {ir}[
|
216
|
-
* {irb2}[
|
217
|
-
* {dietrb}[
|
218
|
-
* {pry}[
|
262
|
+
* {ir}[https://github.com/raggi/ir#readme]: nice and light
|
263
|
+
* {irb2}[https://github.com/wycats/irb2#readme]: yehuda katz's partial attempt at rewriting irb
|
264
|
+
* {dietrb}[https://github.com/alloy/dietrb#readme]: mac and ruby 1.9 specific
|
265
|
+
* {pry}[https://github.com/banister/pry#readme]: featureful but heavy
|
data/lib/ripl/history.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module Ripl::History
|
2
|
+
HISTORY_FILE = '~/.irb_history'
|
3
|
+
|
2
4
|
def history_file
|
3
5
|
@history_file ||= config[:history] && File.expand_path(config[:history])
|
4
6
|
end
|
@@ -24,4 +26,4 @@ module Ripl::History
|
|
24
26
|
def after_loop() super; write_history end
|
25
27
|
end
|
26
28
|
Ripl::Shell.include Ripl::History
|
27
|
-
Ripl.config[:history] = ENV
|
29
|
+
Ripl.config[:history] = ENV.fetch('RIPL_HISTORY',Ripl::History::HISTORY_FILE)
|
data/lib/ripl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ripl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-05-23 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bond
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.5.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.5.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bacon
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,12 +91,12 @@ dependencies:
|
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
|
-
description: ripl is a light
|
95
|
-
|
96
|
-
|
94
|
+
description: ripl is a light shell that encourages common middleware for shells i.e.
|
95
|
+
rack for ruby shells. It is also a modular alternative to irb. Like irb, it loads
|
96
|
+
~/.irbrc, has autocompletion and keeps history in ~/.irb_history. Unlike irb, it
|
97
|
+
is highly customizable via plugins and supports commands i.e. ripl-play. This customizability
|
97
98
|
makes it easy to build custom shells (i.e. for a gem or application) and complex
|
98
|
-
shells (i.e. for the web).
|
99
|
-
on ruby 1.8.7 and greater.
|
99
|
+
shells (i.e. for the web). Works on ruby 1.8.7 and greater.
|
100
100
|
email: gabriel.horner@gmail.com
|
101
101
|
executables:
|
102
102
|
- ripl
|
@@ -121,8 +121,7 @@ files:
|
|
121
121
|
- LICENSE.txt
|
122
122
|
- CHANGELOG.rdoc
|
123
123
|
- README.rdoc
|
124
|
-
-
|
125
|
-
- test/deps.rip
|
124
|
+
- CONTRIBUTING.md
|
126
125
|
- Rakefile
|
127
126
|
- .gemspec
|
128
127
|
- .travis.yml
|
@@ -151,9 +150,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
150
|
version: 1.3.6
|
152
151
|
requirements: []
|
153
152
|
rubyforge_project:
|
154
|
-
rubygems_version: 1.8.
|
153
|
+
rubygems_version: 1.8.19
|
155
154
|
signing_key:
|
156
155
|
specification_version: 3
|
157
156
|
summary: ruby interactive print loop - A light, modular alternative to irb and a shell
|
158
157
|
framework
|
159
158
|
test_files: []
|
159
|
+
has_rdoc:
|
data/deps.rip
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
bond ~>0.4.2
|
data/test/deps.rip
DELETED