Skip to content

Instantly share code, notes, and snippets.

@laser
Created April 14, 2014 17:48
Show Gist options
  • Save laser/10668936 to your computer and use it in GitHub Desktop.
Save laser/10668936 to your computer and use it in GitHub Desktop.
13: Rails client speaking HTTP
# config/initializers/services.rb
require 'barrister-rails'
require 'barrister-redis'
class Services
# ...
def self.proxy_services
url = 'http://myapp-userservice.herokuapps.com/api'
client = Barrister::Rails::Client.new url
{ user_service: client.UserService }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment