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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  require 'drb'
2
2
  module DRb
3
3
  class DRbObject
4
- undef :type
4
+ undef :type rescue nil
5
5
  end
6
6
  end
@@ -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}\" ")#> #{@start_service_log_path} 2>&1")
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
@@ -1,3 +1,3 @@
1
1
  module RubyProxy
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  module B
2
- def b
3
- return "b"
2
+ def bb
3
+ return "bb"
4
4
  end
5
5
  class H
6
6
  end
@@ -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
- assert("b",a.b)
110
+ assert_equal("bb",a.bb)
109
111
  end
110
112
  def test_constant_should_ok
111
- assert(1,ATU::M1::Hello6::C)
113
+ assert_equal(1,ATU::M1::Hello6::C)
112
114
  end
113
115
 
114
116
  def test_class_module_function_should_ok
115
- assert([1,"1"],ATU::M1::Hello6.a(1,"1"))
116
- assert("m",ATU::M1::m)
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
- - 3
9
- version: 0.0.3
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-08-26 00:00:00 +08:00
17
+ date: 2011-09-07 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies: []
20
20