Sha256: 9bccc4f19a3cdc080d574e4ca6e9f9cea3591351d3f2bc2dc604cbaff8add6c4

Contents?: true

Size: 760 Bytes

Versions: 3

Compression:

Stored size: 760 Bytes

Contents

require 'rubygems'
require "bundler/setup"
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
      @config ||= load_config(File.join(Rails.root , 'config' , 'facebook.yml')).freeze
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fbgraph-1.6.0 lib/fbgraph.rb
fbgraph-1.5.4 lib/fbgraph.rb
fbgraph-1.5.2 lib/fbgraph.rb