fb_graph 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -2
- data/VERSION +1 -1
- data/lib/fb_graph/node.rb +1 -5
- data/lib/fb_graph.rb +13 -0
- data/spec/fb_graph_spec.rb +15 -0
- metadata +16 -16
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.2
|
data/lib/fb_graph/node.rb
CHANGED
@@ -65,11 +65,7 @@ module FbGraph
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def http_client
|
68
|
-
|
69
|
-
:agent_name => "FbGraph (#{VERSION})"
|
70
|
-
)
|
71
|
-
_http_client_.request_filter << Debugger::RequestFilter.new if FbGraph.debugging?
|
72
|
-
_http_client_
|
68
|
+
FbGraph.http_client
|
73
69
|
end
|
74
70
|
|
75
71
|
private
|
data/lib/fb_graph.rb
CHANGED
@@ -40,6 +40,19 @@ module FbGraph
|
|
40
40
|
self.debugging = original
|
41
41
|
end
|
42
42
|
self.debugging = false
|
43
|
+
|
44
|
+
def self.http_client
|
45
|
+
_http_client_ = HTTPClient.new(
|
46
|
+
:agent_name => "FbGraph (#{VERSION})"
|
47
|
+
)
|
48
|
+
_http_client_.request_filter << Debugger::RequestFilter.new if debugging?
|
49
|
+
http_config.try(:call, _http_client_)
|
50
|
+
_http_client_
|
51
|
+
end
|
52
|
+
def self.http_config(&block)
|
53
|
+
Rack::OAuth2.http_config &block unless Rack::OAuth2.http_config
|
54
|
+
@@http_config ||= block
|
55
|
+
end
|
43
56
|
end
|
44
57
|
|
45
58
|
require 'fb_graph/exception'
|
data/spec/fb_graph_spec.rb
CHANGED
@@ -33,4 +33,19 @@ describe FbGraph do
|
|
33
33
|
FbGraph.debugging?.should be_true
|
34
34
|
end
|
35
35
|
end
|
36
|
+
|
37
|
+
describe '.http_client' do
|
38
|
+
context 'with http_config' do
|
39
|
+
before do
|
40
|
+
FbGraph.http_config do |config|
|
41
|
+
config.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
42
|
+
end
|
43
|
+
end
|
44
|
+
it 'should configure Rack::OAuth2 and FbGraph http_client' do
|
45
|
+
[Rack::OAuth2, FbGraph].each do |klass|
|
46
|
+
klass.http_client.ssl_config.verify_mode.should == OpenSSL::SSL::VERIFY_NONE
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
36
51
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|
16
|
-
requirement: &
|
16
|
+
requirement: &70281072602500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.2.0.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70281072602500
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rack-oauth2
|
27
|
-
requirement: &
|
27
|
+
requirement: &70281072531520 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.4
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70281072531520
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70281072531040 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0.8'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70281072531040
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: cover_me
|
49
|
-
requirement: &
|
49
|
+
requirement: &70281072530360 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.2.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70281072530360
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70281072529660 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '2'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70281072529660
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
|
-
requirement: &
|
71
|
+
requirement: &70281072529100 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.6.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70281072529100
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: actionpack
|
82
|
-
requirement: &
|
82
|
+
requirement: &70281072528600 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 3.0.6
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70281072528600
|
91
91
|
description: A full-stack Facebook Graph API wrapper in Ruby.
|
92
92
|
email: nov@matake.jp
|
93
93
|
executables: []
|