Sha256: d1506bd013dc901d8ed09e3e86d491f4518f58e40c1d7f0dca26579a77d35231

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

$LOAD_PATH.unshift File.expand_path("./lib")

require 'virtus'
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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mashery_rails-0.6.9.pre4 lib/mashery.rb
mashery_rails-0.6.9.pre3 lib/mashery.rb