looksee 3.0.0-universal-java-1.8 → 3.0.1-universal-java-1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/lib/looksee/JRuby.jar +0 -0
- data/lib/looksee/clean.rb +17 -0
- data/lib/looksee/core_ext.rb +6 -26
- data/lib/looksee/version.rb +1 -1
- data/spec/looksee/core_ext_spec.rb +31 -5
- metadata +28 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb6de4a38e30fddb774e1f416178ebe20d83ff2f
|
4
|
+
data.tar.gz: ab36c55072e59cc7e7596fe2b2afd0716b6e899d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 804c6151e41e28312495ff6a46550ed93c43772176ad3bd1ba5c9b8fb85507e3f24ffad0cb7de421bf9245e6b39aeac0e611659c40618eebaad6caa8bbf52409
|
7
|
+
data.tar.gz: bbecd51016366719cbbb853aebe036f579f549cc9c4b3b397c4b87369a36d10e5ea88d6d40edcc95e69572b88d53cc1dc86df3a893b1a1e80e579e2d1ddd3c86
|
data/CHANGELOG
CHANGED
data/lib/looksee/JRuby.jar
CHANGED
Binary file
|
data/lib/looksee/clean.rb
CHANGED
@@ -132,6 +132,23 @@ module Looksee
|
|
132
132
|
Inspector.new(lookup_path, options)
|
133
133
|
end
|
134
134
|
|
135
|
+
#
|
136
|
+
# Rename the #ls method, added to every object. Example:
|
137
|
+
#
|
138
|
+
# rename :_ls
|
139
|
+
#
|
140
|
+
# This renames Looksee's #ls method to #_ls.
|
141
|
+
#
|
142
|
+
# For backward compatibility, the old-style invocation is also
|
143
|
+
# supported. Please note this is deprecated.
|
144
|
+
#
|
145
|
+
# rename :ls => :_ls
|
146
|
+
#
|
147
|
+
def rename(name)
|
148
|
+
name = name[:ls] if name.is_a?(Hash)
|
149
|
+
ObjectMixin.inspection_method = name
|
150
|
+
end
|
151
|
+
|
135
152
|
#
|
136
153
|
# Show a quick reference.
|
137
154
|
#
|
data/lib/looksee/core_ext.rb
CHANGED
@@ -7,42 +7,22 @@ module Looksee
|
|
7
7
|
# relies on Object#ls not existing.
|
8
8
|
#
|
9
9
|
def method_missing(name, *args)
|
10
|
-
if name ==
|
10
|
+
if name == Looksee::ObjectMixin.inspection_method
|
11
11
|
Looksee[self, *args]
|
12
12
|
else
|
13
13
|
super
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
18
|
-
|
17
|
+
def respond_to_missing?(name, include_private=false)
|
18
|
+
name == Looksee::ObjectMixin.inspection_method || super
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
alias_method name, :ls
|
24
|
-
remove_method :ls
|
21
|
+
class << self
|
22
|
+
attr_accessor :inspection_method
|
25
23
|
end
|
24
|
+
self.inspection_method = ENV['LOOKSEE_METHOD'] || :ls
|
26
25
|
end
|
27
26
|
|
28
|
-
#
|
29
|
-
# Rename the #ls method, added to every object. Example:
|
30
|
-
#
|
31
|
-
# rename :_ls
|
32
|
-
#
|
33
|
-
# This renames Looksee's #ls method to #_ls.
|
34
|
-
#
|
35
|
-
# For backward compatibility, the old-style invocation is also
|
36
|
-
# supported. Please note this is deprecated.
|
37
|
-
#
|
38
|
-
# rename :ls => :_ls
|
39
|
-
#
|
40
|
-
def self.rename(name)
|
41
|
-
ObjectMixin.rename(name)
|
42
|
-
end
|
43
|
-
|
44
|
-
name = ENV['LOOKSEE_METHOD'] and
|
45
|
-
rename name
|
46
|
-
|
47
27
|
Object.send :include, ObjectMixin
|
48
28
|
end
|
data/lib/looksee/version.rb
CHANGED
@@ -1,17 +1,43 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Looksee::ObjectMixin do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
4
|
+
before do
|
5
|
+
@object = Object.new
|
6
|
+
Looksee.stub(:default_specifiers).and_return([])
|
7
|
+
end
|
9
8
|
|
9
|
+
describe "#ls" do
|
10
10
|
it "should return an Inspector for the object's lookup path using the given arguments" do
|
11
11
|
result = @object.ls(:private)
|
12
12
|
result.should be_a(Looksee::Inspector)
|
13
13
|
result.lookup_path.object.should.equal?(@object)
|
14
14
|
result.visibilities.should == Set[:private]
|
15
15
|
end
|
16
|
+
|
17
|
+
context "when #ls is renamed" do
|
18
|
+
before { Looksee.rename(:ls2) }
|
19
|
+
after { Looksee.rename(:ls) }
|
20
|
+
|
21
|
+
it "should honor the new name" do
|
22
|
+
@object.ls2.should be_a(Looksee::Inspector)
|
23
|
+
expect { @object.ls }.to raise_error(NoMethodError)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#respond_to_missing?" do
|
29
|
+
it "should be true for :ls" do
|
30
|
+
@object.__send__(:respond_to_missing?, :ls).should == true
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when #ls renamed" do
|
34
|
+
before { Looksee.rename(:ls2) }
|
35
|
+
after { Looksee.rename(:ls) }
|
36
|
+
|
37
|
+
it "should honor the new name" do
|
38
|
+
@object.__send__(:respond_to_missing?, :ls2).should == true
|
39
|
+
@object.__send__(:respond_to_missing?, :ls).should == false
|
40
|
+
end
|
41
|
+
end
|
16
42
|
end
|
17
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: looksee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: universal-java-1.8
|
6
6
|
authors:
|
7
7
|
- George Ogata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -20,25 +20,11 @@ extra_rdoc_files:
|
|
20
20
|
- LICENSE
|
21
21
|
- README.markdown
|
22
22
|
files:
|
23
|
-
-
|
24
|
-
-
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
28
|
-
- lib/looksee/editor.rb
|
29
|
-
- lib/looksee/help.rb
|
30
|
-
- lib/looksee/inspector.rb
|
31
|
-
- lib/looksee/JRuby.jar
|
32
|
-
- lib/looksee/lookup_path.rb
|
33
|
-
- lib/looksee/rbx.bundle
|
34
|
-
- lib/looksee/version.rb
|
35
|
-
- lib/looksee/adapter/base.rb
|
36
|
-
- lib/looksee/adapter/rubinius.rb
|
37
|
-
- ext/mri/mri.c
|
38
|
-
- ext/rbx/rbx.c
|
39
|
-
- ext/mri/env-1.8.h
|
40
|
-
- ext/mri/eval_c-1.8.h
|
41
|
-
- ext/mri/node-1.9.h
|
23
|
+
- CHANGELOG
|
24
|
+
- LICENSE
|
25
|
+
- README.markdown
|
26
|
+
- Rakefile
|
27
|
+
- ext/extconf.rb
|
42
28
|
- ext/mri/1.9.2/debug.h
|
43
29
|
- ext/mri/1.9.2/id.h
|
44
30
|
- ext/mri/1.9.2/method.h
|
@@ -62,12 +48,25 @@ files:
|
|
62
48
|
- ext/mri/2.1.0/method.h
|
63
49
|
- ext/mri/2.2.0/internal.h
|
64
50
|
- ext/mri/2.2.0/method.h
|
65
|
-
- ext/
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
51
|
+
- ext/mri/env-1.8.h
|
52
|
+
- ext/mri/eval_c-1.8.h
|
53
|
+
- ext/mri/mri.c
|
54
|
+
- ext/mri/node-1.9.h
|
55
|
+
- ext/rbx/rbx.c
|
56
|
+
- lib/looksee.rb
|
57
|
+
- lib/looksee/JRuby.jar
|
58
|
+
- lib/looksee/adapter.rb
|
59
|
+
- lib/looksee/adapter/base.rb
|
60
|
+
- lib/looksee/adapter/rubinius.rb
|
61
|
+
- lib/looksee/clean.rb
|
62
|
+
- lib/looksee/columnizer.rb
|
63
|
+
- lib/looksee/core_ext.rb
|
64
|
+
- lib/looksee/editor.rb
|
65
|
+
- lib/looksee/help.rb
|
66
|
+
- lib/looksee/inspector.rb
|
67
|
+
- lib/looksee/lookup_path.rb
|
68
|
+
- lib/looksee/rbx.bundle
|
69
|
+
- lib/looksee/version.rb
|
71
70
|
- spec/looksee/adapter_spec.rb
|
72
71
|
- spec/looksee/clean_spec.rb
|
73
72
|
- spec/looksee/columnizer_spec.rb
|
@@ -75,6 +74,7 @@ files:
|
|
75
74
|
- spec/looksee/editor_spec.rb
|
76
75
|
- spec/looksee/inspector_spec.rb
|
77
76
|
- spec/looksee/lookup_path_spec.rb
|
77
|
+
- spec/spec_helper.rb
|
78
78
|
- spec/support/core_ext.rb
|
79
79
|
- spec/support/temporary_classes.rb
|
80
80
|
- spec/support/test_adapter.rb
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
|
-
rubygems_version: 2.
|
101
|
+
rubygems_version: 2.4.5
|
102
102
|
signing_key:
|
103
103
|
specification_version: 3
|
104
104
|
summary: Supercharged method introspection in IRB.
|