looksee 4.4.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +11 -0
- data/Rakefile +27 -0
- data/ext/extconf.rb +5 -8
- data/ext/mri/3.2.0/id_table.h +36 -0
- data/ext/mri/3.2.0/internal/array.h +162 -0
- data/ext/mri/3.2.0/internal/class.h +212 -0
- data/ext/mri/3.2.0/internal/compilers.h +107 -0
- data/ext/mri/3.2.0/internal/gc.h +188 -0
- data/ext/mri/3.2.0/internal/imemo.h +242 -0
- data/ext/mri/3.2.0/internal/serial.h +23 -0
- data/ext/mri/3.2.0/internal/static_assert.h +16 -0
- data/ext/mri/3.2.0/internal/warnings.h +16 -0
- data/ext/mri/3.2.0/internal.h +113 -0
- data/ext/mri/{2.3.0 → 3.2.0}/method.h +95 -55
- data/ext/mri/mri.c +7 -37
- data/lib/looksee/adapter/base.rb +17 -3
- data/lib/looksee/adapter.rb +0 -1
- data/lib/looksee/clean.rb +1 -3
- data/lib/looksee/core_ext.rb +21 -9
- data/lib/looksee/help.rb +2 -2
- data/lib/looksee/inspector.rb +11 -0
- data/lib/looksee/lookup_path.rb +1 -1
- data/lib/looksee/version.rb +1 -1
- data/spec/looksee/adapter_spec.rb +51 -45
- data/spec/looksee/core_ext_spec.rb +2 -2
- data/spec/looksee/inspector_spec.rb +42 -0
- data/spec/looksee/lookup_path_spec.rb +1 -1
- metadata +15 -13
- data/ext/mri/2.1.0/internal.h +0 -889
- data/ext/mri/2.1.0/method.h +0 -142
- data/ext/mri/2.2.0/internal.h +0 -1182
- data/ext/mri/2.2.0/method.h +0 -141
- data/ext/mri/2.3.0/internal.h +0 -1404
- data/ext/rbx/rbx.c +0 -4
- data/lib/looksee/adapter/rubinius.rb +0 -25
- data/lib/looksee/mri.bundle +0 -0
@@ -150,6 +150,48 @@ describe Looksee::Inspector do
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
+
describe "#pretty_print" do
|
154
|
+
before do
|
155
|
+
Looksee.stub(:default_lookup_path_options).and_return({})
|
156
|
+
Looksee.stub(:styles).and_return(Hash.new{"\e[1;31m%s\e[0m"})
|
157
|
+
|
158
|
+
@object = Object.new
|
159
|
+
temporary_class :C
|
160
|
+
Looksee.adapter.ancestors[@object] = [C]
|
161
|
+
|
162
|
+
add_methods C, public: ['aa']
|
163
|
+
@lookup_path = Looksee::LookupPath.new(@object)
|
164
|
+
@inspector = Looksee::Inspector.new(@lookup_path, :visibilities => [:public])
|
165
|
+
end
|
166
|
+
|
167
|
+
it "should produce the same output as #inspect" do
|
168
|
+
pp = PP.new
|
169
|
+
@inspector.pretty_print(pp)
|
170
|
+
pp.output.should == <<-EOS.demargin.chomp
|
171
|
+
|\e[1;31mC\e[0m
|
172
|
+
| \e[1;31maa\e[0m
|
173
|
+
EOS
|
174
|
+
end
|
175
|
+
|
176
|
+
it "should not get messed up by IRB::ColorPrinter" do
|
177
|
+
begin
|
178
|
+
require 'irb/color_printer'
|
179
|
+
has_irb_color_printer = true
|
180
|
+
rescue LoadError
|
181
|
+
has_irb_color_printer = false
|
182
|
+
end
|
183
|
+
|
184
|
+
if has_irb_color_printer
|
185
|
+
pp = IRB::ColorPrinter.new
|
186
|
+
@inspector.pretty_print(pp)
|
187
|
+
pp.output.should == <<-EOS.demargin.chomp
|
188
|
+
|\e[1;31mC\e[0m
|
189
|
+
| \e[1;31maa\e[0m
|
190
|
+
EOS
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
153
195
|
describe ".styles" do
|
154
196
|
before do
|
155
197
|
styles = {
|
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:
|
4
|
+
version: 5.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:
|
11
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -26,12 +26,6 @@ files:
|
|
26
26
|
- README.markdown
|
27
27
|
- Rakefile
|
28
28
|
- ext/extconf.rb
|
29
|
-
- ext/mri/2.1.0/internal.h
|
30
|
-
- ext/mri/2.1.0/method.h
|
31
|
-
- ext/mri/2.2.0/internal.h
|
32
|
-
- ext/mri/2.2.0/method.h
|
33
|
-
- ext/mri/2.3.0/internal.h
|
34
|
-
- ext/mri/2.3.0/method.h
|
35
29
|
- ext/mri/2.7.0/internal.h
|
36
30
|
- ext/mri/2.7.0/method.h
|
37
31
|
- ext/mri/3.0.0/id_table.h
|
@@ -45,12 +39,21 @@ files:
|
|
45
39
|
- ext/mri/3.0.0/internal/static_assert.h
|
46
40
|
- ext/mri/3.0.0/internal/warnings.h
|
47
41
|
- ext/mri/3.0.0/method.h
|
42
|
+
- ext/mri/3.2.0/id_table.h
|
43
|
+
- ext/mri/3.2.0/internal.h
|
44
|
+
- ext/mri/3.2.0/internal/array.h
|
45
|
+
- ext/mri/3.2.0/internal/class.h
|
46
|
+
- ext/mri/3.2.0/internal/compilers.h
|
47
|
+
- ext/mri/3.2.0/internal/gc.h
|
48
|
+
- ext/mri/3.2.0/internal/imemo.h
|
49
|
+
- ext/mri/3.2.0/internal/serial.h
|
50
|
+
- ext/mri/3.2.0/internal/static_assert.h
|
51
|
+
- ext/mri/3.2.0/internal/warnings.h
|
52
|
+
- ext/mri/3.2.0/method.h
|
48
53
|
- ext/mri/mri.c
|
49
|
-
- ext/rbx/rbx.c
|
50
54
|
- lib/looksee.rb
|
51
55
|
- lib/looksee/adapter.rb
|
52
56
|
- lib/looksee/adapter/base.rb
|
53
|
-
- lib/looksee/adapter/rubinius.rb
|
54
57
|
- lib/looksee/clean.rb
|
55
58
|
- lib/looksee/columnizer.rb
|
56
59
|
- lib/looksee/core_ext.rb
|
@@ -58,7 +61,6 @@ files:
|
|
58
61
|
- lib/looksee/help.rb
|
59
62
|
- lib/looksee/inspector.rb
|
60
63
|
- lib/looksee/lookup_path.rb
|
61
|
-
- lib/looksee/mri.bundle
|
62
64
|
- lib/looksee/version.rb
|
63
65
|
- spec/looksee/adapter_spec.rb
|
64
66
|
- spec/looksee/clean_spec.rb
|
@@ -83,14 +85,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
85
|
requirements:
|
84
86
|
- - ">="
|
85
87
|
- !ruby/object:Gem::Version
|
86
|
-
version: '2.
|
88
|
+
version: '2.7'
|
87
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
90
|
requirements:
|
89
91
|
- - ">="
|
90
92
|
- !ruby/object:Gem::Version
|
91
93
|
version: '0'
|
92
94
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.3.6
|
94
96
|
signing_key:
|
95
97
|
specification_version: 3
|
96
98
|
summary: Supercharged method introspection in IRB.
|