GithubHelp home page GithubHelp logo

ruby_proxy's Introduction

Ruby Proxy

Ruby Proxy allows you to run your ruby codes in more than one ruby or jruby processes. Now it is designed for using sikuli in ruby through druby lib from jruby.

Requirements

  • Ruby
  • JRuby rvm install jruby
  • Sikuli X 1.0rc2
  • Windows 7( or Other OS ,that not tested,but in theory not matter )

Compatibility

I test it passed in ruby1.8.6p111 and jruby1.6.3( ruby-1.8.7-p330 ) Sikuli use 1.0rc2


Installation
------------
    First, install ruby,jruby, for windows you can use one-click installation. ( To use ruby and jruby , you may need set path enviroment yourself )
    Second, install sikuli X 1.0rc2.
    At last, gem install ruby_proxy ( not jgem )

Usage
-----
    require 'rubygems'
    require 'ruby_proxy'
    # use ATU module as identification, this code is called by ruby proxy.
    screen = ATU::Sikuli::Screen.new
    screen.click('/home/windy/image/start.png',0)
    screen.type("abc")
    
    #also you can add more ruby proxy api
    #because ruby proxy process env is diff from your now process, you should pass argv absobute path.
    my_file = File.expand_path(File.join(__FILE__,'..','hello.rb'))
    RubyProxy::DRbClient.proxy_load(my_file)
    #now hello object is returned from ruby proxy by another process ( default is jruby ).
    hello = ATU::Hello.new
    # method a() is passed to another process ,then return .
    puts hello.a()
    
    you can see testunits for more usages.
Running the test suite
----------------------

1. prepare your ruby and jruby . if you want use sikuli , install it.
2. run all_tests.rb

Examples
--------

* now ruby proxy is very new,more expamples depend on you.

ruby_proxy's People

Contributors

lyfi2003 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.