Sha256: a71a66d2a2c2303d4ba2e983d0a3e29557d920eb3ad7d3764cae6690b38a83f8

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

$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'

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.activity(activity_type, service_id, options)
  end
end

if defined?(Rails)
  require 'mashery/rails'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mashery_rails-0.6.2 lib/mashery.rb