looksee 4.4.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 = {
@@ -89,7 +89,7 @@ describe Looksee::LookupPath do
89
89
  end
90
90
  end
91
91
 
92
- describe Looksee::LookupPath::Entry do
92
+ describe 'Looksee::LookupPath::Entry' do
93
93
  it "should iterate over methods in alphabetical order" do
94
94
  temporary_class(:C)
95
95
  add_methods(C, public: [:a, :c, :b])
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.4.0
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: 2021-01-17 00:00:00.000000000 Z
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.1'
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.2.3
95
+ rubygems_version: 3.3.6
94
96
  signing_key:
95
97
  specification_version: 3
96
98
  summary: Supercharged method introspection in IRB.