Sha256: 50bf8d0d0db8fc7374772a7a4b29c58ed526414ef51d9ba4dd3d8776885f0d65

Contents?: true

Size: 1008 Bytes

Versions: 5

Compression:

Stored size: 1008 Bytes

Contents

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

require 'active_support/core_ext'
require 'logger'
require 'digest/md5'
require 'restclient'

require 'masheri/exceptions'
require 'masheri/config'

require 'masheri/rpc_client'
require 'masheri/rpc_client/response'

require 'masheri/rest_client'
require 'masheri/query_builder'
require 'masheri/rest_client/query'
require 'masheri/rest_client/base'

require 'masheri/member'
require 'masheri/service'

module Masheri
  @@config = nil

  def self.config
    raise Masheri::ConfigMissing.new unless @@config.present?
    @@config
  end

  def self.config=(other)
    @@config = other
  end

  def self.load_config!(yaml_file)
    Masheri.config = Masheri::Config.new(yaml_file)
  end

  def self.rpc
    Masheri::RpcClient.new
  end

  def self.rest
    Masheri::RestClient.new
  end

  def self.activity(activity_type, service_id, options)
    Masheri.rest.activity(activity_type, service_id, options)
  end
end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
masheri-0.5.5 lib/masheri.rb
masheri-0.5.2 lib/masheri.rb
masheri-0.5.1 lib/masheri.rb
masheri-0.5.0 lib/masheri.rb
masheri-0.4.0 lib/masheri.rb