Giter Site home page Giter Site logo

vanilli-ruby's Introduction

vanilli-ruby

Ruby bindings for use with vanilli.

IMPORTANT: Requires vanilli 4.8.1+ to be installed globally

Installation

Add this line to your application's Gemfile:

gem 'vanilli-ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vanilli-ruby

Usage

Two classes are provided VanilliServer and VanilliClient.

VanilliClient

This class provides a client API for interacting with a running vanilli server. The API has deliberately been kept as close as possible to the canonical javascript API with a few "rubifications" (snake case on method names for example). However, the API is close enough that providing extra documentation here is counter-productive - please see the javascript documentation.

Instantiating the client is straightforward:

require 'vanilli/client'

vanilli = VanilliClient.new

vanilli.stub(...)
#etc.

VanilliServer

Of course, to be able to make use of the client one needs a vanilli server running to connect to. This can be achieved in a number of ways:

  • Start vanilli via its CLI
npm install -g vanilli
vanilli --port 9000
  • Start vanilli from javascript i.e. use the javascript API perhaps from some grunt/gulp/npm based task.

  • Use VanilliServer provided with this ruby gem This just acts as a wrapper around the vanilli CLI. Therefore you MUST have vanilli installed to your path for this to work. Once installed, start something like this:

vanilli_server = VanilliServer.new(port: 9000,
                                  log_level: "debug",
                                  static_root: "/your/web/app/assets",
                                  static_include: ['**/*.html', '**/*.js', '**/*.css*', '/robots.txt'])
                .start

Contributing

To try out the gem before releasing, build and then install the gem:

gem build vanilly-ruby.gemspec
gem install vanilli-ruby-VERSION.gem

Releasing

  • Up the version in vanilli-ruby.gemspec
  • Commit and push
  • gem build vanilli-ruby.gemspec
  • gem push vanilli-ruby-VERSION.gem

vanilli-ruby's People

Contributors

kelveden avatar nick-aspinall-mixrad avatar

Watchers

Kevin West avatar James Baum avatar Tom Coupland avatar Dan Scotton avatar Tom avatar  avatar Diego Colantoni avatar James Cloos avatar Mark Swaffer avatar Luke Snape avatar Tim Greene avatar Jon Mulligan avatar Adewale Adeyemi avatar Dean Hayes avatar shine paul avatar Dan Stone avatar Ashley Best avatar Ben Lacey avatar Alex Watkinson avatar Rabeb Othmani avatar Mark Hearton avatar  avatar Miroslav Kouril avatar Taavi Kelle avatar Stu Mackellar avatar James Wherlock avatar Mike Bell avatar Simon Robinson avatar David Harris-James avatar Benjamin avatar Xueli Jin avatar Pekka Tulokas avatar Steve Penn avatar Katherine Gould avatar Peter Downer avatar Venkataramana Tirumalagiri avatar Lizanne Fernandez avatar Simon Bull avatar Jonathan Prem avatar Valerie Frost avatar Mary Bowden avatar  avatar Sunny Chotai avatar Waldemar Zubik avatar Chuen Tsang avatar Christopher Myhill avatar Andrew Neale avatar Katie Cookson avatar Mark O'Grady avatar Stu Harvey avatar Alex Whittle avatar Andrew Douglas avatar Usha Manjunath avatar Dave Gatehouse avatar rich brooks avatar Elin Ahlberg avatar Pinky Shetty avatar  avatar Jo Gardiner avatar Yingze Wang avatar David Hobbs avatar Paolo Sammut avatar Donna Kelford avatar  avatar  avatar Lloney Monono avatar  avatar Bindu Priya Konidala avatar Simon Ness avatar  avatar David Kendall avatar James Pearson avatar So Ting Tsang avatar  avatar  avatar Naomi Rusher 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.