win32ole-pp 1.0.0 → 1.1.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.
- data/CHANGELOG.txt +11 -0
- data/History.txt +5 -0
- data/README.txt +103 -48
- data/Rakefile +3 -4
- data/examples/test.rb +1 -1
- data/lib/win32ole_pp.rb +0 -3
- data/lib/win32ole_pp/extentions/common.rb +15 -2
- data/lib/win32ole_pp/extentions/win32ole.rb +4 -7
- data/lib/win32ole_pp/extentions/win32ole_event.rb +4 -7
- data/lib/win32ole_pp/extentions/win32ole_method.rb +24 -7
- data/lib/win32ole_pp/extentions/win32ole_param.rb +14 -14
- data/lib/win32ole_pp/extentions/win32ole_type.rb +21 -9
- data/lib/win32ole_pp/extentions/win32ole_variable.rb +14 -9
- data/lib/win32ole_pp/pp.rb +3 -0
- data/lib/win32ole_pp/to_s.rb +3 -0
- data/lib/win32ole_pp/version.rb +1 -1
- data/test/test_win32ole.rb +5 -0
- data/test/test_win32ole_event.rb +5 -0
- data/test/test_win32ole_method.rb +23 -23
- data/test/test_win32ole_param.rb +9 -9
- data/test/test_win32ole_type.rb +7 -7
- data/test/test_win32ole_variable.rb +2 -2
- metadata +5 -5
data/CHANGELOG.txt
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
2007-02-25 MIYAMUKO Katsuyuki
|
2
|
+
|
3
|
+
* win32ole-pp 1.1.0 released!
|
4
|
+
|
5
|
+
* extentions/win32ole_method.rb,
|
6
|
+
extentions/win32ole_param.rb,
|
7
|
+
extentions/win32ole_type.rb,
|
8
|
+
extentions/win32ole_variable.rb (pretty_print): adjust property order.
|
9
|
+
|
10
|
+
* extentions/common.rb (address_banner): fix wrong object address.
|
11
|
+
|
1
12
|
2007-02-12 MIYAMUKO Katsuyuki
|
2
13
|
|
3
14
|
* win32ole-pp 1.0.0 released!
|
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -6,64 +6,119 @@
|
|
6
6
|
|
7
7
|
=== DESCRIPTION:
|
8
8
|
|
9
|
-
|
9
|
+
win32ole-pp provides smart #to_s and pretty printer for WIN32OLE object.
|
10
10
|
|
11
|
-
|
11
|
+
This library helps to develop/debug WIN32OLE applications.
|
12
|
+
|
13
|
+
=== FEATURES:
|
12
14
|
|
13
15
|
* add WIN32OLE#pretty_print method for pp.
|
14
|
-
*
|
16
|
+
* override WIN32OLE#to_s.
|
15
17
|
|
16
18
|
=== SYNOPSIS:
|
17
19
|
|
18
20
|
require "pp"
|
19
21
|
require "win32ole"
|
22
|
+
|
23
|
+
require "rubygems"
|
20
24
|
require "win32ole_pp"
|
21
25
|
|
22
|
-
|
23
|
-
|
24
|
-
puts
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
26
|
+
ie = WIN32OLE.new('InternetExplorer.Application')
|
27
|
+
|
28
|
+
puts ie #=> #<WIN32OLE:0x2962380: IWebBrowser2>
|
29
|
+
|
30
|
+
pp ie #=> #<WIN32OLE:0x2962380: IWebBrowser2
|
31
|
+
# AddressBar=true,
|
32
|
+
# Application=#<WIN32OLE:0x296150c: IWebBrowser2>,
|
33
|
+
# Busy=false,
|
34
|
+
# Container=nil,
|
35
|
+
# FullName="C:\\Program Files\\Internet Explorer\\iexplore.exe",
|
36
|
+
# FullScreen=false,
|
37
|
+
# HWND=19923710,
|
38
|
+
# Height=903,
|
39
|
+
# Left=0,
|
40
|
+
# LocationName="",
|
41
|
+
# LocationURL="",
|
42
|
+
# MenuBar=true,
|
43
|
+
# Name="Microsoft Internet Explorer",
|
44
|
+
# Offline=false,
|
45
|
+
# Parent=#<WIN32OLE:0x29610ac: IWebBrowser2>,
|
46
|
+
# Path="C:\\Program Files\\Internet Explorer\\",
|
47
|
+
# ReadyState=0,
|
48
|
+
# RegisterAsBrowser=false,
|
49
|
+
# RegisterAsDropTarget=true,
|
50
|
+
# Resizable=false,
|
51
|
+
# Silent=false,
|
52
|
+
# StatusBar=true,
|
53
|
+
# StatusText="",
|
54
|
+
# TheaterMode=false,
|
55
|
+
# ToolBar=1,
|
56
|
+
# Top=0,
|
57
|
+
# TopLevelContainer=true,
|
58
|
+
# Visible=false,
|
59
|
+
# Width=1096>
|
60
|
+
|
61
|
+
|
62
|
+
nav = ie.ole_method("Navigate")
|
63
|
+
|
64
|
+
puts nav #=> #<WIN32OLE_METHOD:0x295b3dc: VOID Navigate([in] BSTR URL,
|
65
|
+
# [in, optional] VARIANT Flags, [in, optional] VARIANT TargetFrameName,
|
66
|
+
# [in, optional] VARIANT PostData, [in, optional] VARIANT Headers)>
|
67
|
+
|
68
|
+
pp nav #=> #<WIN32OLE_METHOD:0x295b3dc: Navigate
|
69
|
+
# name="Navigate",
|
70
|
+
# dispid=104,
|
71
|
+
# helpstring="Navigates to a URL or file.",
|
72
|
+
# helpcontext=0,
|
73
|
+
# helpfile="",
|
74
|
+
# invoke_kind="FUNC",
|
75
|
+
# invkind=1,
|
76
|
+
# return_type="VOID",
|
77
|
+
# return_type_detail=["VOID"],
|
78
|
+
# return_vtype=24,
|
79
|
+
# size_opt_params=4,
|
80
|
+
# size_params=5,
|
81
|
+
# offset_vtbl=44,
|
82
|
+
# visible?=true,
|
83
|
+
# event?=false,
|
84
|
+
# event_interface=nil,
|
85
|
+
# params=
|
86
|
+
# [#<WIN32OLE_PARAM:0x295a66c: URL
|
87
|
+
# name="URL",
|
88
|
+
# ole_type="BSTR",
|
89
|
+
# ole_type_detail=["BSTR"],
|
90
|
+
# default=nil,
|
91
|
+
# input?=true,
|
92
|
+
# output?=false,
|
93
|
+
# optional?=false,
|
94
|
+
# retval?=false>,
|
95
|
+
# #<WIN32OLE_PARAM:0x295a644: Flags
|
96
|
+
# name="Flags",
|
97
|
+
# <snip>
|
98
|
+
|
99
|
+
|
100
|
+
ie.Navigate("http://www.ruby-lang.org/")
|
101
|
+
sleep(1) while ie.ReadyState !=4
|
102
|
+
|
103
|
+
news = ie.document.getElementById("news")
|
104
|
+
puts news #=> #<WIN32OLE:0x29286d0: DispHTMLDivElement>
|
105
|
+
|
106
|
+
pp news #=> #<WIN32OLE:0x29286d0: DispHTMLDivElement
|
107
|
+
# accessKey="",
|
108
|
+
# align="",
|
109
|
+
# all=#<WIN32OLE:0x29a7bc4: DispHTMLElementCollection>,
|
110
|
+
# attributes=#<WIN32OLE:0x29a7b88: DispHTMLAttributeCollection>,
|
111
|
+
# behaviorUrns=#<WIN32OLE:0x29a7b4c: IHTMLUrnCollection>,
|
112
|
+
# canHaveChildren=true,
|
113
|
+
# canHaveHTML=true,
|
114
|
+
# childNodes=#<WIN32OLE:0x29a7ac0: DispDOMChildrenCollection>,
|
115
|
+
# children=#<WIN32OLE:0x29a7a84: DispHTMLElementCollection>,
|
116
|
+
# <snip>
|
117
|
+
|
118
|
+
ul = news.getElementsByTagName("ul").Item(0)
|
119
|
+
ul.childNodes.each do |e|
|
120
|
+
puts e.innerText
|
121
|
+
end
|
67
122
|
|
68
123
|
|
69
124
|
=== REQUIREMENTS:
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ RUBYFORGE_PROJECT = 'win32ole-pp'
|
|
12
12
|
$shell_command_filter = []
|
13
13
|
alias sh_original sh
|
14
14
|
def sh(*cmd, &block)
|
15
|
-
cmd = $shell_command_filter.inject(cmd){|c,filter| filter(c) or c }
|
15
|
+
cmd = $shell_command_filter.inject(cmd){|c,filter| filter.call(c) or c }
|
16
16
|
sh_original(*cmd, &block)
|
17
17
|
end
|
18
18
|
|
@@ -40,13 +40,12 @@ end
|
|
40
40
|
|
41
41
|
Hoe.new(RUBYFORGE_PROJECT, WIN32OLE_PP::VERSION::STRING) do |p|
|
42
42
|
p.rubyforge_name = RUBYFORGE_PROJECT
|
43
|
-
p.summary = 'pretty printer for WIN32OLE'
|
44
|
-
|
45
43
|
p.author = ["MIYAMUKO Katsuyuki"]
|
46
44
|
p.email = "miyamuko@gmail.com"
|
47
45
|
p.url = "http://win32ole-pp.rubyforge.org/"
|
48
46
|
|
49
|
-
p.
|
47
|
+
p.summary = p.paragraphs_of('README.txt', 3..3)[0]
|
48
|
+
p.description = p.paragraphs_of('README.txt', 3..4).join("\n\n")
|
50
49
|
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
51
50
|
|
52
51
|
p.need_zip = true
|
data/examples/test.rb
CHANGED
data/lib/win32ole_pp.rb
CHANGED
@@ -7,9 +7,9 @@ module WIN32OLE_PP
|
|
7
7
|
|
8
8
|
def address_banner(subname = nil)
|
9
9
|
if subname
|
10
|
-
"%s:0x%x: %s" % [self.class, object_id, subname]
|
10
|
+
"%s:0x%x: %s" % [self.class, object_id << 1, subname]
|
11
11
|
else
|
12
|
-
"%s:0x%x" % [self.class, object_id]
|
12
|
+
"%s:0x%x" % [self.class, object_id << 1]
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -34,6 +34,19 @@ module WIN32OLE_PP
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
module ToStringBase
|
38
|
+
include WIN32OLE_PP::Extentions::Common::Utils
|
39
|
+
|
40
|
+
def to_s_ext
|
41
|
+
"#<%s>" % [address_banner(display_string)]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
module PrettyPrintBase
|
46
|
+
include WIN32OLE_PP::Extentions::Common::Utils
|
47
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrint
|
48
|
+
end
|
49
|
+
|
37
50
|
module ToStringHook
|
38
51
|
def self.included(klass)
|
39
52
|
klass.class_eval {
|
@@ -3,19 +3,16 @@ module WIN32OLE_PP
|
|
3
3
|
module WIN32OLE
|
4
4
|
|
5
5
|
module SmartToString
|
6
|
-
include WIN32OLE_PP::Extentions::Common::
|
6
|
+
include WIN32OLE_PP::Extentions::Common::ToStringBase
|
7
7
|
include WIN32OLE_PP::Extentions::Common::ToStringHook
|
8
8
|
|
9
|
-
def
|
10
|
-
|
11
|
-
rescue
|
12
|
-
to_s_original
|
9
|
+
def display_string
|
10
|
+
ole_obj_help.name
|
13
11
|
end
|
14
12
|
end
|
15
13
|
|
16
14
|
module PrettyPrint
|
17
|
-
include WIN32OLE_PP::Extentions::Common::
|
18
|
-
include WIN32OLE_PP::Extentions::Common::PrettyPrint
|
15
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrintBase
|
19
16
|
|
20
17
|
def pretty_print(q)
|
21
18
|
props = ole_properties.map{|e| [e.name, self[e.name]] rescue nil }.compact
|
@@ -13,19 +13,16 @@ module WIN32OLE_PP
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module SmartToString
|
16
|
-
include WIN32OLE_PP::Extentions::Common::
|
16
|
+
include WIN32OLE_PP::Extentions::Common::ToStringBase
|
17
17
|
include WIN32OLE_PP::Extentions::Common::ToStringHook
|
18
18
|
|
19
|
-
def
|
20
|
-
"
|
21
|
-
rescue
|
22
|
-
to_s_original
|
19
|
+
def display_string
|
20
|
+
"%s.%s" % [@ole_class, @event]
|
23
21
|
end
|
24
22
|
end
|
25
23
|
|
26
24
|
module PrettyPrint
|
27
|
-
include WIN32OLE_PP::Extentions::Common::
|
28
|
-
include WIN32OLE_PP::Extentions::Common::PrettyPrint
|
25
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrintBase
|
29
26
|
|
30
27
|
def pretty_print(q)
|
31
28
|
props = [["ole_class", @ole_class], ["event_interface", @event]]
|
@@ -3,22 +3,39 @@ module WIN32OLE_PP
|
|
3
3
|
module WIN32OLE_METHOD
|
4
4
|
|
5
5
|
module SmartToString
|
6
|
-
include WIN32OLE_PP::Extentions::Common::
|
6
|
+
include WIN32OLE_PP::Extentions::Common::ToStringBase
|
7
7
|
include WIN32OLE_PP::Extentions::Common::ToStringHook
|
8
8
|
|
9
|
-
def
|
10
|
-
"
|
9
|
+
def display_string
|
10
|
+
"%s %s(%s)" % [return_type, name, params.map{|e| e.display_string} * ', ']
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
module PrettyPrint
|
15
|
-
|
15
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrintBase
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
PROPERTIES = [
|
18
|
+
:name,
|
19
|
+
:dispid,
|
20
|
+
:helpstring,
|
21
|
+
:helpcontext,
|
22
|
+
:helpfile,
|
23
|
+
:invoke_kind,
|
24
|
+
:invkind,
|
25
|
+
:return_type,
|
26
|
+
:return_type_detail,
|
27
|
+
:return_vtype,
|
28
|
+
:size_opt_params,
|
29
|
+
:size_params,
|
30
|
+
:offset_vtbl,
|
31
|
+
:visible?,
|
32
|
+
:event?,
|
33
|
+
:event_interface,
|
34
|
+
:params,
|
35
|
+
]
|
19
36
|
|
20
37
|
def pretty_print(q)
|
21
|
-
property_group(q, address_banner(name), PROPERTIES.map{|e| [e, send(e)] })
|
38
|
+
property_group(q, address_banner(name), PROPERTIES.map{|e| [e.to_s, send(e)] })
|
22
39
|
end
|
23
40
|
end
|
24
41
|
|
@@ -3,16 +3,10 @@ module WIN32OLE_PP
|
|
3
3
|
module WIN32OLE_PARAM
|
4
4
|
|
5
5
|
module SmartToString
|
6
|
-
include WIN32OLE_PP::Extentions::Common::
|
6
|
+
include WIN32OLE_PP::Extentions::Common::ToStringBase
|
7
7
|
include WIN32OLE_PP::Extentions::Common::ToStringHook
|
8
8
|
|
9
|
-
def
|
10
|
-
"#<%s: %s>" % [address_banner, to_s_simple]
|
11
|
-
rescue
|
12
|
-
to_s_original
|
13
|
-
end
|
14
|
-
|
15
|
-
def to_s_simple
|
9
|
+
def display_string
|
16
10
|
type = []
|
17
11
|
type << "in" if input?
|
18
12
|
type << "out" if output?
|
@@ -23,19 +17,25 @@ module WIN32OLE_PP
|
|
23
17
|
else
|
24
18
|
"[%s] %s %s" % [type * ", ", ole_type, name]
|
25
19
|
end
|
26
|
-
rescue
|
27
|
-
to_s_original
|
28
20
|
end
|
29
21
|
end
|
30
22
|
|
31
23
|
module PrettyPrint
|
32
|
-
|
24
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrintBase
|
33
25
|
|
34
|
-
|
35
|
-
|
26
|
+
PROPERTIES = [
|
27
|
+
:name,
|
28
|
+
:ole_type,
|
29
|
+
:ole_type_detail,
|
30
|
+
:default,
|
31
|
+
:input?,
|
32
|
+
:output?,
|
33
|
+
:optional?,
|
34
|
+
:retval?,
|
35
|
+
]
|
36
36
|
|
37
37
|
def pretty_print(q)
|
38
|
-
property_group(q, address_banner(name), PROPERTIES.map{|e| [e, send(e)] })
|
38
|
+
property_group(q, address_banner(name), PROPERTIES.map{|e| [e.to_s, send(e)] })
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -3,24 +3,36 @@ module WIN32OLE_PP
|
|
3
3
|
module WIN32OLE_TYPE
|
4
4
|
|
5
5
|
module SmartToString
|
6
|
-
include WIN32OLE_PP::Extentions::Common::
|
6
|
+
include WIN32OLE_PP::Extentions::Common::ToStringBase
|
7
7
|
include WIN32OLE_PP::Extentions::Common::ToStringHook
|
8
8
|
|
9
|
-
def
|
10
|
-
|
11
|
-
rescue
|
12
|
-
to_s_original
|
9
|
+
def display_string
|
10
|
+
name
|
13
11
|
end
|
14
12
|
end
|
15
13
|
|
16
14
|
module PrettyPrint
|
17
|
-
|
15
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrintBase
|
18
16
|
|
19
|
-
|
20
|
-
|
17
|
+
PROPERTIES = [
|
18
|
+
:name,
|
19
|
+
:guid,
|
20
|
+
:helpstring,
|
21
|
+
:helpcontext,
|
22
|
+
:helpfile,
|
23
|
+
:major_version,
|
24
|
+
:minor_version,
|
25
|
+
:ole_methods,
|
26
|
+
:ole_type,
|
27
|
+
:typekind,
|
28
|
+
:progid,
|
29
|
+
:src_type,
|
30
|
+
:visible?,
|
31
|
+
:variables,
|
32
|
+
]
|
21
33
|
|
22
34
|
def pretty_print(q)
|
23
|
-
property_group(q, address_banner(name), PROPERTIES.map{|e| [e, send(e)] })
|
35
|
+
property_group(q, address_banner(name), PROPERTIES.map{|e| [e.to_s, send(e)] })
|
24
36
|
end
|
25
37
|
end
|
26
38
|
|
@@ -3,24 +3,29 @@ module WIN32OLE_PP
|
|
3
3
|
module WIN32OLE_VARIABLE
|
4
4
|
|
5
5
|
module SmartToString
|
6
|
-
include WIN32OLE_PP::Extentions::Common::
|
6
|
+
include WIN32OLE_PP::Extentions::Common::ToStringBase
|
7
7
|
include WIN32OLE_PP::Extentions::Common::ToStringHook
|
8
8
|
|
9
|
-
def
|
10
|
-
"
|
11
|
-
rescue
|
12
|
-
to_s_original
|
9
|
+
def display_string
|
10
|
+
"%s=%s" % [name, value.inspect]
|
13
11
|
end
|
14
12
|
end
|
15
13
|
|
16
14
|
module PrettyPrint
|
17
|
-
|
15
|
+
include WIN32OLE_PP::Extentions::Common::PrettyPrintBase
|
18
16
|
|
19
|
-
|
20
|
-
|
17
|
+
PROPERTIES = [
|
18
|
+
:name,
|
19
|
+
:value,
|
20
|
+
:ole_type,
|
21
|
+
:ole_type_detail,
|
22
|
+
:variable_kind,
|
23
|
+
:varkind,
|
24
|
+
:visible?,
|
25
|
+
]
|
21
26
|
|
22
27
|
def pretty_print(q)
|
23
|
-
property_group(q, address_banner(name), PROPERTIES.map{|e| [e, send(e)] })
|
28
|
+
property_group(q, address_banner(name), PROPERTIES.map{|e| [e.to_s, send(e)] })
|
24
29
|
end
|
25
30
|
end
|
26
31
|
|
data/lib/win32ole_pp/pp.rb
CHANGED
data/lib/win32ole_pp/to_s.rb
CHANGED
data/lib/win32ole_pp/version.rb
CHANGED
data/test/test_win32ole.rb
CHANGED
@@ -20,6 +20,11 @@ class TestWin32ole < Test::Unit::TestCase
|
|
20
20
|
assert_match(/#<WIN32OLE:0x[[:xdigit:]]+: IDrive>/, @fs.Drives.Item(@drive).to_s)
|
21
21
|
end
|
22
22
|
|
23
|
+
def test_to_s_hex
|
24
|
+
assert_equal(@fs.to_s_original[/WIN32OLE:0x[[:xdigit:]]+/],
|
25
|
+
@fs.to_s[/WIN32OLE:0x[[:xdigit:]]+/])
|
26
|
+
end
|
27
|
+
|
23
28
|
def test_pp
|
24
29
|
assert_match(re(<<-EXPECTED), pp_s(@fs))
|
25
30
|
#<WIN32OLE:0x14c9fd6: IFileSystem[0-9]
|
data/test/test_win32ole_event.rb
CHANGED
@@ -18,6 +18,11 @@ class TestWin32oleEvent < Test::Unit::TestCase
|
|
18
18
|
@event.to_s)
|
19
19
|
end
|
20
20
|
|
21
|
+
def test_to_s_hex
|
22
|
+
assert_equal(@event.to_s_original[/WIN32OLE_EVENT:0x[[:xdigit:]]+/],
|
23
|
+
@event.to_s[/WIN32OLE_EVENT:0x[[:xdigit:]]+/])
|
24
|
+
end
|
25
|
+
|
21
26
|
def test_pp
|
22
27
|
assert_match(re(<<-EXPECTED), pp_s(@event))
|
23
28
|
#<WIN32OLE_EVENT:0x14b0568: DWebBrowserEvents
|
@@ -29,55 +29,55 @@ class TestWin32oleMethod < Test::Unit::TestCase
|
|
29
29
|
def test_pp
|
30
30
|
assert_match(re(<<-EXPECTED), pp_s(@method_drives))
|
31
31
|
#<WIN32OLE_METHOD:0x14c742a: Drives
|
32
|
+
name=.*?,
|
32
33
|
dispid=.*?,
|
33
|
-
|
34
|
-
event_interface=.*?,
|
34
|
+
helpstring=.*?,
|
35
35
|
helpcontext=.*?,
|
36
36
|
helpfile=.*?,
|
37
|
-
helpstring=.*?,
|
38
|
-
invkind=.*?,
|
39
37
|
invoke_kind=.*?,
|
40
|
-
|
41
|
-
offset_vtbl=.*?,
|
42
|
-
params=.*?,
|
38
|
+
invkind=.*?,
|
43
39
|
return_type=.*?,
|
44
40
|
return_type_detail=.*?,
|
45
41
|
return_vtype=.*?,
|
46
42
|
size_opt_params=.*?,
|
47
43
|
size_params=.*?,
|
48
|
-
|
44
|
+
offset_vtbl=.*?,
|
45
|
+
visible\\?=.*?,
|
46
|
+
event\\?=.*?,
|
47
|
+
event_interface=.*?,
|
48
|
+
params=.*?>
|
49
49
|
EXPECTED
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_pp2
|
53
53
|
assert_match(re(<<-EXPECTED), pp_s(@method_create_folder))
|
54
54
|
#<WIN32OLE_METHOD:0x14c72f4: CreateFolder
|
55
|
+
name=.*?,
|
55
56
|
dispid=.*?,
|
56
|
-
|
57
|
-
event_interface=.*?,
|
57
|
+
helpstring=.*?,
|
58
58
|
helpcontext=.*?,
|
59
59
|
helpfile=.*?,
|
60
|
-
helpstring=.*?,
|
61
|
-
invkind=.*?,
|
62
60
|
invoke_kind=.*?,
|
63
|
-
|
61
|
+
invkind=.*?,
|
62
|
+
return_type=.*?,
|
63
|
+
return_type_detail=.*?,
|
64
|
+
return_vtype=.*?,
|
65
|
+
size_opt_params=.*?,
|
66
|
+
size_params=.*?,
|
64
67
|
offset_vtbl=.*?,
|
68
|
+
visible\\?=.*?,
|
69
|
+
event\\?=.*?,
|
70
|
+
event_interface=.*?,
|
65
71
|
params.*?
|
66
72
|
\\[#<WIN32OLE_PARAM:0x14c4a9a: Path
|
67
|
-
default=.*?,
|
68
|
-
input\\?=.*?,
|
69
73
|
name=.*?,
|
70
74
|
ole_type=.*?,
|
71
75
|
ole_type_detail=.*?,
|
72
|
-
|
76
|
+
default=.*?,
|
77
|
+
input\\?=.*?,
|
73
78
|
output\\?=.*?,
|
74
|
-
|
75
|
-
|
76
|
-
return_type_detail=.*?,
|
77
|
-
return_vtype=.*?,
|
78
|
-
size_opt_params=.*?,
|
79
|
-
size_params=.*?,
|
80
|
-
visible\\?=.*?>
|
79
|
+
optional\\?=.*?,
|
80
|
+
retval\\?=.*?>\\]>
|
81
81
|
EXPECTED
|
82
82
|
end
|
83
83
|
|
data/test/test_win32ole_param.rb
CHANGED
@@ -28,13 +28,13 @@ class TestWin32oleParam < Test::Unit::TestCase
|
|
28
28
|
def test_pp
|
29
29
|
assert_match(re(<<-EXPECTED), pp_s(@param_create_folder))
|
30
30
|
\\[#<WIN32OLE_PARAM:0x14bd290: Path
|
31
|
-
default=.*?,
|
32
|
-
input\\?=.*?,
|
33
31
|
name=.*?,
|
34
32
|
ole_type=.*?,
|
35
33
|
ole_type_detail=.*?,
|
36
|
-
|
34
|
+
default=.*?,
|
35
|
+
input\\?=.*?,
|
37
36
|
output\\?=.*?,
|
37
|
+
optional\\?=.*?,
|
38
38
|
retval\\?=.*?>\\]
|
39
39
|
EXPECTED
|
40
40
|
end
|
@@ -42,22 +42,22 @@ class TestWin32oleParam < Test::Unit::TestCase
|
|
42
42
|
def test_pp2
|
43
43
|
assert_match(re(<<-EXPECTED), pp_s(@param_delete_folder))
|
44
44
|
\\[#<WIN32OLE_PARAM:0x14bd22c: FolderSpec
|
45
|
-
default=.*?,
|
46
|
-
input\\?=.*?,
|
47
45
|
name=.*?,
|
48
46
|
ole_type=.*?,
|
49
47
|
ole_type_detail=.*?,
|
50
|
-
|
48
|
+
default=.*?,
|
49
|
+
input\\?=.*?,
|
51
50
|
output\\?=.*?,
|
51
|
+
optional\\?=.*?,
|
52
52
|
retval\\?=.*?>,
|
53
53
|
#<WIN32OLE_PARAM:0x14bd218: Force
|
54
|
-
default=.*?,
|
55
|
-
input\\?=.*?,
|
56
54
|
name=.*?,
|
57
55
|
ole_type=.*?,
|
58
56
|
ole_type_detail=.*?,
|
59
|
-
|
57
|
+
default=.*?,
|
58
|
+
input\\?=.*?,
|
60
59
|
output\\?=.*?,
|
60
|
+
optional\\?=.*?,
|
61
61
|
retval\\?=.*?>\\]
|
62
62
|
EXPECTED
|
63
63
|
end
|
data/test/test_win32ole_type.rb
CHANGED
@@ -21,36 +21,36 @@ class TestWin32oleType < Test::Unit::TestCase
|
|
21
21
|
def test_pp
|
22
22
|
assert_match(re(<<-EXPECTED), pp_s(@script_control))
|
23
23
|
#<WIN32OLE_TYPE:0x14b6e2c: ScriptControlConstants
|
24
|
+
name=.*?,
|
24
25
|
guid=.*?,
|
26
|
+
helpstring=.*?,
|
25
27
|
helpcontext=.*?,
|
26
28
|
helpfile=.*?,
|
27
|
-
helpstring=.*?,
|
28
29
|
major_version=.*?,
|
29
30
|
minor_version=.*?,
|
30
|
-
name=.*?,
|
31
31
|
ole_methods=.*?,
|
32
32
|
ole_type=.*?,
|
33
|
+
typekind=.*?,
|
33
34
|
progid=.*?,
|
34
35
|
src_type=.*?,
|
35
|
-
|
36
|
+
visible\\?=.*?,
|
36
37
|
variables=
|
37
38
|
\\[#<WIN32OLE_VARIABLE:0x14b69d6: GlobalModule
|
38
39
|
name=.*?,
|
40
|
+
value=.*?,
|
39
41
|
ole_type=.*?,
|
40
42
|
ole_type_detail=.*?,
|
41
|
-
value=.*?,
|
42
43
|
variable_kind=.*?,
|
43
44
|
varkind=.*?,
|
44
45
|
visible\\?=.*?,
|
45
46
|
#<WIN32OLE_VARIABLE:0x14b69c2: NoTimeout
|
46
47
|
name=.*?,
|
48
|
+
value=.*?,
|
47
49
|
ole_type=.*?,
|
48
50
|
ole_type_detail=.*?,
|
49
|
-
value=.*?,
|
50
51
|
variable_kind=.*?,
|
51
52
|
varkind=.*?,
|
52
|
-
visible\\?=.*?>\\]
|
53
|
-
visible\\?=.*?>
|
53
|
+
visible\\?=.*?>\\]>
|
54
54
|
EXPECTED
|
55
55
|
end
|
56
56
|
|
@@ -26,17 +26,17 @@ class TestWin32oleVariable < Test::Unit::TestCase
|
|
26
26
|
assert_match(re(<<-EXPECTED), pp_s(@vars))
|
27
27
|
\\[#<WIN32OLE_VARIABLE:0x14b34a2: GlobalModule
|
28
28
|
name=.*?,
|
29
|
+
value=.*?,
|
29
30
|
ole_type=.*?,
|
30
31
|
ole_type_detail=.*?,
|
31
|
-
value=.*?,
|
32
32
|
variable_kind=.*?,
|
33
33
|
varkind=.*?,
|
34
34
|
visible\\?=.*?,
|
35
35
|
#<WIN32OLE_VARIABLE:0x14b3484: NoTimeout
|
36
36
|
name=.*?,
|
37
|
+
value=.*?,
|
37
38
|
ole_type=.*?,
|
38
39
|
ole_type_detail=.*?,
|
39
|
-
value=.*?,
|
40
40
|
variable_kind=.*?,
|
41
41
|
varkind=.*?,
|
42
42
|
visible\\?=.*?>\\]
|
metadata
CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: win32ole-pp
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date: 2007-02-
|
8
|
-
summary: pretty printer for WIN32OLE
|
6
|
+
version: 1.1.0
|
7
|
+
date: 2007-02-25 00:00:00 +09:00
|
8
|
+
summary: "win32ole-pp provides smart #to_s and pretty printer for WIN32OLE object."
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: miyamuko@gmail.com
|
12
12
|
homepage: http://win32ole-pp.rubyforge.org/
|
13
13
|
rubyforge_project: win32ole-pp
|
14
|
-
description: "
|
14
|
+
description: "win32ole-pp provides smart #to_s and pretty printer for WIN32OLE object. This library helps to develop/debug WIN32OLE applications."
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
@@ -83,5 +83,5 @@ dependencies:
|
|
83
83
|
requirements:
|
84
84
|
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: 1.
|
86
|
+
version: 1.2.0
|
87
87
|
version:
|