looksee 3.0.1-universal-java-1.8 → 3.1.0-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 +0 -17
- data/lib/looksee/core_ext.rb +25 -16
- data/lib/looksee/version.rb +1 -1
- data/spec/looksee/core_ext_spec.rb +5 -31
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7365cd1e3c06af7f160fa01552778583a880f9ac
|
4
|
+
data.tar.gz: 15e7400186185b6f7261346b99f874e5e9fd1bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f93aa5bde3883fbf764c2f1b0616c2cbbbc96e10add7930724260b9065e2ab77b6a9e1eb993f4681e6f5de1685dcad9fb4be20d56bdc689198ecc10d75f8da56
|
7
|
+
data.tar.gz: 1046ba75a1e6304bc6afd37c8ff55e4bee6de74b85a664ddbcde495dc45bdf0e0be89cf16854b65afe9afe5f6a0b5273032101d8b12c83c0f4d9c1691bd34f83
|
data/CHANGELOG
CHANGED
data/lib/looksee/JRuby.jar
CHANGED
Binary file
|
data/lib/looksee/clean.rb
CHANGED
@@ -132,23 +132,6 @@ 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
|
-
|
152
135
|
#
|
153
136
|
# Show a quick reference.
|
154
137
|
#
|
data/lib/looksee/core_ext.rb
CHANGED
@@ -1,28 +1,37 @@
|
|
1
1
|
module Looksee
|
2
2
|
module ObjectMixin
|
3
3
|
#
|
4
|
-
#
|
4
|
+
# Shortcut for Looksee[self, *args].
|
5
5
|
#
|
6
|
-
|
7
|
-
|
8
|
-
#
|
9
|
-
def method_missing(name, *args)
|
10
|
-
if name == Looksee::ObjectMixin.inspection_method
|
11
|
-
Looksee[self, *args]
|
12
|
-
else
|
13
|
-
super
|
14
|
-
end
|
6
|
+
def ls(*args)
|
7
|
+
Looksee[self, *args]
|
15
8
|
end
|
16
9
|
|
17
|
-
def
|
18
|
-
name
|
10
|
+
def self.rename(name) # :nodoc:
|
11
|
+
name = name[:ls] if name.is_a?(Hash)
|
12
|
+
alias_method name, :ls
|
13
|
+
remove_method :ls
|
19
14
|
end
|
15
|
+
end
|
20
16
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
#
|
18
|
+
# Rename the #ls method, added to every object. Example:
|
19
|
+
#
|
20
|
+
# rename :_ls
|
21
|
+
#
|
22
|
+
# This renames Looksee's #ls method to #_ls.
|
23
|
+
#
|
24
|
+
# For backward compatibility, the old-style invocation is also
|
25
|
+
# supported. Please note this is deprecated.
|
26
|
+
#
|
27
|
+
# rename :ls => :_ls
|
28
|
+
#
|
29
|
+
def self.rename(name)
|
30
|
+
ObjectMixin.rename(name)
|
25
31
|
end
|
26
32
|
|
33
|
+
name = ENV['LOOKSEE_METHOD'] and
|
34
|
+
rename name
|
35
|
+
|
27
36
|
Object.send :include, ObjectMixin
|
28
37
|
end
|
data/lib/looksee/version.rb
CHANGED
@@ -1,43 +1,17 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Looksee::ObjectMixin do
|
4
|
-
before do
|
5
|
-
@object = Object.new
|
6
|
-
Looksee.stub(:default_specifiers).and_return([])
|
7
|
-
end
|
8
|
-
|
9
4
|
describe "#ls" do
|
5
|
+
before do
|
6
|
+
@object = Object.new
|
7
|
+
Looksee.stub(:default_specifiers).and_return([])
|
8
|
+
end
|
9
|
+
|
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
|
42
16
|
end
|
43
17
|
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.1.0
|
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-
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|