ruby-proxy 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/atu/sikuli.rb +11 -0
- data/lib/ext/drb_ext.rb +1 -1
- data/lib/ruby_proxy/client.rb +2 -2
- data/lib/ruby_proxy/version.rb +1 -1
- data/unittests/support/atu/hello.rb +2 -2
- data/unittests/test_drb_proxy.rb +6 -4
- metadata +3 -3
data/lib/atu/sikuli.rb
CHANGED
@@ -19,6 +19,17 @@ module ATU
|
|
19
19
|
java_import 'org.sikuli.script.SikuliScript'
|
20
20
|
include Java::OrgSikuliScript
|
21
21
|
end
|
22
|
+
class Java::OrgSikuliScript::Region
|
23
|
+
alias old_paste paste
|
24
|
+
def paste(*args)
|
25
|
+
len = args.length
|
26
|
+
if len == 1
|
27
|
+
old_paste(nil,java.lang.String.new(args[0].to_java_bytes,"utf-8"))
|
28
|
+
elsif len== 2
|
29
|
+
old_paste(args[0],java.lang.String.new(args[1].to_java_bytes,"utf-8"))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
22
33
|
#Sikuli = Java::OrgSikuliScript
|
23
34
|
end
|
24
35
|
if __FILE__ == $0
|
data/lib/ext/drb_ext.rb
CHANGED
data/lib/ruby_proxy/client.rb
CHANGED
@@ -27,7 +27,7 @@ module ATU
|
|
27
27
|
#~ undef :type
|
28
28
|
#~ end
|
29
29
|
end
|
30
|
-
undef :type
|
30
|
+
undef :type rescue nil
|
31
31
|
undef :to_s
|
32
32
|
undef :to_a if respond_to?(:to_a)
|
33
33
|
undef :methods
|
@@ -177,7 +177,7 @@ module RubyProxy
|
|
177
177
|
# just change here command
|
178
178
|
temp = ENV["RUBYOPT"]
|
179
179
|
ENV["RUBYOPT"] = "-rubygems"
|
180
|
-
system("start /I /B jruby ruby_proxy/server.rb #{@ip} #{@port} \"#{org_path}\"
|
180
|
+
system("start /I /B jruby -J-Dfile.encoding=UTF-8 ruby_proxy/server.rb #{@ip} #{@port} \"#{org_path}\" ") #> #{@start_service_log_path} 2>&1")
|
181
181
|
ENV["RUBYOPT"] = temp
|
182
182
|
end
|
183
183
|
end
|
data/lib/ruby_proxy/version.rb
CHANGED
data/unittests/test_drb_proxy.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
$LOAD_PATH.unshift File.dirname(__FILE__)
|
2
|
+
|
1
3
|
require 'setup'
|
2
4
|
|
3
5
|
class Me
|
@@ -105,15 +107,15 @@ class TestDrbProxy < Test::Unit::TestCase
|
|
105
107
|
|
106
108
|
def test_include_other_module
|
107
109
|
a = ATU::M1::Hello6.new
|
108
|
-
|
110
|
+
assert_equal("bb",a.bb)
|
109
111
|
end
|
110
112
|
def test_constant_should_ok
|
111
|
-
|
113
|
+
assert_equal(1,ATU::M1::Hello6::C)
|
112
114
|
end
|
113
115
|
|
114
116
|
def test_class_module_function_should_ok
|
115
|
-
|
116
|
-
|
117
|
+
assert_equal([1,"1"],ATU::M1::Hello6.a(1,"1"))
|
118
|
+
assert_equal("m",ATU::M1::m)
|
117
119
|
end
|
118
120
|
|
119
121
|
# failed, fix me
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- yafei Li
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-09-07 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|