wxruby3 0.9.0.pre.beta.13 → 0.9.0.pre.beta.14
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/lib/wx/accessors.rb +8 -2
- data/lib/wx/global_const.rb +24 -18
- data/lib/wx/version.rb +1 -1
- data/rakelib/lib/generate/doc.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e6a85a400700ba48119fc656cf79208b3f5f603eaafb01d30206de46876dbf1
|
4
|
+
data.tar.gz: ffe7e7cde7840f547efe45893162bfc54e2bd9402d7aaf975a98f298fbdbdf8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86dc10b04a49bd56825267b23117720fa5b2398cb01194cdd050fa9d8f6c81ba5a80426447a82fa747a725cdb1802bc0138ebd43322c7c162104a14c5a71ebb3
|
7
|
+
data.tar.gz: e9aa356d29c7d571f68a99dbd33041aed71d770951cca3d32a37b5eab634da938b9da931dad7fefafb67ad33401535357c27db647798e764abdd0def4133f09a
|
data/lib/wx/accessors.rb
CHANGED
@@ -56,8 +56,14 @@ module WxRubyStyleAccessors
|
|
56
56
|
|
57
57
|
def self.included(mod)
|
58
58
|
mod.extend WxRubyStyleAccessors
|
59
|
-
|
60
|
-
|
59
|
+
org_verbose = $VERBOSE
|
60
|
+
begin
|
61
|
+
$VERBOSE = nil
|
62
|
+
mod.constants.collect { | c | mod.const_get(c) }.grep(Module).each do |mod|
|
63
|
+
mod.include WxRubyStyleAccessors if mod.name.start_with?('Wx::') # only setup Wx namespace
|
64
|
+
end
|
65
|
+
ensure
|
66
|
+
$VERBOSE = org_verbose
|
61
67
|
end
|
62
68
|
end
|
63
69
|
end
|
data/lib/wx/global_const.rb
CHANGED
@@ -7,24 +7,30 @@ module WxGlobalConstants
|
|
7
7
|
def search_nested(mod, sym, path = [])
|
8
8
|
# check any nested modules and/or (enum) classes
|
9
9
|
const_val = nil
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
10
|
+
org_verbose = $VERBOSE
|
11
|
+
begin
|
12
|
+
$VERBOSE = nil
|
13
|
+
mod.constants.each do |c|
|
14
|
+
case cv = mod.const_get(c)
|
15
|
+
when ::Class
|
16
|
+
if cv < Wx::Enum
|
17
|
+
# the only thing of interest in Enum classes are the enum values
|
18
|
+
const_val = cv[sym]
|
19
|
+
elsif cv.name.start_with?('Wx::') # only search Wx namespace
|
20
|
+
# prevent const_missing being triggered here since that may lead to unexpected results
|
21
|
+
const_val = cv.const_get(sym) if cv.constants.include?(sym)
|
22
|
+
const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
|
23
|
+
end
|
24
|
+
when ::Module
|
25
|
+
if cv.name.start_with?('Wx::') # only search Wx namespace
|
26
|
+
const_val = cv.const_get(sym) if cv.constants.include?(sym)
|
27
|
+
const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
|
28
|
+
end
|
29
|
+
end unless mod == cv # watch out for infinite recursion
|
30
|
+
break if const_val
|
31
|
+
end
|
32
|
+
ensure
|
33
|
+
$VERBOSE = org_verbose
|
28
34
|
end
|
29
35
|
const_val
|
30
36
|
end
|
data/lib/wx/version.rb
CHANGED
data/rakelib/lib/generate/doc.rb
CHANGED
@@ -24,7 +24,7 @@ module WXRuby3
|
|
24
24
|
def handle_module(mod, table)
|
25
25
|
mod.constants.each do |c|
|
26
26
|
a_const = mod.const_get(c)
|
27
|
-
if ::Module === a_const || ::Class === a_const # Package submodule or Class (possibly Enum)
|
27
|
+
if (::Module === a_const || ::Class === a_const) && a_const.name.start_with?('Wx::') # Wx:: Package submodule or Class (possibly Enum)
|
28
28
|
handle_module(a_const, table[c.to_s] = {})
|
29
29
|
elsif Wx::Enum === a_const
|
30
30
|
table[c.to_s] = { type: a_const.class.name.split('::').last, value: "\#{a_const.class}.new(\#{a_const.to_i})" }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wxruby3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.0.pre.beta.
|
4
|
+
version: 0.9.0.pre.beta.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Corino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|