$LOAD_PATH.unshift File.expand_path("./lib") require 'active_support/core_ext' require 'logger' require 'digest/md5' require 'restclient' require 'mashery/exceptions' require 'mashery/config' require 'mashery/rpc_client' require 'mashery/rpc_client/base' require 'mashery/rpc_client/response' require 'mashery/rest_client' require 'mashery/query_builder' require 'mashery/rest_client/query' require 'mashery/member' require 'mashery/key' require 'mashery/service' if defined?(Rails) require 'mashery/rails' require 'mashery/generator' end module Mashery @@config = nil def self.config raise Mashery::ConfigMissing.new unless @@config.present? @@config end def self.config=(other) @@config = other end def self.load_config!(yaml_file) Mashery.config = Mashery::Config.new(yaml_file) end def self.rpc Mashery::RpcClient.new end def self.rest Mashery::RestClient.new end def self.activity(activity_type, service_id, options) Mashery.rest.call(activity_type, service_id, options) end end