tk_inspect 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/lib/tk_inspect/canvas_window/root_component.rb +2 -4
- data/lib/tk_inspect/class_browser/code_component.rb +4 -6
- data/lib/tk_inspect/class_browser/root_component.rb +28 -30
- data/lib/tk_inspect/console/root_component.rb +20 -22
- data/lib/tk_inspect/inspector/root_component.rb +15 -17
- data/lib/tk_inspect/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e270941309105cf1ea1e7a2eb9b0457f7db868c1a3a4f8fc02c9ba1b4885df3
|
4
|
+
data.tar.gz: c5bea0c56e356a83f29dfb534a183a2901851640a8556c70a0792e2b05bd35ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8edfc8b464c9140c7f35c583c93a58839430b8c64a83246382d74c3fe1cec6de525d9cce284af27a474e68c9edec3659893a0b1ff1040885c7da78a59390353
|
7
|
+
data.tar.gz: 86af794b079c2ef753edc2d608dfcb469b55c37b7c7115a1836ad6c9bd7f86f2607ba1fc0a13588e3da3f0032e6904a4fc109bb9b2b67306531caf4f481d8569
|
data/.gitignore
CHANGED
@@ -3,10 +3,8 @@ module TkInspect
|
|
3
3
|
class RootComponent < TkComponent::Base
|
4
4
|
attr_accessor :canvas_window
|
5
5
|
|
6
|
-
def
|
7
|
-
|
8
|
-
@canvas = p.canvas(sticky: 'nwes', x_flex: 1, y_flex: 1)
|
9
|
-
end
|
6
|
+
def render(p, parent_component)
|
7
|
+
@canvas = p.canvas(sticky: 'nwes', x_flex: 1, y_flex: 1)
|
10
8
|
end
|
11
9
|
|
12
10
|
def canvas
|
@@ -33,12 +33,10 @@ module TkInspect
|
|
33
33
|
attr_accessor :method_name
|
34
34
|
attr_accessor :method_line
|
35
35
|
|
36
|
-
def
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
@code_text = vf.text(sticky: 'nswe', x_flex: 1, y_flex: 1, wrap: 'none', scrollers: 'xy')
|
41
|
-
end
|
36
|
+
def render(p, parent_component)
|
37
|
+
p.vframe(padding: "0 0 0 0", sticky: 'nsew', x_flex: 1, y_flex: 1) do |vf|
|
38
|
+
@filename_label = vf.label(font: 'TkSmallCaptionFont', sticky: 'ewn', x_flex: 1, y_flex: 0)
|
39
|
+
@code_text = vf.text(sticky: 'nswe', x_flex: 1, y_flex: 1, wrap: 'none', scrollers: 'xy')
|
42
40
|
end
|
43
41
|
end
|
44
42
|
|
@@ -5,39 +5,37 @@ module TkInspect
|
|
5
5
|
class RootComponent < TkComponent::Base
|
6
6
|
attr_accessor :class_browser
|
7
7
|
|
8
|
-
def
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
rs.radio_button(text: "Namespaces", value: 'namespaces')
|
17
|
-
end
|
18
|
-
end
|
19
|
-
hf.hframe(sticky: 'ne', x_flex: 1) do |f|
|
20
|
-
f.label(text: "Filter")
|
21
|
-
f.entry(value: class_browser.class_data_source.class_filter, on_change: :filter_changed)
|
8
|
+
def render(p, parent_component)
|
9
|
+
p.vframe(sticky: 'nsew', x_flex: 1, y_flex: 1) do |vf|
|
10
|
+
vf.hframe(padding: "12", sticky: 'nsew', x_flex: 1, y_flex: 0) do |hf|
|
11
|
+
hf.hframe(sticky: 'nw') do |f|
|
12
|
+
f.label(text: "Browse by: ")
|
13
|
+
f.radio_set(value: "hierarchy", on_change: :browse_by_changed) do |rs|
|
14
|
+
rs.radio_button(text: "Class hierarchy", value: 'hierarchy')
|
15
|
+
rs.radio_button(text: "Namespaces", value: 'namespaces')
|
22
16
|
end
|
23
17
|
end
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
18
|
+
hf.hframe(sticky: 'ne', x_flex: 1) do |f|
|
19
|
+
f.label(text: "Filter")
|
20
|
+
f.entry(value: class_browser.class_data_source.class_filter, on_change: :filter_changed)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
vf.vpaned(sticky: 'nsew', x_flex: 1, y_flex: 1) do |vp|
|
24
|
+
@class_browser_comp = vp.insert_component(TkComponent::BrowserComponent, self,
|
25
|
+
data_source: class_browser.class_data_source,
|
26
|
+
selected_path: class_browser.selected_class_path,
|
27
|
+
paned: true,
|
28
|
+
sticky: 'nsew', x_flex: 1, y_flex: 1) do |bc|
|
29
|
+
bc.on_event'PathChanged', ->(e) { class_selected(e) }
|
30
|
+
end
|
31
|
+
@module_method_browser_component = vp.insert_component(TkComponent::RBrowserComponent, self,
|
32
|
+
data_source: class_browser.module_method_data_source,
|
33
|
+
paned: true,
|
34
|
+
max_columns: 2,
|
35
|
+
sticky: 'nsew', x_flex: 1, y_flex: 1) do |bc|
|
36
|
+
bc.on_event'PathChanged', ->(e) { module_method_selected(e) }
|
40
37
|
end
|
38
|
+
@code = vp.insert_component(CodeComponent, self, sticky: 'nsew', x_flex: 1, y_flex: 1)
|
41
39
|
end
|
42
40
|
end
|
43
41
|
end
|
@@ -3,31 +3,29 @@ module TkInspect
|
|
3
3
|
class RootComponent < TkComponent::Base
|
4
4
|
attr_accessor :console
|
5
5
|
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
buttons.button(text: "Return", on_click: :return_from_modal) if console.modal
|
14
|
-
end
|
6
|
+
def render(p, parent_component)
|
7
|
+
p.vframe(sticky: 'nsew', x_flex: 1, y_flex: 1) do |r|
|
8
|
+
r.hframe(sticky: 'new', padding: '8', x_flex: 0) do |hf|
|
9
|
+
hf.label(text: "Write Ruby code here", sticky: 'w')
|
10
|
+
hf.hframe(sticky: 'ne', x_flex: 1) do |buttons|
|
11
|
+
buttons.button(text: "Run selected", default: "active", on_click: :run_selected)
|
12
|
+
buttons.button(text: "Return", on_click: :return_from_modal) if console.modal
|
15
13
|
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
14
|
+
end
|
15
|
+
r.vpaned(sticky: 'nswe', x_flex: 1, y_flex: 1) do |vp|
|
16
|
+
@input = vp.text(sticky: 'nswe', scrollers: 'y',
|
17
|
+
highlightthickness: 0,
|
18
|
+
x_flex: 1, y_flex: 1)
|
19
|
+
vp.vframe(padding: "0 0 0 0", sticky: 'nswe', x_flex: 1, y_flex: 1) do |vf|
|
20
|
+
vf.hframe(sticky: 'new', padding: '8', x_flex: 0) do |hf|
|
21
|
+
hf.label(text: "Output", padding: '8', sticky: 'w')
|
22
|
+
hf.hframe(sticky: 'ne', x_flex: 1) do |buttons|
|
23
|
+
buttons.button(text: "Clear", on_click: :clear_output)
|
26
24
|
end
|
27
|
-
@output = vf.text(sticky: 'nswe', scrollers: 'y',
|
28
|
-
background: 'systemSheetBackgroundOpaque', highlightthickness: 0,
|
29
|
-
x_flex: 1, y_flex: 1)
|
30
25
|
end
|
26
|
+
@output = vf.text(sticky: 'nswe', scrollers: 'y',
|
27
|
+
background: 'systemSheetBackgroundOpaque', highlightthickness: 0,
|
28
|
+
x_flex: 1, y_flex: 1)
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -3,23 +3,21 @@ module TkInspect
|
|
3
3
|
class RootComponent < TkComponent::Base
|
4
4
|
attr_accessor :inspector
|
5
5
|
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
hf.button(text: "Refresh", on_click: ->(e) { regenerate })
|
22
|
-
end
|
6
|
+
def render(p, parent_component)
|
7
|
+
p.vframe(padding: "0 0 0 0", sticky: 'nsew', x_flex: 1, y_flex: 1) do |f|
|
8
|
+
@table = f.insert_component(TkComponent::TableViewComponent, self,
|
9
|
+
data_source: self,
|
10
|
+
columns: [
|
11
|
+
{ key: :var, text: 'Variable', anchor: 'w' },
|
12
|
+
{ key: :value, text: 'Value', anchor: 'center' },
|
13
|
+
{ key: :klass, text: 'Class', anchor: 'center' }
|
14
|
+
],
|
15
|
+
nested: true,
|
16
|
+
lazy: true,
|
17
|
+
sticky: 'nsew', x_flex: 1, y_flex: 1)
|
18
|
+
f.hframe(sticky: 'se', padding: '8', x_flex: 1) do |hf|
|
19
|
+
hf.button(text: "Browse selected class", on_click: :browse_class)
|
20
|
+
hf.button(text: "Refresh", on_click: ->(e) { regenerate })
|
23
21
|
end
|
24
22
|
end
|
25
23
|
end
|
data/lib/tk_inspect/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tk_inspect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Egea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tk_component
|
@@ -95,7 +95,6 @@ files:
|
|
95
95
|
- ".travis.yml"
|
96
96
|
- CODE_OF_CONDUCT.md
|
97
97
|
- Gemfile
|
98
|
-
- Gemfile.lock
|
99
98
|
- LICENSE.txt
|
100
99
|
- README.md
|
101
100
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
tk_inspect (0.1.0)
|
5
|
-
rouge (~> 3.26)
|
6
|
-
tk_component (~> 0.1.2)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
activesupport (6.0.3.4)
|
12
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>= 0.7, < 2)
|
14
|
-
minitest (~> 5.1)
|
15
|
-
tzinfo (~> 1.1)
|
16
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
17
|
-
byebug (11.1.3)
|
18
|
-
coderay (1.1.3)
|
19
|
-
concurrent-ruby (1.1.8)
|
20
|
-
diff-lcs (1.4.4)
|
21
|
-
i18n (1.8.7)
|
22
|
-
concurrent-ruby (~> 1.0)
|
23
|
-
method_source (1.0.0)
|
24
|
-
minitest (5.14.3)
|
25
|
-
pry (0.13.1)
|
26
|
-
coderay (~> 1.1)
|
27
|
-
method_source (~> 1.0)
|
28
|
-
pry-byebug (3.9.0)
|
29
|
-
byebug (~> 11.0)
|
30
|
-
pry (~> 0.13.0)
|
31
|
-
rake (10.5.0)
|
32
|
-
rouge (3.26.0)
|
33
|
-
rspec (3.10.0)
|
34
|
-
rspec-core (~> 3.10.0)
|
35
|
-
rspec-expectations (~> 3.10.0)
|
36
|
-
rspec-mocks (~> 3.10.0)
|
37
|
-
rspec-core (3.10.0)
|
38
|
-
rspec-support (~> 3.10.0)
|
39
|
-
rspec-expectations (3.10.0)
|
40
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.10.0)
|
42
|
-
rspec-mocks (3.10.0)
|
43
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.10.0)
|
45
|
-
rspec-support (3.10.0)
|
46
|
-
thread_safe (0.3.6)
|
47
|
-
tk (0.3.0)
|
48
|
-
tk_component (0.1.2)
|
49
|
-
activesupport (~> 6.0.3)
|
50
|
-
tk (~> 0.3.0)
|
51
|
-
tzinfo (1.2.9)
|
52
|
-
thread_safe (~> 0.1)
|
53
|
-
zeitwerk (2.4.2)
|
54
|
-
|
55
|
-
PLATFORMS
|
56
|
-
ruby
|
57
|
-
|
58
|
-
DEPENDENCIES
|
59
|
-
bundler (~> 1.16)
|
60
|
-
pry
|
61
|
-
pry-byebug
|
62
|
-
rake (~> 10.0)
|
63
|
-
rspec (~> 3.0)
|
64
|
-
tk_inspect!
|
65
|
-
|
66
|
-
BUNDLED WITH
|
67
|
-
1.16.6
|