irbtools 1.1.0.pre.2 → 1.1.0.pre.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/irbtools/libraries.rb +75 -73
  3. metadata +39 -39
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0.pre.2
1
+ 1.1.0.pre.3
@@ -3,11 +3,79 @@
3
3
 
4
4
  require 'rbconfig'
5
5
 
6
+
6
7
  # # # load on startup
7
8
 
8
9
  Irbtools.add_library :yaml
9
10
 
10
11
 
12
+ # # # load via thread
13
+ # the :stdlib thread ensures proper loading of fileutils and tempfile
14
+
15
+ Irbtools.add_library :fileutils, :thread => :stdlib do # cd, pwd, ln_s, mv, rm, mkdir, touch ... ;)
16
+ include FileUtils::Verbose
17
+
18
+ # patch cd so that it also shows the current directory
19
+ def cd( path = File.expand_path('~') )
20
+ new_last_path = FileUtils.pwd
21
+ if path == '-'
22
+ if @last_path
23
+ path = @last_path
24
+ else
25
+ warn 'Sorry, there is no previous directory.'
26
+ return
27
+ end
28
+ end
29
+ cd path
30
+ @last_path = new_last_path
31
+ ls
32
+ end
33
+ end
34
+
35
+ # ls, cat, rq, rrq, ld, session_history, reset!, clear, dbg, ...
36
+ Irbtools.add_library 'every_day_irb', :thread => 10
37
+
38
+ # nice debug printing (q, o, c, .m, .d)
39
+ Irbtools.add_library 'zucker/debug', :thread => 20
40
+
41
+ # nice debug printing (ap)
42
+ Irbtools.add_library 'ap', :thread => 30
43
+
44
+ # nice debug printing (g)
45
+ Irbtools.add_library 'g', :thread => 40 if RbConfig::CONFIG['host_os'] =~ /mac|darwin/
46
+
47
+ # lets you open vim (or your favourite editor), hack something, save it, and it's loaded in the current irb session
48
+ Irbtools.add_library 'interactive_editor', :thread => :stdlib
49
+
50
+ # another, more flexible "start editor and it gets loaded into your irb session" plugin
51
+ Irbtools.add_library 'sketches', :thread => :stdlib
52
+
53
+ # object oriented ri method
54
+ Irbtools.add_library :ori, :thread => 50 do
55
+ class Object
56
+ # patch ori to also allow shell-like "Array#slice" syntax
57
+ def ri(*args)
58
+ if args[0] &&
59
+ self == TOPLEVEL_BINDING.eval('self') &&
60
+ args[0] =~ /\A(.*)(?:#|\.)(.*)\Z/
61
+ begin
62
+ klass = Object.const_get $1
63
+ klass.ri $2
64
+ rescue
65
+ super
66
+ end
67
+ else
68
+ super
69
+ end
70
+ end
71
+ end
72
+ end
73
+
74
+ # Object#method_lookup_path (improved ancestors) & Object#methods_for (get this method from all ancestors)
75
+ Irbtools.add_library :method_locator, :thread => 60
76
+
77
+
78
+
11
79
  # # # load via late
12
80
 
13
81
  # terminal colors
@@ -33,38 +101,9 @@ Irbtools.add_library 'wirb/wp', :late_thread => :a # ap alternative (wp)
33
101
 
34
102
  Irbtools.add_library 'paint/pa', :late_thread => :b # colorize a string (pa)
35
103
 
36
- # Object#l method for inspecting its load path
37
- Irbtools.add_library 'looksee', :late_thread => :c do
38
- Looksee::ObjectMixin.rename :ls => :l, :edit => :src
39
- class Object; alias ll l end
40
- end
41
-
42
- # # # load via thread
43
- # the :stdlib thread ensures proper loading of fileutils and tempfile
44
-
45
- Irbtools.add_library :fileutils, :thread => :stdlib do # cd, pwd, ln_s, mv, rm, mkdir, touch ... ;)
46
- include FileUtils::Verbose
47
-
48
- # patch cd so that it also shows the current directory
49
- def cd( path = File.expand_path('~') )
50
- new_last_path = FileUtils.pwd
51
- if path == '-'
52
- if @last_path
53
- path = @last_path
54
- else
55
- warn 'Sorry, there is no previous directory.'
56
- return
57
- end
58
- end
59
- cd path
60
- @last_path = new_last_path
61
- ls
62
- end
63
- end
64
-
65
104
  # tables, menus...
66
- Irbtools.add_library :hirb, :thread => :stdlib do
67
- Hirb::View.enable :output=>{"Object"=>{:ancestor => true, :options => { :unicode => true }}},
105
+ Irbtools.add_library :hirb, :late_thread => :hirb do
106
+ Hirb::View.enable :output => { "Object" => {:ancestor => true, :options => { :unicode => true }}},
68
107
  :pager_command => 'less -R'
69
108
  extend Hirb::Console
70
109
 
@@ -101,59 +140,22 @@ Irbtools.add_library :hirb, :thread => :stdlib do
101
140
  end
102
141
  end
103
142
  end
104
-
105
143
  end
106
144
 
107
145
  # command framework
108
- Irbtools.add_library :boson, :thread => :stdlib do
146
+ Irbtools.add_library :boson, :late_thread => :hirb do
109
147
  # hirb issues, TODO fix cleanly
110
148
  undef install if respond_to?( :install, true )
111
149
  Hirb::Console.class_eval do undef menu end if respond_to?( :menu, true )
112
150
  Boson.start :verbose => false
113
151
  end
114
152
 
115
- # ls, cat, rq, rrq, ld, session_history, reset!, clear, dbg, ...
116
- Irbtools.add_library 'every_day_irb', :thread => 10
117
-
118
- # nice debug printing (q, o, c, .m, .d)
119
- Irbtools.add_library 'zucker/debug', :thread => 20
120
-
121
- # nice debug printing (ap)
122
- Irbtools.add_library 'ap', :thread => 30
123
-
124
- # nice debug printing (g)
125
- Irbtools.add_library 'g', :thread => 40 if RbConfig::CONFIG['host_os'] =~ /mac|darwin/
126
-
127
- # lets you open vim (or your favourite editor), hack something, save it, and it's loaded in the current irb session
128
- Irbtools.add_library 'interactive_editor', :thread => :stdlib
129
-
130
- # another, more flexible "start editor and it gets loaded into your irb session" plugin
131
- Irbtools.add_library 'sketches', :thread => :stdlib
132
-
133
- # object oriented ri method
134
- Irbtools.add_library :ori, :thread => 50 do
135
- class Object
136
- # patch ori to also allow shell-like "Array#slice" syntax
137
- def ri(*args)
138
- if args[0] &&
139
- self == TOPLEVEL_BINDING.eval('self') &&
140
- args[0] =~ /\A(.*)(?:#|\.)(.*)\Z/
141
- begin
142
- klass = Object.const_get $1
143
- klass.ri $2
144
- rescue
145
- super
146
- end
147
- else
148
- super
149
- end
150
- end
151
- end
153
+ # Object#l method for inspecting its load path
154
+ Irbtools.add_library 'looksee', :late_thread => :c do
155
+ Looksee::ObjectMixin.rename :ls => :l, :edit => :src
156
+ class Object; alias ll l end
152
157
  end
153
158
 
154
- # Object#method_lookup_path (improved ancestors) & Object#methods_for (get this method from all ancestors)
155
- Irbtools.add_library :method_locator, :thread => 60
156
-
157
159
  # # # load via autoload
158
160
 
159
161
  # useful information pseudo-constants
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irbtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.2
4
+ version: 1.1.0.pre.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-24 00:00:00.000000000Z
12
+ date: 2011-10-26 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paint
16
- requirement: &11753520 !ruby/object:Gem::Requirement
16
+ requirement: &20252220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.8.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11753520
24
+ version_requirements: *20252220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fancy_irb
27
- requirement: &11752820 !ruby/object:Gem::Requirement
27
+ requirement: &20707300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.7.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *11752820
35
+ version_requirements: *20707300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: zucker
38
- requirement: &11752080 !ruby/object:Gem::Requirement
38
+ requirement: &20706200 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '11'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *11752080
46
+ version_requirements: *20706200
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hirb
49
- requirement: &11751440 !ruby/object:Gem::Requirement
49
+ requirement: &20705400 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.5.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *11751440
57
+ version_requirements: *20705400
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: awesome_print
60
- requirement: &11747440 !ruby/object:Gem::Requirement
60
+ requirement: &20704520 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.4.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *11747440
68
+ version_requirements: *20704520
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: clipboard
71
- requirement: &11746380 !ruby/object:Gem::Requirement
71
+ requirement: &20703400 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.9.9
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *11746380
79
+ version_requirements: *20703400
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: coderay
82
- requirement: &11745660 !ruby/object:Gem::Requirement
82
+ requirement: &20654640 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.0.0
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *11745660
90
+ version_requirements: *20654640
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: boson
93
- requirement: &11744980 !ruby/object:Gem::Requirement
93
+ requirement: &20653360 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.3.4
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *11744980
101
+ version_requirements: *20653360
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: wirb
104
- requirement: &11744320 !ruby/object:Gem::Requirement
104
+ requirement: &20652220 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.4.1
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *11744320
112
+ version_requirements: *20652220
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: interactive_editor
115
- requirement: &11743680 !ruby/object:Gem::Requirement
115
+ requirement: &20650880 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.0.10
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *11743680
123
+ version_requirements: *20650880
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: ori
126
- requirement: &11742980 !ruby/object:Gem::Requirement
126
+ requirement: &20649380 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.1.0
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *11742980
134
+ version_requirements: *20649380
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: sketches
137
- requirement: &11742320 !ruby/object:Gem::Requirement
137
+ requirement: &20648140 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 0.1.1
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *11742320
145
+ version_requirements: *20648140
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: g
148
- requirement: &11741600 !ruby/object:Gem::Requirement
148
+ requirement: &20596360 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 1.4.0
154
154
  type: :runtime
155
155
  prerelease: false
156
- version_requirements: *11741600
156
+ version_requirements: *20596360
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: methodfinder
159
- requirement: &11740860 !ruby/object:Gem::Requirement
159
+ requirement: &20595000 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 1.2.3
165
165
  type: :runtime
166
166
  prerelease: false
167
- version_requirements: *11740860
167
+ version_requirements: *20595000
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: method_locator
170
- requirement: &11740080 !ruby/object:Gem::Requirement
170
+ requirement: &20594060 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 0.0.4
176
176
  type: :runtime
177
177
  prerelease: false
178
- version_requirements: *11740080
178
+ version_requirements: *20594060
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: looksee
181
- requirement: &11736200 !ruby/object:Gem::Requirement
181
+ requirement: &20592220 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ~>
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 1.0.3
187
187
  type: :runtime
188
188
  prerelease: false
189
- version_requirements: *11736200
189
+ version_requirements: *20592220
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: rvm_loader
192
- requirement: &11735500 !ruby/object:Gem::Requirement
192
+ requirement: &20591280 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ! '>='
@@ -197,18 +197,18 @@ dependencies:
197
197
  version: 1.0.0
198
198
  type: :runtime
199
199
  prerelease: false
200
- version_requirements: *11735500
200
+ version_requirements: *20591280
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: every_day_irb
203
- requirement: &11734760 !ruby/object:Gem::Requirement
203
+ requirement: &20590540 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
207
207
  - !ruby/object:Gem::Version
208
- version: 1.1.0.pre.2
208
+ version: 1.1.0.pre.3
209
209
  type: :runtime
210
210
  prerelease: false
211
- version_requirements: *11734760
211
+ version_requirements: *20590540
212
212
  description: irbtools is a meta gem that installs useful irb gems and configures your
213
213
  irb. Simply put a require "irbtools" in the .irbrc file in your home directory.
214
214
  email: mail@janlelis.de