jruby-win32ole 0.8.2 → 0.8.3
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/VERSION +1 -1
- data/bin/sample +0 -0
- data/lib/jruby-win32ole/version.rb +1 -1
- data/lib/racob-x64.dll +0 -0
- data/lib/racob-x86.dll +0 -0
- data/lib/racob.jar +0 -0
- data/lib/win32ole/win32ole.jar +0 -0
- data/src/org/jruby/ext/win32ole/RubyWIN32OLE.java +16 -19
- metadata +72 -67
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.3
|
data/bin/sample
CHANGED
File without changes
|
data/lib/racob-x64.dll
CHANGED
Binary file
|
data/lib/racob-x86.dll
CHANGED
Binary file
|
data/lib/racob.jar
CHANGED
Binary file
|
data/lib/win32ole/win32ole.jar
CHANGED
Binary file
|
@@ -5,7 +5,6 @@ import org.racob.com.EnumVariant;
|
|
5
5
|
import org.racob.com.Variant;
|
6
6
|
import java.util.Calendar;
|
7
7
|
import java.util.Date;
|
8
|
-
import java.util.List;
|
9
8
|
import org.jruby.Ruby;
|
10
9
|
import org.jruby.RubyArray;
|
11
10
|
import org.jruby.RubyClass;
|
@@ -73,23 +72,21 @@ public class RubyWIN32OLE extends RubyObject {
|
|
73
72
|
@JRubyMethod(required = 3)
|
74
73
|
public IRubyObject _getproperty(ThreadContext context, IRubyObject dispid,
|
75
74
|
IRubyObject args, IRubyObject argTypes) {
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
Object[] objectArgs = makeObjectArgs(args.convertToArray());
|
76
|
+
int id = (int) RubyInteger.num2long(dispid);
|
77
|
+
Ruby runtime = context.getRuntime();
|
79
78
|
|
80
|
-
if (objectArgs.length == 0)
|
81
|
-
return fromObject(context.getRuntime(), Dispatch.callO(dispatch, dispatchId));
|
82
|
-
}
|
79
|
+
if (objectArgs.length == 0) return fromObject(runtime, dispatch.callO(id));
|
83
80
|
|
84
|
-
return fromVariant(
|
85
|
-
Dispatch.call(dispatch, dispatchId, objectArgs));
|
81
|
+
return fromVariant(runtime, dispatch.call(id, objectArgs));
|
86
82
|
}
|
87
83
|
|
88
84
|
@JRubyMethod(required = 1, rest = true)
|
89
85
|
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
|
90
86
|
String id = args[0].convertToString().asJavaString();
|
87
|
+
String progId = toProgID(id);
|
91
88
|
|
92
|
-
dispatch = new Dispatch(
|
89
|
+
dispatch = new Dispatch(progId);
|
93
90
|
|
94
91
|
return this;
|
95
92
|
}
|
@@ -126,14 +123,15 @@ public class RubyWIN32OLE extends RubyObject {
|
|
126
123
|
public IRubyObject op_aref(ThreadContext context, IRubyObject property) {
|
127
124
|
String propertyName = property.asJavaString();
|
128
125
|
|
129
|
-
return fromVariant(context.getRuntime(),
|
126
|
+
return fromVariant(context.getRuntime(), dispatch.get(propertyName));
|
130
127
|
}
|
131
128
|
|
132
129
|
@JRubyMethod(name = "[]=", required = 2)
|
133
130
|
public IRubyObject op_aset(ThreadContext context, IRubyObject property, IRubyObject value) {
|
134
131
|
String propertyName = property.asJavaString();
|
135
132
|
|
136
|
-
|
133
|
+
dispatch.put(propertyName, toObject(value));
|
134
|
+
|
137
135
|
return context.getRuntime().getNil();
|
138
136
|
}
|
139
137
|
|
@@ -154,7 +152,7 @@ public class RubyWIN32OLE extends RubyObject {
|
|
154
152
|
Object[] objectArgs = makeObjectArgs(args, 1);
|
155
153
|
int[] errorArgs = new int[objectArgs.length];
|
156
154
|
|
157
|
-
|
155
|
+
dispatch.invoke(methodName, Dispatch.Put, objectArgs, errorArgs);
|
158
156
|
return context.getRuntime().getNil();
|
159
157
|
}
|
160
158
|
|
@@ -164,10 +162,9 @@ public class RubyWIN32OLE extends RubyObject {
|
|
164
162
|
int dispatchId = (int) RubyInteger.num2long(dispid);
|
165
163
|
Object[] objectArgs = makeObjectArgs(argsArray);
|
166
164
|
int[] errorArgs = makeErrorArgs(objectArgs.length);
|
167
|
-
Variant returnValue =
|
165
|
+
Variant returnValue = dispatch.invoke(dispatchId, dispatchType,
|
168
166
|
objectArgs, errorArgs);
|
169
167
|
|
170
|
-
System.out.println("INVOKEINTERNAL: " + returnValue);
|
171
168
|
return fromVariant(context.getRuntime(), returnValue);
|
172
169
|
}
|
173
170
|
private int[] makeErrorArgs(int size) {
|
@@ -201,10 +198,10 @@ public class RubyWIN32OLE extends RubyObject {
|
|
201
198
|
|
202
199
|
private IRubyObject invokeMethodOrGet(ThreadContext context, String methodName, IRubyObject[] args) {
|
203
200
|
if (args.length == 1) { // No-arg call
|
204
|
-
return fromObject(context.getRuntime(),
|
201
|
+
return fromObject(context.getRuntime(), dispatch.callO(methodName));
|
205
202
|
}
|
206
203
|
return fromVariant(context.getRuntime(),
|
207
|
-
|
204
|
+
dispatch.callN(methodName, makeObjectArgs(args, 1)));
|
208
205
|
}
|
209
206
|
|
210
207
|
@Override
|
@@ -300,8 +297,8 @@ public class RubyWIN32OLE extends RubyObject {
|
|
300
297
|
}
|
301
298
|
|
302
299
|
public static String toProgID(String id) {
|
303
|
-
if (id != null && id.startsWith("{
|
304
|
-
return id.substring(
|
300
|
+
if (id != null && id.startsWith("{") && id.endsWith("}")) {
|
301
|
+
return "clsid:" + id.substring(1, id.length() - 1);
|
305
302
|
}
|
306
303
|
|
307
304
|
return id;
|
metadata
CHANGED
@@ -1,80 +1,81 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-win32ole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 57
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.8.
|
7
|
+
- 0
|
8
|
+
- 8
|
9
|
+
- 3
|
10
|
+
version: 0.8.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
|
-
|
13
|
+
- Thomas E. Enebo
|
13
14
|
autorequire:
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-27 00:00:00 -06:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
21
22
|
description: A Gem for win32ole support on JRuby
|
22
23
|
email: tom.enebo@gmail.com
|
23
24
|
executables:
|
24
|
-
|
25
|
-
|
25
|
+
- make_data.rb
|
26
|
+
- sample
|
26
27
|
extensions: []
|
27
28
|
|
28
29
|
extra_rdoc_files: []
|
29
30
|
|
30
31
|
files:
|
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
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- README
|
35
|
+
- Rakefile
|
36
|
+
- VERSION
|
37
|
+
- bin/make_data.rb
|
38
|
+
- bin/sample
|
39
|
+
- build.xml
|
40
|
+
- jruby-win32ole.gemspec
|
41
|
+
- lib/jruby-win32ole.rb
|
42
|
+
- lib/jruby-win32ole/version.rb
|
43
|
+
- lib/racob-x64.dll
|
44
|
+
- lib/racob-x86.dll
|
45
|
+
- lib/racob.jar
|
46
|
+
- lib/win32ole/utils.rb
|
47
|
+
- lib/win32ole/win32ole.jar
|
48
|
+
- lib/win32ole/win32ole_error.rb
|
49
|
+
- lib/win32ole/win32ole_event.rb
|
50
|
+
- lib/win32ole/win32ole_method.rb
|
51
|
+
- lib/win32ole/win32ole_param.rb
|
52
|
+
- lib/win32ole/win32ole_ruby.rb
|
53
|
+
- lib/win32ole/win32ole_type.rb
|
54
|
+
- lib/win32ole/win32ole_typelib.rb
|
55
|
+
- lib/win32ole/win32ole_variable.rb
|
56
|
+
- lib/win32ole/win32ole_variant.rb
|
57
|
+
- nbproject/build-impl.xml
|
58
|
+
- nbproject/genfiles.properties
|
59
|
+
- nbproject/private/config.properties
|
60
|
+
- nbproject/private/private.properties
|
61
|
+
- nbproject/private/private.xml
|
62
|
+
- nbproject/project.properties
|
63
|
+
- nbproject/project.xml
|
64
|
+
- samples/browser_connect.rb
|
65
|
+
- samples/const_load.rb
|
66
|
+
- samples/dir_enum_bench.rb
|
67
|
+
- samples/dispatch_bench.rb
|
68
|
+
- samples/dump.rb
|
69
|
+
- samples/file_system_object.rb
|
70
|
+
- samples/fs.rb
|
71
|
+
- samples/ie_plus_events.rb
|
72
|
+
- samples/ie_simple.rb
|
73
|
+
- samples/ie_simple_clsid.rb
|
74
|
+
- samples/sbem.rb
|
75
|
+
- samples/small_enum_bench.rb
|
76
|
+
- src/org/jruby/ext/win32ole/RubyInvocationProxy.java
|
77
|
+
- src/org/jruby/ext/win32ole/RubyWIN32OLE.java
|
78
|
+
- src/win32ole/Win32oleService.java
|
78
79
|
has_rdoc: true
|
79
80
|
homepage: http://github.com/enebo/jruby-win32ole
|
80
81
|
licenses: []
|
@@ -83,25 +84,29 @@ post_install_message:
|
|
83
84
|
rdoc_options: []
|
84
85
|
|
85
86
|
require_paths:
|
86
|
-
|
87
|
+
- lib
|
87
88
|
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
88
90
|
requirements:
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 3
|
94
|
+
segments:
|
95
|
+
- 0
|
96
|
+
version: "0"
|
94
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
95
99
|
requirements:
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
101
106
|
requirements: []
|
102
107
|
|
103
108
|
rubyforge_project: jruby-win32ole
|
104
|
-
rubygems_version: 1.3.
|
109
|
+
rubygems_version: 1.3.7
|
105
110
|
signing_key:
|
106
111
|
specification_version: 3
|
107
112
|
summary: A Gem for win32ole support on JRuby
|