Socket
Book a DemoInstallSign in
Socket

rack-remote

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rack-remote

1.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Rack::Remote

Rack::Remote is a small request intercepting Rack middleware to invoke remote calls over HTTP. This can be used to invoke e.g. factories on remote services for running integration tests on distributed applications.

Installation

Add this line to your application's Gemfile:

gem 'rack-remote'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-remote

Usage

On server/service side

Register available remote calls:

Rack::Remote.register :factory_girl do |params, env, request|
  FactoryGirl.create params[:factory]
end

Return value can be a Rack response array or any object that will be converted to JSON.

On client side

Rack::Remote.add :srv1, 'http://serv.domain.tld/proxyed/path'
Rack::Remote.invoke :srv1, :factory_girl, factory: 'user'
Rack::Remote.invoke 'http://serv.domain.tld/proxyed/path', :factory_girl, factory: 'user'

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Add specs
  • Add features
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 23 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.