irbtools 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +11 -7
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/doc/classes/IRB.html +111 -0
- data/doc/classes/IRB/CaptureIO.html +189 -0
- data/doc/classes/Irbtools.html +170 -0
- data/doc/classes/Kernel.html +161 -0
- data/doc/created.rid +1 -0
- data/doc/files/README_rdoc.html +225 -0
- data/doc/files/lib/irbtools/configure_rb.html +115 -0
- data/doc/files/lib/irbtools_rb.html +563 -0
- data/doc/fr_class_index.html +30 -0
- data/doc/fr_file_index.html +29 -0
- data/doc/fr_method_index.html +48 -0
- data/doc/index.html +26 -0
- data/doc/rdoc-style.css +208 -0
- data/irbtools.gemspec +87 -0
- data/lib/irbtools.rb +193 -36
- data/lib/irbtools/configure.rb +58 -0
- metadata +20 -5
@@ -0,0 +1,161 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Kernel</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Kernel</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/irbtools_rb.html">
|
59
|
+
lib/irbtools.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
<div id="description">
|
76
|
+
<p>
|
77
|
+
patch method using stdout
|
78
|
+
</p>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000022">exec</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
|
98
|
+
<div id="section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<div id="aliases-list">
|
103
|
+
<h3 class="section-bar">External Aliases</h3>
|
104
|
+
|
105
|
+
<div class="name-list">
|
106
|
+
<table summary="aliases">
|
107
|
+
<tr class="top-aligned-row context-row">
|
108
|
+
<td class="context-item-name">exec</td>
|
109
|
+
<td>-></td>
|
110
|
+
<td class="context-item-value">exec_unpatched</td>
|
111
|
+
</tr>
|
112
|
+
</table>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<!-- if method_list -->
|
121
|
+
<div id="methods">
|
122
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
123
|
+
|
124
|
+
<div id="method-M000022" class="method-detail">
|
125
|
+
<a name="M000022"></a>
|
126
|
+
|
127
|
+
<div class="method-heading">
|
128
|
+
<a href="#M000022" class="method-signature">
|
129
|
+
<span class="method-name">exec</span><span class="method-args">(*args)</span>
|
130
|
+
</a>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<div class="method-description">
|
134
|
+
<p><a class="source-toggle" href="#"
|
135
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
136
|
+
<div class="method-source-code" id="M000022-source">
|
137
|
+
<pre>
|
138
|
+
<span class="ruby-comment cmt"># File lib/irbtools.rb, line 186</span>
|
139
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
140
|
+
<span class="ruby-constant">STDOUT</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-constant">IRB</span><span class="ruby-operator">::</span><span class="ruby-constant">CaptureIO</span>.<span class="ruby-identifier">streams</span>[<span class="ruby-identifier">:stdout</span>])
|
141
|
+
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-constant">IRB</span><span class="ruby-operator">::</span><span class="ruby-constant">CaptureIO</span>.<span class="ruby-identifier">streams</span>[<span class="ruby-identifier">:stderr</span>])
|
142
|
+
<span class="ruby-identifier">exec_unpatched</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
143
|
+
<span class="ruby-keyword kw">end</span>
|
144
|
+
</pre>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
</div>
|
151
|
+
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
<div id="validator-badges">
|
157
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
</body>
|
161
|
+
</html>
|
data/doc/created.rid
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Wed, 06 Oct 2010 16:51:56 +0200
|
@@ -0,0 +1,225 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: README.rdoc</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>README.rdoc</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>README.rdoc
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Oct 06 16:51:52 +0200 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<h1>irbtools</h1>
|
73
|
+
<p>
|
74
|
+
This is a meta gem which installs some great irb gems and configures your
|
75
|
+
irb.
|
76
|
+
</p>
|
77
|
+
<h2>Setup</h2>
|
78
|
+
<pre>
|
79
|
+
gem install irbtools
|
80
|
+
gem install irb_rocket --source http://merbi.st
|
81
|
+
</pre>
|
82
|
+
<ul>
|
83
|
+
<li>On Linux, you also need the <tt>xclip</tt> program (apt-get install xclip).
|
84
|
+
|
85
|
+
</li>
|
86
|
+
<li>On MacOS, you need growl, if you want to use the <tt>g</tt> gem.
|
87
|
+
|
88
|
+
</li>
|
89
|
+
</ul>
|
90
|
+
<h2>Usage</h2>
|
91
|
+
<p>
|
92
|
+
To use it, put the following in your <tt>~/.irbrc</tt> file (this file is
|
93
|
+
loaded everytime you start an irb):
|
94
|
+
</p>
|
95
|
+
<pre>
|
96
|
+
require 'rubygems' # only needed in 1.8
|
97
|
+
require 'irbtools'
|
98
|
+
</pre>
|
99
|
+
<p>
|
100
|
+
If it does not exists, just create a new one.
|
101
|
+
</p>
|
102
|
+
<p>
|
103
|
+
It‘s is also possible to modify, which libraries get loaded:
|
104
|
+
</p>
|
105
|
+
<pre>
|
106
|
+
require 'irbtools/configure'
|
107
|
+
# Irbtools.libs is an array of libraries and gems which get loaded. You can manually add or remove some.
|
108
|
+
Irbtools.init
|
109
|
+
</pre>
|
110
|
+
<p>
|
111
|
+
You could also just read and copy the irbtools/configure.rb and irbtools.rb
|
112
|
+
source files, tweak them and use them directly as <tt>.irbrc</tt> ;)
|
113
|
+
</p>
|
114
|
+
<h2>Features</h2>
|
115
|
+
<p>
|
116
|
+
See <a href="http://rbjl.net/40">rbjl.net/40</a> or read the commented
|
117
|
+
source file: lib/irbtools.rb
|
118
|
+
</p>
|
119
|
+
<h3>Included gems and libraries</h3>
|
120
|
+
<ul>
|
121
|
+
<li><a href="http://pablotron.org/software/wirble/">wirble</a> colors
|
122
|
+
|
123
|
+
</li>
|
124
|
+
<li><a
|
125
|
+
href="http://tagaholic.me/2009/03/13/hirb-irb-on-the-good-stuff.html">hirb</a>
|
126
|
+
active record tables
|
127
|
+
|
128
|
+
</li>
|
129
|
+
<li><b>fileutils</b> cd, pwd, ln_s, mv, rm, mkdir, touch … ;)
|
130
|
+
|
131
|
+
</li>
|
132
|
+
<li><a href="http://rubyzucker.info">zucker/env</a> Info, OS, RubyVersion,
|
133
|
+
RubyEngine
|
134
|
+
|
135
|
+
</li>
|
136
|
+
<li><a href="http:/rubyzucker.info">zucker/debug</a> nice debug printing (q, o,
|
137
|
+
c, .m, .d)
|
138
|
+
|
139
|
+
</li>
|
140
|
+
<li><a href="http://github.com/michaeldv/awesome_print">ap</a> nice debug
|
141
|
+
printing (ap)
|
142
|
+
|
143
|
+
</li>
|
144
|
+
<li><b>yaml</b> nice debug printing (y)
|
145
|
+
|
146
|
+
</li>
|
147
|
+
<li><a href="http://github.com/janlelis/clipboard">clipboard</a> easy clipboard
|
148
|
+
access (copy & paste)
|
149
|
+
|
150
|
+
</li>
|
151
|
+
<li><a href="http://guessmethod.rubyforge.org/">guessmethod</a> automatically
|
152
|
+
correct typos (method_missing hook)
|
153
|
+
|
154
|
+
</li>
|
155
|
+
<li><a
|
156
|
+
href="http://github.com/jberkel/interactive_editor">interactive_editor</a>
|
157
|
+
lets you open vim, hack something, and it gets loaded into the current
|
158
|
+
session
|
159
|
+
|
160
|
+
</li>
|
161
|
+
<li><a href="http://coderay.rubychan.de/">coderay</a> some nice colorful
|
162
|
+
display ;)
|
163
|
+
|
164
|
+
</li>
|
165
|
+
<li><a href="http://merbi.st/plugins/22">irb_rocket</a> put result as comment
|
166
|
+
instead of a new line!
|
167
|
+
|
168
|
+
</li>
|
169
|
+
</ul>
|
170
|
+
<h2>Bugs / TODO</h2>
|
171
|
+
<ul>
|
172
|
+
<li>Make guessmethod 1.9 compatible
|
173
|
+
|
174
|
+
</li>
|
175
|
+
<li>Fix Clipboard Windows issues
|
176
|
+
|
177
|
+
</li>
|
178
|
+
<li>Fix irb_rockets general stdout problem
|
179
|
+
|
180
|
+
</li>
|
181
|
+
<li>…
|
182
|
+
|
183
|
+
</li>
|
184
|
+
</ul>
|
185
|
+
<h2>Copyright</h2>
|
186
|
+
<p>
|
187
|
+
Copyright (c) 2010 Jan Lelis, <a href="http://rbjl.net">rbjl.net</a>. See
|
188
|
+
LICENSE for details.
|
189
|
+
</p>
|
190
|
+
<p>
|
191
|
+
J-_-L
|
192
|
+
</p>
|
193
|
+
|
194
|
+
</div>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
<!-- if includes -->
|
204
|
+
|
205
|
+
<div id="section">
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
<!-- if method_list -->
|
215
|
+
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
<div id="validator-badges">
|
221
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
</body>
|
225
|
+
</html>
|
@@ -0,0 +1,115 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: configure.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>configure.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/irbtools/configure.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Oct 06 16:40:32 +0200 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
encoding: utf-8
|
74
|
+
</p>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div id="requires-list">
|
79
|
+
<h3 class="section-bar">Required files</h3>
|
80
|
+
|
81
|
+
<div class="name-list">
|
82
|
+
zucker/alias_for
|
83
|
+
zucker/env
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
<!-- if includes -->
|
94
|
+
|
95
|
+
<div id="section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if method_list -->
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
|
110
|
+
<div id="validator-badges">
|
111
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
</body>
|
115
|
+
</html>
|