mirror of
https://github.com/nov/fb_graph2
synced 2023-03-27 23:22:15 -04:00
Merge branch 'master' into master
This commit is contained in:
commit
0118f7f57e
2 changed files with 20 additions and 4 deletions
|
@ -5,4 +5,4 @@ rvm:
|
|||
- 2.3.3
|
||||
- 2.4.0
|
||||
- 2.5.6
|
||||
- 2.6.4
|
||||
- 2.6.4
|
||||
|
|
|
@ -6,15 +6,31 @@ require 'rack/oauth2'
|
|||
require 'patch/rack/oauth2/util'
|
||||
|
||||
module FbGraph2
|
||||
mattr_accessor :root_url, :api_version, :gem_version, :logger, :debugging, :_http_config_, :object_classes
|
||||
mattr_accessor :gem_version, :logger, :debugging, :_http_config_, :object_classes
|
||||
|
||||
self.root_url = 'https://graph.facebook.com'
|
||||
self.api_version = 'v2.11'
|
||||
DEFAULT_ROOT_URL = 'https://graph.facebook.com'
|
||||
DEFAULT_API_VERSION = 'v2.11'
|
||||
self.gem_version = File.read(File.join(__dir__, '../VERSION')).strip
|
||||
self.logger = Logger.new(STDOUT)
|
||||
self.logger.progname = 'FbGraph2'
|
||||
|
||||
class << self
|
||||
def root_url
|
||||
::Thread.current['fb_graph2_root_url'] || DEFAULT_ROOT_URL
|
||||
end
|
||||
|
||||
def root_url=(value)
|
||||
::Thread.current['fb_graph2_root_url'] = value
|
||||
end
|
||||
|
||||
def api_version
|
||||
::Thread.current['fb_graph2_api_version'] || DEFAULT_API_VERSION
|
||||
end
|
||||
|
||||
def api_version=(value)
|
||||
::Thread.current['fb_graph2_api_version'] = value
|
||||
end
|
||||
|
||||
def object_classes
|
||||
FbGraph2::Node.descendants
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue