irbtools 1.1.0.pre.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,8 +1,9 @@
1
- 1.1.10.pre
1
+ 1.1.0
2
2
  * fix hirb loading/unicode issue + colorize tables (thanks to halan)
3
3
  * colorize paged wirb output
4
4
  * include method locator gem (improved ancestors)
5
- * include looksee gem (aliased as Object#l/Object#ll and Object#src)
5
+ * include looksee gem (aliased as Object#l/Object#ll and Object#edit)
6
+ * include method source gem (Object#src)
6
7
  * small tweaks...
7
8
 
8
9
  1.0.6
data/README.rdoc CHANGED
@@ -65,7 +65,8 @@ See http://rbjl.net/40-irbtools-release-the-power-of-irb or read the commented s
65
65
  [methodfinder[https://github.com/citizen428/methodfinder]] interesting method finder (mf)
66
66
  [ori[https://github.com/dadooda/ori]] object-oriented <tt>.ri</tt> method
67
67
  [method_locator[https://github.com/ryanlecompte/method_locator]] .method_lookup_path (improved ancestors) and .methods_for (get this method from all ancestors)
68
- [looksee[https://github.com/oggy/looksee]] great loadpath inspector (.l), also can open the source of a method (.src)
68
+ [method_source[https://github.com/banister/method_source]] .src can be shown for ruby methods
69
+ [looksee[https://github.com/oggy/looksee]] great loadpath inspector (.l), also can open the source of many methods in the editor (.edit)
69
70
  [*fileutils* (stdlib)] cd, pwd, ln_s, mv, rm, mkdir, touch ... ;)
70
71
 
71
72
  === Not included anymore
@@ -115,9 +116,10 @@ There are irbtools extension packages, which can be modified via:
115
116
 
116
117
  These packages add/modify the libraries to be loaded. For an example, see {irbtools-more}[https://github.com/janlelis/irbtools-more].
117
118
 
118
- == TODO irbtools 1.1.0
119
+ == TODO
120
+ * More speed optimizations
119
121
  * Fix/Improve RVM stuff
120
- * Way to use irbtools without Bundler
122
+ * Clean way to use irbtools without bundler (already tried a little bit, but was way too hacky so far)
121
123
  * Show some features in README
122
124
 
123
125
  == Copyright
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0.pre.3
1
+ 1.1.0
data/irbtools.gemspec CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  s.version = File.read('VERSION').chomp
7
7
 
8
8
  s.authors = ["Jan Lelis"]
9
- s.summary = 'irbtools is a meta gem that installs useful irb gems and configures your irb.'
10
- s.description = 'irbtools is a meta gem that installs useful irb gems and configures your irb. Simply put a require "irbtools" in the .irbrc file in your home directory.'
9
+ s.summary = 'irbtools is a "meta gem" that installs a bunch of useful irb gems and configures them for you.'
10
+ s.description = 'irbtools is a "meta gem" that installs a bnuch of useful irb gems and configures them for you. Simply put a require "irbtools" in the .irbrc file in your home directory.'
11
11
  s.email = 'mail@janlelis.de'
12
12
  s.extra_rdoc_files = %w[LICENSE README.rdoc]
13
13
  s.files = %w[lib/irbtools.rb lib/irbtools/configure.rb lib/irbtools/libraries.rb lib/irbtools/minimal.rb VERSION CHANGELOG Rakefile irbtools.gemspec]
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.required_ruby_version = '>= 1.8.7'
16
16
 
17
17
  s.add_dependency %q<paint>, ">= 0.8.3"
18
- s.add_dependency %q<fancy_irb>, ">= 0.7.1"
18
+ s.add_dependency %q<fancy_irb>, ">= 0.7.2"
19
19
  s.add_dependency %q<zucker>, ">= 11"
20
20
  s.add_dependency %q<hirb>, "~> 0.5.0"
21
21
  s.add_dependency %q<awesome_print>, "~> 0.4.0"
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.add_dependency %q<g>, ">= 1.4.0"
30
30
  s.add_dependency %q<methodfinder>, ">= 1.2.3"
31
31
  s.add_dependency %q<method_locator>,">= 0.0.4"
32
+ s.add_dependency %q<method_source>, ">= 0.6.7"
32
33
  s.add_dependency %q<looksee>, "~> 1.0.3"
33
34
  s.add_dependency %q<rvm_loader>, ">= 1.0.0"
34
35
  s.add_dependency %q<every_day_irb>, ">= #{ s.version }"
@@ -48,7 +48,7 @@ Irbtools.add_library 'g', :thread => 40 if RbConfig::CONFIG['host_os'] =~ /mac|d
48
48
  Irbtools.add_library 'interactive_editor', :thread => :stdlib
49
49
 
50
50
  # another, more flexible "start editor and it gets loaded into your irb session" plugin
51
- Irbtools.add_library 'sketches', :thread => :stdlib
51
+ Irbtools.add_library 'sketches', :thread => :stdlib
52
52
 
53
53
  # object oriented ri method
54
54
  Irbtools.add_library :ori, :thread => 50 do
@@ -74,7 +74,28 @@ end
74
74
  # Object#method_lookup_path (improved ancestors) & Object#methods_for (get this method from all ancestors)
75
75
  Irbtools.add_library :method_locator, :thread => 60
76
76
 
77
-
77
+ # view method source :)
78
+ Irbtools.add_library :method_source, :thread => 70 do
79
+ class Object
80
+ def src(method_name)
81
+ m = method(method_name)
82
+
83
+ source = m.source || ""
84
+ comment = m.comment && !m.comment.empty? ? m.comment + "\n" : ""
85
+ location = m.source_location ? "#{ source.match(/^\s+/) }# in #{ m.source_location*':' }\n" : ""
86
+
87
+ puts CodeRay.scan(
88
+ location + comment + source, :ruby
89
+ ).term
90
+ rescue
91
+ raise unless $!.message =~ /Cannot locate source for this method/
92
+
93
+ nil
94
+ end
95
+
96
+ # alias source src # TODO activate this without warnings oO
97
+ end
98
+ end
78
99
 
79
100
  # # # load via late
80
101
 
@@ -152,7 +173,7 @@ end
152
173
 
153
174
  # Object#l method for inspecting its load path
154
175
  Irbtools.add_library 'looksee', :late_thread => :c do
155
- Looksee::ObjectMixin.rename :ls => :l, :edit => :src
176
+ Looksee::ObjectMixin.rename :ls => :l
156
177
  class Object; alias ll l end
157
178
  end
158
179
 
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irbtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.3
5
- prerelease: 6
4
+ version: 1.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jan Lelis
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-26 00:00:00.000000000Z
12
+ date: 2011-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paint
16
- requirement: &20252220 !ruby/object:Gem::Requirement
16
+ requirement: &12646860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,21 +21,21 @@ dependencies:
21
21
  version: 0.8.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *20252220
24
+ version_requirements: *12646860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fancy_irb
27
- requirement: &20707300 !ruby/object:Gem::Requirement
27
+ requirement: &12646160 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: 0.7.1
32
+ version: 0.7.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *20707300
35
+ version_requirements: *12646160
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: zucker
38
- requirement: &20706200 !ruby/object:Gem::Requirement
38
+ requirement: &12644680 !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: *20706200
46
+ version_requirements: *12644680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hirb
49
- requirement: &20705400 !ruby/object:Gem::Requirement
49
+ requirement: &12632560 !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: *20705400
57
+ version_requirements: *12632560
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: awesome_print
60
- requirement: &20704520 !ruby/object:Gem::Requirement
60
+ requirement: &12631500 !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: *20704520
68
+ version_requirements: *12631500
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: clipboard
71
- requirement: &20703400 !ruby/object:Gem::Requirement
71
+ requirement: &12630040 !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: *20703400
79
+ version_requirements: *12630040
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: coderay
82
- requirement: &20654640 !ruby/object:Gem::Requirement
82
+ requirement: &12628560 !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: *20654640
90
+ version_requirements: *12628560
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: boson
93
- requirement: &20653360 !ruby/object:Gem::Requirement
93
+ requirement: &12627540 !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: *20653360
101
+ version_requirements: *12627540
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: wirb
104
- requirement: &20652220 !ruby/object:Gem::Requirement
104
+ requirement: &12626560 !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: *20652220
112
+ version_requirements: *12626560
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: interactive_editor
115
- requirement: &20650880 !ruby/object:Gem::Requirement
115
+ requirement: &12625580 !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: *20650880
123
+ version_requirements: *12625580
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: ori
126
- requirement: &20649380 !ruby/object:Gem::Requirement
126
+ requirement: &12625040 !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: *20649380
134
+ version_requirements: *12625040
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: sketches
137
- requirement: &20648140 !ruby/object:Gem::Requirement
137
+ requirement: &12621820 !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: *20648140
145
+ version_requirements: *12621820
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: g
148
- requirement: &20596360 !ruby/object:Gem::Requirement
148
+ requirement: &12620880 !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: *20596360
156
+ version_requirements: *12620880
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: methodfinder
159
- requirement: &20595000 !ruby/object:Gem::Requirement
159
+ requirement: &12620060 !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: *20595000
167
+ version_requirements: *12620060
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: method_locator
170
- requirement: &20594060 !ruby/object:Gem::Requirement
170
+ requirement: &12619400 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,10 +175,21 @@ dependencies:
175
175
  version: 0.0.4
176
176
  type: :runtime
177
177
  prerelease: false
178
- version_requirements: *20594060
178
+ version_requirements: *12619400
179
+ - !ruby/object:Gem::Dependency
180
+ name: method_source
181
+ requirement: &12618900 !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: 0.6.7
187
+ type: :runtime
188
+ prerelease: false
189
+ version_requirements: *12618900
179
190
  - !ruby/object:Gem::Dependency
180
191
  name: looksee
181
- requirement: &20592220 !ruby/object:Gem::Requirement
192
+ requirement: &12618420 !ruby/object:Gem::Requirement
182
193
  none: false
183
194
  requirements:
184
195
  - - ~>
@@ -186,10 +197,10 @@ dependencies:
186
197
  version: 1.0.3
187
198
  type: :runtime
188
199
  prerelease: false
189
- version_requirements: *20592220
200
+ version_requirements: *12618420
190
201
  - !ruby/object:Gem::Dependency
191
202
  name: rvm_loader
192
- requirement: &20591280 !ruby/object:Gem::Requirement
203
+ requirement: &12617900 !ruby/object:Gem::Requirement
193
204
  none: false
194
205
  requirements:
195
206
  - - ! '>='
@@ -197,20 +208,21 @@ dependencies:
197
208
  version: 1.0.0
198
209
  type: :runtime
199
210
  prerelease: false
200
- version_requirements: *20591280
211
+ version_requirements: *12617900
201
212
  - !ruby/object:Gem::Dependency
202
213
  name: every_day_irb
203
- requirement: &20590540 !ruby/object:Gem::Requirement
214
+ requirement: &12617340 !ruby/object:Gem::Requirement
204
215
  none: false
205
216
  requirements:
206
217
  - - ! '>='
207
218
  - !ruby/object:Gem::Version
208
- version: 1.1.0.pre.3
219
+ version: 1.1.0
209
220
  type: :runtime
210
221
  prerelease: false
211
- version_requirements: *20590540
212
- description: irbtools is a meta gem that installs useful irb gems and configures your
213
- irb. Simply put a require "irbtools" in the .irbrc file in your home directory.
222
+ version_requirements: *12617340
223
+ description: irbtools is a "meta gem" that installs a bnuch of useful irb gems and
224
+ configures them for you. Simply put a require "irbtools" in the .irbrc file in your
225
+ home directory.
214
226
  email: mail@janlelis.de
215
227
  executables: []
216
228
  extensions: []
@@ -245,14 +257,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
257
  required_rubygems_version: !ruby/object:Gem::Requirement
246
258
  none: false
247
259
  requirements:
248
- - - ! '>'
260
+ - - ! '>='
249
261
  - !ruby/object:Gem::Version
250
- version: 1.3.1
262
+ version: '0'
251
263
  requirements: []
252
264
  rubyforge_project:
253
- rubygems_version: 1.8.11
265
+ rubygems_version: 1.8.10
254
266
  signing_key:
255
267
  specification_version: 3
256
- summary: irbtools is a meta gem that installs useful irb gems and configures your
257
- irb.
268
+ summary: irbtools is a "meta gem" that installs a bunch of useful irb gems and configures
269
+ them for you.
258
270
  test_files: []