Sha256: cb4d4957a7e1375023eeb8f8ce8db4b83021d87729c891fcf7e919158ae49fd9

Contents?: true

Size: 806 Bytes

Versions: 2

Compression:

Stored size: 806 Bytes

Contents

require 'rubygems'
require "bundler/setup"
require 'active_support/all'
require 'oauth2'
require 'json'
require 'hashie'
require 'rest_client'
require 'uri'
require "base64"
require "openssl"

require 'fbgraph/result'
require 'fbgraph/client'
require 'fbgraph/base'
require 'fbgraph/authorization'
require 'fbgraph/selection'
require 'fbgraph/search'
require 'fbgraph/realtime'
require 'fbgraph/canvas'

module FBGraph
  @config = {}

  class << self

    def load_config(yaml_file)
      return false unless File.exist?(yaml_file)
      cfg = YAML::load(File.open(yaml_file))
      if defined? Rails
        cfg = cfg[Rails.env]
      end
      cfg
    end

    def config
      return @config if @config.any?
      load_config(File.join(Rails.root , 'config' , 'facebook.yml')).freeze
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fbgraph-1.7.1 lib/fbgraph.rb
fbgraph-1.7.0 lib/fbgraph.rb