looksee 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
- ENV['LOOKSEE_METHODS'] = nil
1
+ $:.unshift File.expand_path('..', File.dirname(__FILE__))
2
+ ENV['LOOKSEE_METHOD'] = nil
2
3
 
3
4
  require 'rspec'
4
5
  require 'looksee'
@@ -18,8 +19,3 @@ NATIVE_ADAPTER = Looksee.adapter
18
19
  RSpec.configure do |config|
19
20
  config.before { Looksee.adapter = TestAdapter.new }
20
21
  end
21
-
22
- if Looksee.ruby_engine == 'jruby'
23
- require 'jruby'
24
- JRuby.objectspace = true
25
- end
@@ -42,29 +42,6 @@ module TemporaryClasses
42
42
  mod
43
43
  end
44
44
 
45
- #
46
- # Remove all methods defined exactly on the given module.
47
- #
48
- # As Ruby's reflection on singleton classes of classes isn't quite
49
- # adequate, you need to provide a :class_singleton option when such
50
- # a class is given.
51
- #
52
- def remove_methods(mod, opts={})
53
- names = all_instance_methods(mod)
54
-
55
- # all_instance_methods can't get just the methods on a class
56
- # singleton class. Filter out superclass methods here.
57
- if opts[:class_singleton]
58
- klass = ObjectSpace.each_object(mod){|klass| break klass}
59
- names -= all_instance_methods(klass.superclass.singleton_class)
60
- end
61
-
62
- names.sort_by{|name| name.in?([:remove_method, :send]) ? 1 : 0}.flatten
63
- names.each do |name|
64
- mod.send :remove_method, name
65
- end
66
- end
67
-
68
45
  #
69
46
  # Replace the methods of the given module with those named.
70
47
  #
@@ -78,8 +55,7 @@ module TemporaryClasses
78
55
  #
79
56
  # replace_methods MyClass, :public => [:a, :b]
80
57
  #
81
- def replace_methods(mod, options={})
82
- remove_methods(mod, options)
58
+ def add_methods(mod, options={})
83
59
  mod.module_eval do
84
60
  [:public, :protected, :private].each do |visibility|
85
61
  Array(options[visibility]).each do |name|
@@ -12,10 +12,9 @@ describe Looksee::WirbleCompatibility do
12
12
  |c.ls
13
13
  EOS
14
14
  code = code.chomp.gsub(/\n/, ';') # only print value of last line
15
- irb = File.join Looksee::Config::CONFIG['bindir'], 'irb'
16
- lib_dir = File.expand_path('lib')
15
+ lib = File.expand_path('lib')
17
16
  # irb hangs when using readline without a tty
18
- output = IO.popen("bundle exec #{irb} -f --noreadline --noprompt --noverbose -I#{lib_dir} 2>&1", 'r+') do |io|
17
+ output = IO.popen("bundle exec irb -f --noreadline --noprompt --noverbose -I#{lib}", 'r+') do |io|
19
18
  io.puts code
20
19
  io.flush
21
20
  io.close_write
metadata CHANGED
@@ -1,57 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: looksee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Ogata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-22 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: ritual
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: 0.4.1
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: 0.4.1
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: 2.5.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
39
- - !ruby/object:Gem::Version
40
- version: 2.5.0
41
- - !ruby/object:Gem::Dependency
42
- name: wirble
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
11
+ date: 2014-01-01 00:00:00.000000000 Z
12
+ dependencies: []
55
13
  description:
56
14
  email:
57
15
  - george.ogata@gmail.com
@@ -63,36 +21,11 @@ extra_rdoc_files:
63
21
  - LICENSE
64
22
  - README.markdown
65
23
  files:
66
- - lib/looksee/adapter/base.rb
67
- - lib/looksee/adapter/base.rbc
68
- - lib/looksee/adapter/rubinius.rb
69
- - lib/looksee/adapter/rubinius.rbc
70
- - lib/looksee/adapter.rb
71
- - lib/looksee/adapter.rbc
72
- - lib/looksee/clean.rb
73
- - lib/looksee/clean.rbc
74
- - lib/looksee/columnizer.rb
75
- - lib/looksee/columnizer.rbc
76
- - lib/looksee/core_ext.rb
77
- - lib/looksee/core_ext.rbc
78
- - lib/looksee/editor.rb
79
- - lib/looksee/editor.rbc
80
- - lib/looksee/help.rb
81
- - lib/looksee/inspector.rb
82
- - lib/looksee/inspector.rbc
83
- - lib/looksee/JRuby.jar
84
- - lib/looksee/lookup_path.rb
85
- - lib/looksee/lookup_path.rbc
86
- - lib/looksee/rbx.bundle
87
- - lib/looksee/shortcuts.rb
88
- - lib/looksee/version.rb
89
- - lib/looksee/version.rbc
90
- - lib/looksee/wirble_compatibility.rb
91
- - lib/looksee/wirble_compatibility.rbc
92
- - lib/looksee.rb
93
- - lib/looksee.rbc
94
- - ext/mri/mri.c
95
- - ext/rbx/rbx.c
24
+ - CHANGELOG
25
+ - LICENSE
26
+ - README.markdown
27
+ - Rakefile
28
+ - ext/extconf.rb
96
29
  - ext/mri/1.9.2/debug.h
97
30
  - ext/mri/1.9.2/id.h
98
31
  - ext/mri/1.9.2/method.h
@@ -112,14 +45,28 @@ files:
112
45
  - ext/mri/1.9.3/vm_opts.h
113
46
  - ext/mri/2.0.0/internal.h
114
47
  - ext/mri/2.0.0/method.h
48
+ - ext/mri/2.1.0/internal.h
49
+ - ext/mri/2.1.0/method.h
115
50
  - ext/mri/env-1.8.h
116
51
  - ext/mri/eval_c-1.8.h
52
+ - ext/mri/mri.c
117
53
  - ext/mri/node-1.9.h
118
- - ext/extconf.rb
119
- - CHANGELOG
120
- - LICENSE
121
- - Rakefile
122
- - README.markdown
54
+ - ext/rbx/rbx.c
55
+ - lib/looksee.rb
56
+ - lib/looksee/JRuby.jar
57
+ - lib/looksee/adapter.rb
58
+ - lib/looksee/adapter/base.rb
59
+ - lib/looksee/adapter/rubinius.rb
60
+ - lib/looksee/clean.rb
61
+ - lib/looksee/columnizer.rb
62
+ - lib/looksee/core_ext.rb
63
+ - lib/looksee/editor.rb
64
+ - lib/looksee/help.rb
65
+ - lib/looksee/inspector.rb
66
+ - lib/looksee/lookup_path.rb
67
+ - lib/looksee/shortcuts.rb
68
+ - lib/looksee/version.rb
69
+ - lib/looksee/wirble_compatibility.rb
123
70
  - spec/adapter_spec.rb
124
71
  - spec/columnizer_spec.rb
125
72
  - spec/core_ext_spec.rb
@@ -141,17 +88,17 @@ require_paths:
141
88
  - lib
142
89
  required_ruby_version: !ruby/object:Gem::Requirement
143
90
  requirements:
144
- - - '>='
91
+ - - ">="
145
92
  - !ruby/object:Gem::Version
146
93
  version: '0'
147
94
  required_rubygems_version: !ruby/object:Gem::Requirement
148
95
  requirements:
149
- - - '>='
96
+ - - ">="
150
97
  - !ruby/object:Gem::Version
151
98
  version: '0'
152
99
  requirements: []
153
100
  rubyforge_project:
154
- rubygems_version: 2.0.3
101
+ rubygems_version: 2.2.0
155
102
  signing_key:
156
103
  specification_version: 3
157
104
  summary: Supercharged method introspection in IRB.
data/lib/looksee.rbc DELETED
@@ -1,92 +0,0 @@
1
- !RBIX
2
- 9595534255132031488
3
- x
4
- M
5
- 1
6
- n
7
- n
8
- x
9
- 10
10
- __script__
11
- i
12
- 29
13
- 5
14
- 7
15
- 0
16
- 64
17
- 47
18
- 49
19
- 1
20
- 1
21
- 15
22
- 5
23
- 7
24
- 2
25
- 64
26
- 47
27
- 49
28
- 1
29
- 1
30
- 15
31
- 45
32
- 3
33
- 4
34
- 43
35
- 5
36
- 49
37
- 6
38
- 0
39
- 15
40
- 2
41
- 11
42
- I
43
- 2
44
- I
45
- 0
46
- I
47
- 0
48
- I
49
- 0
50
- n
51
- p
52
- 7
53
- s
54
- 13
55
- looksee/clean
56
- x
57
- 7
58
- require
59
- s
60
- 16
61
- looksee/core_ext
62
- x
63
- 7
64
- Looksee
65
- n
66
- x
67
- 19
68
- WirbleCompatibility
69
- x
70
- 4
71
- init
72
- p
73
- 7
74
- I
75
- 0
76
- I
77
- 1
78
- I
79
- 9
80
- I
81
- 2
82
- I
83
- 12
84
- I
85
- 5
86
- I
87
- 1d
88
- x
89
- 35
90
- /Users/g/src/looksee/lib/looksee.rb
91
- p
92
- 0
@@ -1,303 +0,0 @@
1
- !RBIX
2
- 9595534255132031488
3
- x
4
- M
5
- 1
6
- n
7
- n
8
- x
9
- 10
10
- __script__
11
- i
12
- 28
13
- 99
14
- 7
15
- 0
16
- 65
17
- 49
18
- 1
19
- 2
20
- 13
21
- 99
22
- 12
23
- 7
24
- 2
25
- 12
26
- 7
27
- 3
28
- 12
29
- 65
30
- 12
31
- 49
32
- 4
33
- 4
34
- 15
35
- 49
36
- 2
37
- 0
38
- 15
39
- 2
40
- 11
41
- I
42
- 6
43
- I
44
- 0
45
- I
46
- 0
47
- I
48
- 0
49
- n
50
- p
51
- 5
52
- x
53
- 7
54
- Looksee
55
- x
56
- 11
57
- open_module
58
- x
59
- 15
60
- __module_init__
61
- M
62
- 1
63
- n
64
- n
65
- x
66
- 7
67
- Looksee
68
- i
69
- 28
70
- 5
71
- 66
72
- 99
73
- 7
74
- 0
75
- 65
76
- 49
77
- 1
78
- 2
79
- 13
80
- 99
81
- 12
82
- 7
83
- 2
84
- 12
85
- 7
86
- 3
87
- 12
88
- 65
89
- 12
90
- 49
91
- 4
92
- 4
93
- 15
94
- 49
95
- 2
96
- 0
97
- 11
98
- I
99
- 6
100
- I
101
- 0
102
- I
103
- 0
104
- I
105
- 0
106
- n
107
- p
108
- 5
109
- x
110
- 7
111
- Adapter
112
- x
113
- 11
114
- open_module
115
- x
116
- 15
117
- __module_init__
118
- M
119
- 1
120
- n
121
- n
122
- x
123
- 7
124
- Adapter
125
- i
126
- 63
127
- 5
128
- 66
129
- 5
130
- 7
131
- 0
132
- 7
133
- 1
134
- 64
135
- 47
136
- 49
137
- 2
138
- 2
139
- 15
140
- 5
141
- 7
142
- 3
143
- 7
144
- 4
145
- 45
146
- 5
147
- 6
148
- 43
149
- 7
150
- 43
151
- 8
152
- 7
153
- 9
154
- 64
155
- 49
156
- 10
157
- 1
158
- 47
159
- 101
160
- 11
161
- 63
162
- 2
163
- 47
164
- 49
165
- 2
166
- 2
167
- 15
168
- 5
169
- 7
170
- 12
171
- 7
172
- 13
173
- 64
174
- 47
175
- 49
176
- 2
177
- 2
178
- 15
179
- 5
180
- 7
181
- 14
182
- 7
183
- 15
184
- 64
185
- 47
186
- 49
187
- 2
188
- 2
189
- 11
190
- I
191
- 5
192
- I
193
- 0
194
- I
195
- 0
196
- I
197
- 0
198
- n
199
- p
200
- 16
201
- x
202
- 4
203
- Base
204
- s
205
- 20
206
- looksee/adapter/base
207
- x
208
- 8
209
- autoload
210
- x
211
- 3
212
- MRI
213
- s
214
- 12
215
- looksee/mri.
216
- x
217
- 7
218
- Looksee
219
- n
220
- x
221
- 6
222
- Config
223
- x
224
- 6
225
- CONFIG
226
- s
227
- 5
228
- DLEXT
229
- x
230
- 2
231
- []
232
- x
233
- 4
234
- to_s
235
- x
236
- 5
237
- JRuby
238
- s
239
- 17
240
- looksee/JRuby.jar
241
- x
242
- 8
243
- Rubinius
244
- s
245
- 24
246
- looksee/adapter/rubinius
247
- p
248
- 9
249
- I
250
- 2
251
- I
252
- 3
253
- I
254
- d
255
- I
256
- 4
257
- I
258
- 29
259
- I
260
- 5
261
- I
262
- 34
263
- I
264
- 6
265
- I
266
- 3f
267
- x
268
- 43
269
- /Users/g/src/looksee/lib/looksee/adapter.rb
270
- p
271
- 0
272
- x
273
- 13
274
- attach_method
275
- p
276
- 3
277
- I
278
- 2
279
- I
280
- 2
281
- I
282
- 1c
283
- x
284
- 43
285
- /Users/g/src/looksee/lib/looksee/adapter.rb
286
- p
287
- 0
288
- x
289
- 13
290
- attach_method
291
- p
292
- 3
293
- I
294
- 0
295
- I
296
- 1
297
- I
298
- 1c
299
- x
300
- 43
301
- /Users/g/src/looksee/lib/looksee/adapter.rb
302
- p
303
- 0